/* mediators_network.c generated by valac 0.14.2, the Vala compiler
 * generated from mediators_network.vala, do not modify */

/*
 * Copyright (C) 2010-2011 Simon Busch <morphis@gravedo.de>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <msmcomm-specs.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <freesmartphone.h>
#include <fsogsm.h>
#include <fsobasics.h>
#include <fsotransport.h>

#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_MSM_CHANNEL (msm_channel_get_type ())
#define MSM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_CHANNEL, MsmChannel))
#define MSM_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_CHANNEL, MsmChannelClass))
#define IS_MSM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_CHANNEL))
#define IS_MSM_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_CHANNEL))
#define MSM_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_CHANNEL, MsmChannelClass))

typedef struct _MsmChannel MsmChannel;
typedef struct _MsmChannelClass MsmChannelClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _MsmChannelPrivate MsmChannelPrivate;

#define TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER (msm_unsolicited_response_handler_get_type ())
#define MSM_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER, MsmUnsolicitedResponseHandler))
#define MSM_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER, MsmUnsolicitedResponseHandlerClass))
#define IS_MSM_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER))
#define IS_MSM_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER))
#define MSM_UNSOLICITED_RESPONSE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_UNSOLICITED_RESPONSE_HANDLER, MsmUnsolicitedResponseHandlerClass))

typedef struct _MsmUnsolicitedResponseHandler MsmUnsolicitedResponseHandler;
typedef struct _MsmUnsolicitedResponseHandlerClass MsmUnsolicitedResponseHandlerClass;

#define TYPE_MSM_URC_TYPE (msm_urc_type_get_type ())
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _changeOperationModeData changeOperationModeData;

#define TYPE_MSM_NETWORK_REGISTER (msm_network_register_get_type ())
#define MSM_NETWORK_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_REGISTER, MsmNetworkRegister))
#define MSM_NETWORK_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_REGISTER, MsmNetworkRegisterClass))
#define IS_MSM_NETWORK_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_REGISTER))
#define IS_MSM_NETWORK_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_REGISTER))
#define MSM_NETWORK_REGISTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_REGISTER, MsmNetworkRegisterClass))

typedef struct _MsmNetworkRegister MsmNetworkRegister;
typedef struct _MsmNetworkRegisterClass MsmNetworkRegisterClass;
typedef struct _MsmNetworkRegisterPrivate MsmNetworkRegisterPrivate;
typedef struct _MsmNetworkRegisterRunData MsmNetworkRegisterRunData;

#define TYPE_MSM_NETWORK_UNREGISTER (msm_network_unregister_get_type ())
#define MSM_NETWORK_UNREGISTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_UNREGISTER, MsmNetworkUnregister))
#define MSM_NETWORK_UNREGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_UNREGISTER, MsmNetworkUnregisterClass))
#define IS_MSM_NETWORK_UNREGISTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_UNREGISTER))
#define IS_MSM_NETWORK_UNREGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_UNREGISTER))
#define MSM_NETWORK_UNREGISTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_UNREGISTER, MsmNetworkUnregisterClass))

typedef struct _MsmNetworkUnregister MsmNetworkUnregister;
typedef struct _MsmNetworkUnregisterClass MsmNetworkUnregisterClass;
typedef struct _MsmNetworkUnregisterPrivate MsmNetworkUnregisterPrivate;

#define MSM_DATA_TYPE_NETWORK_INFO (msm_data_network_info_get_type ())
typedef struct _MsmDataNetworkInfo MsmDataNetworkInfo;
typedef struct _MsmNetworkUnregisterRunData MsmNetworkUnregisterRunData;

#define TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH (msm_network_get_signal_strength_get_type ())
#define MSM_NETWORK_GET_SIGNAL_STRENGTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH, MsmNetworkGetSignalStrength))
#define MSM_NETWORK_GET_SIGNAL_STRENGTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH, MsmNetworkGetSignalStrengthClass))
#define IS_MSM_NETWORK_GET_SIGNAL_STRENGTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH))
#define IS_MSM_NETWORK_GET_SIGNAL_STRENGTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH))
#define MSM_NETWORK_GET_SIGNAL_STRENGTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH, MsmNetworkGetSignalStrengthClass))

typedef struct _MsmNetworkGetSignalStrength MsmNetworkGetSignalStrength;
typedef struct _MsmNetworkGetSignalStrengthClass MsmNetworkGetSignalStrengthClass;
typedef struct _MsmNetworkGetSignalStrengthPrivate MsmNetworkGetSignalStrengthPrivate;
typedef struct _MsmNetworkGetSignalStrengthRunData MsmNetworkGetSignalStrengthRunData;

#define TYPE_MSM_NETWORK_GET_STATUS (msm_network_get_status_get_type ())
#define MSM_NETWORK_GET_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_GET_STATUS, MsmNetworkGetStatus))
#define MSM_NETWORK_GET_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_GET_STATUS, MsmNetworkGetStatusClass))
#define IS_MSM_NETWORK_GET_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_GET_STATUS))
#define IS_MSM_NETWORK_GET_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_GET_STATUS))
#define MSM_NETWORK_GET_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_GET_STATUS, MsmNetworkGetStatusClass))

typedef struct _MsmNetworkGetStatus MsmNetworkGetStatus;
typedef struct _MsmNetworkGetStatusClass MsmNetworkGetStatusClass;
typedef struct _MsmNetworkGetStatusPrivate MsmNetworkGetStatusPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _MsmNetworkGetStatusRunData MsmNetworkGetStatusRunData;

#define TYPE_MSM_NETWORK_LIST_PROVIDERS (msm_network_list_providers_get_type ())
#define MSM_NETWORK_LIST_PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_LIST_PROVIDERS, MsmNetworkListProviders))
#define MSM_NETWORK_LIST_PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_LIST_PROVIDERS, MsmNetworkListProvidersClass))
#define IS_MSM_NETWORK_LIST_PROVIDERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_LIST_PROVIDERS))
#define IS_MSM_NETWORK_LIST_PROVIDERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_LIST_PROVIDERS))
#define MSM_NETWORK_LIST_PROVIDERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_LIST_PROVIDERS, MsmNetworkListProvidersClass))

typedef struct _MsmNetworkListProviders MsmNetworkListProviders;
typedef struct _MsmNetworkListProvidersClass MsmNetworkListProvidersClass;
typedef struct _MsmNetworkListProvidersPrivate MsmNetworkListProvidersPrivate;
typedef struct _MsmNetworkListProvidersRunData MsmNetworkListProvidersRunData;

#define TYPE_MSM_NETWORK_SEND_USSD_REQUEST (msm_network_send_ussd_request_get_type ())
#define MSM_NETWORK_SEND_USSD_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_SEND_USSD_REQUEST, MsmNetworkSendUssdRequest))
#define MSM_NETWORK_SEND_USSD_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_SEND_USSD_REQUEST, MsmNetworkSendUssdRequestClass))
#define IS_MSM_NETWORK_SEND_USSD_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_SEND_USSD_REQUEST))
#define IS_MSM_NETWORK_SEND_USSD_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_SEND_USSD_REQUEST))
#define MSM_NETWORK_SEND_USSD_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_SEND_USSD_REQUEST, MsmNetworkSendUssdRequestClass))

typedef struct _MsmNetworkSendUssdRequest MsmNetworkSendUssdRequest;
typedef struct _MsmNetworkSendUssdRequestClass MsmNetworkSendUssdRequestClass;
typedef struct _MsmNetworkSendUssdRequestPrivate MsmNetworkSendUssdRequestPrivate;
typedef struct _MsmNetworkSendUssdRequestRunData MsmNetworkSendUssdRequestRunData;

#define TYPE_MSM_NETWORK_GET_CALLING_ID (msm_network_get_calling_id_get_type ())
#define MSM_NETWORK_GET_CALLING_ID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_GET_CALLING_ID, MsmNetworkGetCallingId))
#define MSM_NETWORK_GET_CALLING_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_GET_CALLING_ID, MsmNetworkGetCallingIdClass))
#define IS_MSM_NETWORK_GET_CALLING_ID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_GET_CALLING_ID))
#define IS_MSM_NETWORK_GET_CALLING_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_GET_CALLING_ID))
#define MSM_NETWORK_GET_CALLING_ID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_GET_CALLING_ID, MsmNetworkGetCallingIdClass))

typedef struct _MsmNetworkGetCallingId MsmNetworkGetCallingId;
typedef struct _MsmNetworkGetCallingIdClass MsmNetworkGetCallingIdClass;
typedef struct _MsmNetworkGetCallingIdPrivate MsmNetworkGetCallingIdPrivate;
typedef struct _MsmNetworkGetCallingIdRunData MsmNetworkGetCallingIdRunData;

#define TYPE_MSM_NETWORK_SET_CALLING_ID (msm_network_set_calling_id_get_type ())
#define MSM_NETWORK_SET_CALLING_ID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MSM_NETWORK_SET_CALLING_ID, MsmNetworkSetCallingId))
#define MSM_NETWORK_SET_CALLING_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MSM_NETWORK_SET_CALLING_ID, MsmNetworkSetCallingIdClass))
#define IS_MSM_NETWORK_SET_CALLING_ID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MSM_NETWORK_SET_CALLING_ID))
#define IS_MSM_NETWORK_SET_CALLING_ID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MSM_NETWORK_SET_CALLING_ID))
#define MSM_NETWORK_SET_CALLING_ID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MSM_NETWORK_SET_CALLING_ID, MsmNetworkSetCallingIdClass))

typedef struct _MsmNetworkSetCallingId MsmNetworkSetCallingId;
typedef struct _MsmNetworkSetCallingIdClass MsmNetworkSetCallingIdClass;
typedef struct _MsmNetworkSetCallingIdPrivate MsmNetworkSetCallingIdPrivate;
typedef struct _MsmNetworkSetCallingIdRunData MsmNetworkSetCallingIdRunData;

struct _MsmChannel {
	FsoFrameworkAbstractObject parent_instance;
	MsmChannelPrivate * priv;
	gchar* name;
	MsmUnsolicitedResponseHandler* urc_handler;
	MsmcommManagement* management_service;
	MsmcommState* state_service;
	MsmcommMisc* misc_service;
	MsmcommCall* call_service;
	MsmcommSim* sim_service;
	MsmcommPhonebook* phonebook_service;
	MsmcommNetwork* network_service;
	MsmcommSound* sound_service;
	MsmcommSms* sms_service;
};

struct _MsmChannelClass {
	FsoFrameworkAbstractObjectClass parent_class;
};

typedef enum  {
	MSM_URC_TYPE_INVALID,
	MSM_URC_TYPE_RESET_RADIO_IND,
	MSM_URC_TYPE_CALL_ORIGINATION,
	MSM_URC_TYPE_EXTENDED_FILE_INFO,
	MSM_URC_TYPE_NETWORK_STATE_INFO,
	MSM_URC_TYPE_OPERATION_MODE,
	MSM_URC_TYPE_PIN1_VERIFIED
} MsmUrcType;

struct _changeOperationModeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmcommOperationMode operation_mode;
	FsoGsmModem* _tmp0_;
	FsoGsmChannel* _tmp1_;
	MsmChannel* channel;
	MsmcommOperationMode _tmp2_;
	MsmcommOperationMode _tmp3_;
	MsmChannel* _tmp4_;
	MsmcommState* _tmp5_;
	MsmcommOperationMode _tmp6_;
	MsmcommOperationMode _tmp7_;
	MsmChannel* _tmp8_;
	MsmUnsolicitedResponseHandler* _tmp9_;
	GVariant* _tmp10_;
	GVariant* _tmp11_;
	MsmcommStateInfo* _tmp12_;
	MsmcommStateInfo* _tmp18_;
	MsmcommStateInfo* info;
	MsmcommStateInfo* _tmp19_;
	MsmcommOperationMode _tmp20_;
	MsmcommOperationMode _tmp21_;
	GError* _tmp22_;
	GError* err0;
	GError* err1;
	GError * _inner_error_;
};

struct _MsmNetworkRegister {
	FsoGsmNetworkRegister parent_instance;
	MsmNetworkRegisterPrivate * priv;
};

struct _MsmNetworkRegisterClass {
	FsoGsmNetworkRegisterClass parent_class;
};

struct _MsmNetworkRegisterRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkRegister* self;
	GError * _inner_error_;
};

struct _MsmNetworkUnregister {
	FsoGsmNetworkUnregister parent_instance;
	MsmNetworkUnregisterPrivate * priv;
};

struct _MsmNetworkUnregisterClass {
	FsoGsmNetworkUnregisterClass parent_class;
};

struct _MsmDataNetworkInfo {
	MsmcommNetworkRegistrationStatus reg_status;
	MsmcommNetworkServiceStatus service_status;
	MsmcommNetworkDataService data_service;
	gchar* operator_name;
	guint rssi;
	guint ecio;
	guint mcc;
	guint mnc;
};

struct _MsmNetworkUnregisterRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkUnregister* self;
	GError * _inner_error_;
};

struct _MsmNetworkGetSignalStrength {
	FsoGsmNetworkGetSignalStrength parent_instance;
	MsmNetworkGetSignalStrengthPrivate * priv;
};

struct _MsmNetworkGetSignalStrengthClass {
	FsoGsmNetworkGetSignalStrengthClass parent_class;
};

struct _MsmNetworkGetSignalStrengthRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkGetSignalStrength* self;
	MsmDataNetworkInfo _tmp0_;
	guint _tmp1_;
};

struct _MsmNetworkGetStatus {
	FsoGsmNetworkGetStatus parent_instance;
	MsmNetworkGetStatusPrivate * priv;
};

struct _MsmNetworkGetStatusClass {
	FsoGsmNetworkGetStatusClass parent_class;
};

struct _MsmNetworkGetStatusRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkGetStatus* self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	MsmcommOperationMode _tmp4_;
	GHashTable* _tmp5_;
	GHashTable* _tmp6_;
	GHashTable* _tmp7_;
	GHashTable* _tmp8_;
	gchar* _tmp9_;
	GVariant* _tmp10_;
};

struct _MsmNetworkListProviders {
	FsoGsmNetworkListProviders parent_instance;
	MsmNetworkListProvidersPrivate * priv;
};

struct _MsmNetworkListProvidersClass {
	FsoGsmNetworkListProvidersClass parent_class;
};

struct _MsmNetworkListProvidersRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkListProviders* self;
	GError* _tmp0_;
	GError * _inner_error_;
};

struct _MsmNetworkSendUssdRequest {
	FsoGsmNetworkSendUssdRequest parent_instance;
	MsmNetworkSendUssdRequestPrivate * priv;
};

struct _MsmNetworkSendUssdRequestClass {
	FsoGsmNetworkSendUssdRequestClass parent_class;
};

struct _MsmNetworkSendUssdRequestRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkSendUssdRequest* self;
	gchar* request;
	GError* _tmp0_;
	GError * _inner_error_;
};

struct _MsmNetworkGetCallingId {
	FsoGsmNetworkGetCallingId parent_instance;
	MsmNetworkGetCallingIdPrivate * priv;
};

struct _MsmNetworkGetCallingIdClass {
	FsoGsmNetworkGetCallingIdClass parent_class;
};

struct _MsmNetworkGetCallingIdRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkGetCallingId* self;
	GError* _tmp0_;
	GError * _inner_error_;
};

struct _MsmNetworkSetCallingId {
	FsoGsmNetworkSetCallingId parent_instance;
	MsmNetworkSetCallingIdPrivate * priv;
};

struct _MsmNetworkSetCallingIdClass {
	FsoGsmNetworkSetCallingIdClass parent_class;
};

struct _MsmNetworkSetCallingIdRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	MsmNetworkSetCallingId* self;
	FreeSmartphoneGSMCallingIdentificationStatus status;
	GError* _tmp0_;
	GError * _inner_error_;
};


extern MsmcommOperationMode msm_data_operation_mode;
static gpointer msm_network_register_parent_class = NULL;
static GType msm_network_register_type_id = 0;
static gpointer msm_network_unregister_parent_class = NULL;
extern MsmDataNetworkInfo msm_data_network_info;
extern FreeSmartphoneGSMSIMAuthStatus msm_data_sim_auth_status;
static GType msm_network_unregister_type_id = 0;
static gpointer msm_network_get_signal_strength_parent_class = NULL;
static GType msm_network_get_signal_strength_type_id = 0;
static gpointer msm_network_get_status_parent_class = NULL;
static GType msm_network_get_status_type_id = 0;
static gpointer msm_network_list_providers_parent_class = NULL;
static GType msm_network_list_providers_type_id = 0;
static gpointer msm_network_send_ussd_request_parent_class = NULL;
static GType msm_network_send_ussd_request_type_id = 0;
static gpointer msm_network_get_calling_id_parent_class = NULL;
static GType msm_network_get_calling_id_type_id = 0;
static gpointer msm_network_set_calling_id_parent_class = NULL;
static GType msm_network_set_calling_id_type_id = 0;

gchar* networkRegistrationStatusToString (MsmcommNetworkRegistrationStatus reg_status);
static void changeOperationMode_data_free (gpointer _data);
void changeOperationMode (MsmcommOperationMode operation_mode, GAsyncReadyCallback _callback_, gpointer _user_data_);
void changeOperationMode_finish (GAsyncResult* _res_, GError** error);
static gboolean changeOperationMode_co (changeOperationModeData* _data_);
GType msm_channel_get_type (void) G_GNUC_CONST;
GType msm_channel_register_type (GTypeModule * module);
GType msm_unsolicited_response_handler_get_type (void) G_GNUC_CONST;
GType msm_unsolicited_response_handler_register_type (GTypeModule * module);
static void changeOperationMode_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType msm_urc_type_get_type (void) G_GNUC_CONST;
void msm_unsolicited_response_handler_waitForUnsolicitedResponse (MsmUnsolicitedResponseHandler* self, MsmUrcType type, gint timeout, GSourceFunc timeout_func, void* timeout_func_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
GVariant* msm_unsolicited_response_handler_waitForUnsolicitedResponse_finish (MsmUnsolicitedResponseHandler* self, GAsyncResult* _res_);
static MsmcommStateInfo* _variant_get29 (GVariant* value);
GType msm_network_register_get_type (void) G_GNUC_CONST;
GType msm_network_register_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_REGISTER_DUMMY_PROPERTY
};
static void msm_network_register_real_run_data_free (gpointer _data);
static void msm_network_register_real_run (FsoGsmNetworkRegister* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_register_real_run_co (MsmNetworkRegisterRunData* _data_);
static void msm_network_register_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
MsmNetworkRegister* msm_network_register_new (void);
MsmNetworkRegister* msm_network_register_construct (GType object_type);
GType msm_network_unregister_get_type (void) G_GNUC_CONST;
GType msm_network_unregister_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_UNREGISTER_DUMMY_PROPERTY
};
static void msm_network_unregister_real_run_data_free (gpointer _data);
static void msm_network_unregister_real_run (FsoGsmNetworkUnregister* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_unregister_real_run_co (MsmNetworkUnregisterRunData* _data_);
static void msm_network_unregister_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType msm_data_network_info_get_type (void) G_GNUC_CONST;
MsmDataNetworkInfo* msm_data_network_info_dup (const MsmDataNetworkInfo* self);
void msm_data_network_info_free (MsmDataNetworkInfo* self);
void msm_data_network_info_copy (const MsmDataNetworkInfo* self, MsmDataNetworkInfo* dest);
void msm_data_network_info_destroy (MsmDataNetworkInfo* self);
void msm_data_network_info_reset (MsmDataNetworkInfo *self);
void gatherSimStatusAndUpdate (GAsyncReadyCallback _callback_, gpointer _user_data_);
void gatherSimStatusAndUpdate_finish (GAsyncResult* _res_, GError** error);
MsmNetworkUnregister* msm_network_unregister_new (void);
MsmNetworkUnregister* msm_network_unregister_construct (GType object_type);
GType msm_network_get_signal_strength_get_type (void) G_GNUC_CONST;
GType msm_network_get_signal_strength_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_GET_SIGNAL_STRENGTH_DUMMY_PROPERTY
};
static void msm_network_get_signal_strength_real_run_data_free (gpointer _data);
static void msm_network_get_signal_strength_real_run (FsoGsmNetworkGetSignalStrength* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_get_signal_strength_real_run_co (MsmNetworkGetSignalStrengthRunData* _data_);
MsmNetworkGetSignalStrength* msm_network_get_signal_strength_new (void);
MsmNetworkGetSignalStrength* msm_network_get_signal_strength_construct (GType object_type);
GType msm_network_get_status_get_type (void) G_GNUC_CONST;
GType msm_network_get_status_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_GET_STATUS_DUMMY_PROPERTY
};
static void msm_network_get_status_real_run_data_free (gpointer _data);
static void msm_network_get_status_real_run (FsoGsmNetworkGetStatus* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_get_status_real_run_co (MsmNetworkGetStatusRunData* _data_);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
void fillNetworkStatusInfo (GHashTable* status);
static GVariant* _variant_new30 (const gchar* value);
MsmNetworkGetStatus* msm_network_get_status_new (void);
MsmNetworkGetStatus* msm_network_get_status_construct (GType object_type);
GType msm_network_list_providers_get_type (void) G_GNUC_CONST;
GType msm_network_list_providers_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_LIST_PROVIDERS_DUMMY_PROPERTY
};
static void msm_network_list_providers_real_run_data_free (gpointer _data);
static void msm_network_list_providers_real_run (FsoGsmNetworkListProviders* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_list_providers_real_run_co (MsmNetworkListProvidersRunData* _data_);
MsmNetworkListProviders* msm_network_list_providers_new (void);
MsmNetworkListProviders* msm_network_list_providers_construct (GType object_type);
GType msm_network_send_ussd_request_get_type (void) G_GNUC_CONST;
GType msm_network_send_ussd_request_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_SEND_USSD_REQUEST_DUMMY_PROPERTY
};
static void msm_network_send_ussd_request_real_run_data_free (gpointer _data);
static void msm_network_send_ussd_request_real_run (FsoGsmNetworkSendUssdRequest* base, const gchar* request, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_send_ussd_request_real_run_co (MsmNetworkSendUssdRequestRunData* _data_);
MsmNetworkSendUssdRequest* msm_network_send_ussd_request_new (void);
MsmNetworkSendUssdRequest* msm_network_send_ussd_request_construct (GType object_type);
GType msm_network_get_calling_id_get_type (void) G_GNUC_CONST;
GType msm_network_get_calling_id_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_GET_CALLING_ID_DUMMY_PROPERTY
};
static void msm_network_get_calling_id_real_run_data_free (gpointer _data);
static void msm_network_get_calling_id_real_run (FsoGsmNetworkGetCallingId* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_get_calling_id_real_run_co (MsmNetworkGetCallingIdRunData* _data_);
MsmNetworkGetCallingId* msm_network_get_calling_id_new (void);
MsmNetworkGetCallingId* msm_network_get_calling_id_construct (GType object_type);
GType msm_network_set_calling_id_get_type (void) G_GNUC_CONST;
GType msm_network_set_calling_id_register_type (GTypeModule * module);
enum  {
	MSM_NETWORK_SET_CALLING_ID_DUMMY_PROPERTY
};
static void msm_network_set_calling_id_real_run_data_free (gpointer _data);
static void msm_network_set_calling_id_real_run (FsoGsmNetworkSetCallingId* base, FreeSmartphoneGSMCallingIdentificationStatus status, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean msm_network_set_calling_id_real_run_co (MsmNetworkSetCallingIdRunData* _data_);
MsmNetworkSetCallingId* msm_network_set_calling_id_new (void);
MsmNetworkSetCallingId* msm_network_set_calling_id_construct (GType object_type);


gchar* networkRegistrationStatusToString (MsmcommNetworkRegistrationStatus reg_status) {
	gchar* result = NULL;
	gchar* _tmp0_;
	gchar* _result_;
	MsmcommNetworkRegistrationStatus _tmp1_;
	_tmp0_ = g_strdup ("unknown");
	_result_ = _tmp0_;
	_tmp1_ = reg_status;
	switch (_tmp1_) {
		case MSMCOMM_NETWORK_REGISTRATION_STATUS_NO_SERVICE:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("unregistered");
			_g_free0 (_result_);
			_result_ = _tmp2_;
			break;
		}
		case MSMCOMM_NETWORK_REGISTRATION_STATUS_HOME:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("home");
			_g_free0 (_result_);
			_result_ = _tmp3_;
			break;
		}
		case MSMCOMM_NETWORK_REGISTRATION_STATUS_ROAMING:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("roaming");
			_g_free0 (_result_);
			_result_ = _tmp4_;
			break;
		}
		case MSMCOMM_NETWORK_REGISTRATION_STATUS_DENIED:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("denied");
			_g_free0 (_result_);
			_result_ = _tmp5_;
			break;
		}
		case MSMCOMM_NETWORK_REGISTRATION_STATUS_SEARCHING:
		{
			gchar* _tmp6_;
			_tmp6_ = g_strdup ("busy");
			_g_free0 (_result_);
			_result_ = _tmp6_;
			break;
		}
		default:
		break;
	}
	result = _result_;
	return result;
}


static void changeOperationMode_data_free (gpointer _data) {
	changeOperationModeData* _data_;
	_data_ = _data;
	g_slice_free (changeOperationModeData, _data_);
}


void changeOperationMode (MsmcommOperationMode operation_mode, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	changeOperationModeData* _data_;
	MsmcommOperationMode _tmp0_;
	_data_ = g_slice_new0 (changeOperationModeData);
	_data_->_async_result = g_simple_async_result_new (g_object_newv (G_TYPE_OBJECT, 0, NULL), _callback_, _user_data_, changeOperationMode);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, changeOperationMode_data_free);
	_tmp0_ = operation_mode;
	_data_->operation_mode = _tmp0_;
	changeOperationMode_co (_data_);
}


void changeOperationMode_finish (GAsyncResult* _res_, GError** error) {
	changeOperationModeData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void changeOperationMode_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	changeOperationModeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	changeOperationMode_co (_data_);
}


static MsmcommStateInfo* _variant_get29 (GVariant* value) {
	MsmcommStateInfo _tmp13_;
	GVariantIter _tmp14_;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	GVariant* _tmp17_;
	g_variant_iter_init (&_tmp14_, value);
	_tmp15_ = g_variant_iter_next_value (&_tmp14_);
	_tmp13_.mode = msmcomm_operation_mode_from_string (g_variant_get_string (_tmp15_, NULL), NULL);
	g_variant_unref (_tmp15_);
	_tmp16_ = g_variant_iter_next_value (&_tmp14_);
	_tmp13_.line = g_variant_get_uint32 (_tmp16_);
	g_variant_unref (_tmp16_);
	_tmp17_ = g_variant_iter_next_value (&_tmp14_);
	_tmp13_.als_allowed = g_variant_get_uint32 (_tmp17_);
	g_variant_unref (_tmp17_);
	return g_memdup (&_tmp13_, sizeof (MsmcommStateInfo));
}


static gboolean changeOperationMode_co (changeOperationModeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = fso_gsm_modem_channel (_data_->_tmp0_, "main");
	_data_->channel = IS_MSM_CHANNEL (_data_->_tmp1_) ? ((MsmChannel*) _data_->_tmp1_) : NULL;
	_data_->_tmp2_ = msm_data_operation_mode;
	_data_->_tmp3_ = _data_->operation_mode;
	if (_data_->_tmp2_ == _data_->_tmp3_) {
		_g_object_unref0 (_data_->channel);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp4_ = _data_->channel;
		_data_->_tmp5_ = _data_->_tmp4_->state_service;
		_data_->_tmp6_ = _data_->operation_mode;
		_data_->_state_ = 1;
		msmcomm_state_change_operation_mode (_data_->_tmp5_, _data_->_tmp6_, changeOperationMode_ready, _data_);
		return FALSE;
		_state_1:
		msmcomm_state_change_operation_mode_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == MSMCOMM_ERROR) {
				goto __catch31_msmcomm_error;
			}
			goto __catch31_g_error;
		}
		_data_->_tmp7_ = _data_->operation_mode;
		msm_data_operation_mode = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->channel;
		_data_->_tmp9_ = _data_->_tmp8_->urc_handler;
		_data_->_state_ = 2;
		msm_unsolicited_response_handler_waitForUnsolicitedResponse (_data_->_tmp9_, MSM_URC_TYPE_OPERATION_MODE, 0, NULL, NULL, changeOperationMode_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = msm_unsolicited_response_handler_waitForUnsolicitedResponse_finish (_data_->_tmp9_, _data_->_res_);
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_tmp12_ = _variant_get29 (_data_->_tmp11_);
		_data_->_tmp18_ = _data_->_tmp12_;
		_g_variant_unref0 (_data_->_tmp11_);
		_data_->info = _data_->_tmp18_;
		_data_->_tmp19_ = _data_->info;
		_data_->_tmp20_ = (*_data_->_tmp19_).mode;
		_data_->_tmp21_ = _data_->operation_mode;
		if (_data_->_tmp20_ != _data_->_tmp21_) {
			_data_->_tmp22_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INTERNAL_ERROR, "Could not switch operation mode successfully");
			_data_->_inner_error_ = _data_->_tmp22_;
			_g_free0 (_data_->info);
			if (_data_->_inner_error_->domain == MSMCOMM_ERROR) {
				goto __catch31_msmcomm_error;
			}
			goto __catch31_g_error;
		}
		_g_free0 (_data_->info);
	}
	goto __finally31;
	__catch31_msmcomm_error:
	{
		_data_->err0 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_error_free0 (_data_->err0);
	}
	goto __finally31;
	__catch31_g_error:
	{
		_data_->err1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_error_free0 (_data_->err1);
	}
	__finally31:
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->channel);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_object_unref0 (_data_->channel);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_g_object_unref0 (_data_->channel);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void msm_network_register_real_run_data_free (gpointer _data) {
	MsmNetworkRegisterRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkRegisterRunData, _data_);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void msm_network_register_real_run (FsoGsmNetworkRegister* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkRegister * self;
	MsmNetworkRegisterRunData* _data_;
	MsmNetworkRegister* _tmp0_;
	self = (MsmNetworkRegister*) base;
	_data_ = g_slice_new0 (MsmNetworkRegisterRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_register_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_register_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_register_real_run_co (_data_);
}


static void msm_network_register_real_run_finish (FsoGsmNetworkRegister* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkRegisterRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void msm_network_register_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MsmNetworkRegisterRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	msm_network_register_real_run_co (_data_);
}


static gboolean msm_network_register_real_run_co (MsmNetworkRegisterRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	changeOperationMode (MSMCOMM_OPERATION_MODE_ONLINE, msm_network_register_run_ready, _data_);
	return FALSE;
	_state_1:
	changeOperationMode_finish (_data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkRegister* msm_network_register_construct (GType object_type) {
	MsmNetworkRegister * self = NULL;
	self = (MsmNetworkRegister*) fso_gsm_network_register_construct (object_type);
	return self;
}


MsmNetworkRegister* msm_network_register_new (void) {
	return msm_network_register_construct (TYPE_MSM_NETWORK_REGISTER);
}


static void msm_network_register_class_init (MsmNetworkRegisterClass * klass) {
	msm_network_register_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_REGISTER_CLASS (klass)->run = msm_network_register_real_run;
	FSO_GSM_NETWORK_REGISTER_CLASS (klass)->run_finish = msm_network_register_real_run_finish;
}


static void msm_network_register_instance_init (MsmNetworkRegister * self) {
}


GType msm_network_register_get_type (void) {
	return msm_network_register_type_id;
}


GType msm_network_register_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkRegisterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_register_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkRegister), 0, (GInstanceInitFunc) msm_network_register_instance_init, NULL };
	msm_network_register_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_REGISTER, "MsmNetworkRegister", &g_define_type_info, 0);
	return msm_network_register_type_id;
}


static void msm_network_unregister_real_run_data_free (gpointer _data) {
	MsmNetworkUnregisterRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkUnregisterRunData, _data_);
}


static void msm_network_unregister_real_run (FsoGsmNetworkUnregister* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkUnregister * self;
	MsmNetworkUnregisterRunData* _data_;
	MsmNetworkUnregister* _tmp0_;
	self = (MsmNetworkUnregister*) base;
	_data_ = g_slice_new0 (MsmNetworkUnregisterRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_unregister_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_unregister_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_unregister_real_run_co (_data_);
}


static void msm_network_unregister_real_run_finish (FsoGsmNetworkUnregister* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkUnregisterRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void msm_network_unregister_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	MsmNetworkUnregisterRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	msm_network_unregister_real_run_co (_data_);
}


static gboolean msm_network_unregister_real_run_co (MsmNetworkUnregisterRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	changeOperationMode (MSMCOMM_OPERATION_MODE_OFFLINE, msm_network_unregister_run_ready, _data_);
	return FALSE;
	_state_1:
	changeOperationMode_finish (_data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	msm_data_network_info_reset (&msm_data_network_info);
	msm_data_sim_auth_status = FREE_SMARTPHONE_GSM_SIM_AUTH_STATUS_PIN_REQUIRED;
	_data_->_state_ = 2;
	gatherSimStatusAndUpdate (msm_network_unregister_run_ready, _data_);
	return FALSE;
	_state_2:
	gatherSimStatusAndUpdate_finish (_data_->_res_, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkUnregister* msm_network_unregister_construct (GType object_type) {
	MsmNetworkUnregister * self = NULL;
	self = (MsmNetworkUnregister*) fso_gsm_network_unregister_construct (object_type);
	return self;
}


MsmNetworkUnregister* msm_network_unregister_new (void) {
	return msm_network_unregister_construct (TYPE_MSM_NETWORK_UNREGISTER);
}


static void msm_network_unregister_class_init (MsmNetworkUnregisterClass * klass) {
	msm_network_unregister_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_UNREGISTER_CLASS (klass)->run = msm_network_unregister_real_run;
	FSO_GSM_NETWORK_UNREGISTER_CLASS (klass)->run_finish = msm_network_unregister_real_run_finish;
}


static void msm_network_unregister_instance_init (MsmNetworkUnregister * self) {
}


GType msm_network_unregister_get_type (void) {
	return msm_network_unregister_type_id;
}


GType msm_network_unregister_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkUnregisterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_unregister_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkUnregister), 0, (GInstanceInitFunc) msm_network_unregister_instance_init, NULL };
	msm_network_unregister_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_UNREGISTER, "MsmNetworkUnregister", &g_define_type_info, 0);
	return msm_network_unregister_type_id;
}


static void msm_network_get_signal_strength_real_run_data_free (gpointer _data) {
	MsmNetworkGetSignalStrengthRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkGetSignalStrengthRunData, _data_);
}


static void msm_network_get_signal_strength_real_run (FsoGsmNetworkGetSignalStrength* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkGetSignalStrength * self;
	MsmNetworkGetSignalStrengthRunData* _data_;
	MsmNetworkGetSignalStrength* _tmp0_;
	self = (MsmNetworkGetSignalStrength*) base;
	_data_ = g_slice_new0 (MsmNetworkGetSignalStrengthRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_get_signal_strength_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_get_signal_strength_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_get_signal_strength_real_run_co (_data_);
}


static void msm_network_get_signal_strength_real_run_finish (FsoGsmNetworkGetSignalStrength* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkGetSignalStrengthRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean msm_network_get_signal_strength_real_run_co (MsmNetworkGetSignalStrengthRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = msm_data_network_info;
	_data_->_tmp1_ = _data_->_tmp0_.rssi;
	fso_gsm_network_get_signal_strength_set_signal ((FsoGsmNetworkGetSignalStrength*) _data_->self, (gint) _data_->_tmp1_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkGetSignalStrength* msm_network_get_signal_strength_construct (GType object_type) {
	MsmNetworkGetSignalStrength * self = NULL;
	self = (MsmNetworkGetSignalStrength*) fso_gsm_network_get_signal_strength_construct (object_type);
	return self;
}


MsmNetworkGetSignalStrength* msm_network_get_signal_strength_new (void) {
	return msm_network_get_signal_strength_construct (TYPE_MSM_NETWORK_GET_SIGNAL_STRENGTH);
}


static void msm_network_get_signal_strength_class_init (MsmNetworkGetSignalStrengthClass * klass) {
	msm_network_get_signal_strength_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_GET_SIGNAL_STRENGTH_CLASS (klass)->run = msm_network_get_signal_strength_real_run;
	FSO_GSM_NETWORK_GET_SIGNAL_STRENGTH_CLASS (klass)->run_finish = msm_network_get_signal_strength_real_run_finish;
}


static void msm_network_get_signal_strength_instance_init (MsmNetworkGetSignalStrength * self) {
}


GType msm_network_get_signal_strength_get_type (void) {
	return msm_network_get_signal_strength_type_id;
}


GType msm_network_get_signal_strength_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkGetSignalStrengthClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_get_signal_strength_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkGetSignalStrength), 0, (GInstanceInitFunc) msm_network_get_signal_strength_instance_init, NULL };
	msm_network_get_signal_strength_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_GET_SIGNAL_STRENGTH, "MsmNetworkGetSignalStrength", &g_define_type_info, 0);
	return msm_network_get_signal_strength_type_id;
}


static void msm_network_get_status_real_run_data_free (gpointer _data) {
	MsmNetworkGetStatusRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkGetStatusRunData, _data_);
}


static void msm_network_get_status_real_run (FsoGsmNetworkGetStatus* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkGetStatus * self;
	MsmNetworkGetStatusRunData* _data_;
	MsmNetworkGetStatus* _tmp0_;
	self = (MsmNetworkGetStatus*) base;
	_data_ = g_slice_new0 (MsmNetworkGetStatusRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_get_status_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_get_status_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_get_status_real_run_co (_data_);
}


static void msm_network_get_status_real_run_finish (FsoGsmNetworkGetStatus* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkGetStatusRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _g_variant_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_variant_unref (var), NULL));
}


static GVariant* _variant_new30 (const gchar* value) {
	return g_variant_ref_sink (g_variant_new_string (value));
}


static gboolean msm_network_get_status_real_run_co (MsmNetworkGetStatusRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_str_hash;
	_data_->_tmp1_ = g_str_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, _g_variant_unref0_);
	_data_->_tmp3_ = _data_->_tmp2_;
	fso_gsm_network_get_status_set_status ((FsoGsmNetworkGetStatus*) _data_->self, _data_->_tmp3_);
	_g_hash_table_unref0 (_data_->_tmp3_);
	_data_->_tmp4_ = msm_data_operation_mode;
	if (_data_->_tmp4_ == MSMCOMM_OPERATION_MODE_ONLINE) {
		_data_->_tmp5_ = fso_gsm_network_get_status_get_status ((FsoGsmNetworkGetStatus*) _data_->self);
		_data_->_tmp6_ = _data_->_tmp5_;
		fillNetworkStatusInfo (_data_->_tmp6_);
	} else {
		_data_->_tmp7_ = fso_gsm_network_get_status_get_status ((FsoGsmNetworkGetStatus*) _data_->self);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = g_strdup ("registration");
		_data_->_tmp10_ = _variant_new30 ("unregistered");
		g_hash_table_insert (_data_->_tmp8_, _data_->_tmp9_, _data_->_tmp10_);
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkGetStatus* msm_network_get_status_construct (GType object_type) {
	MsmNetworkGetStatus * self = NULL;
	self = (MsmNetworkGetStatus*) fso_gsm_network_get_status_construct (object_type);
	return self;
}


MsmNetworkGetStatus* msm_network_get_status_new (void) {
	return msm_network_get_status_construct (TYPE_MSM_NETWORK_GET_STATUS);
}


static void msm_network_get_status_class_init (MsmNetworkGetStatusClass * klass) {
	msm_network_get_status_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_GET_STATUS_CLASS (klass)->run = msm_network_get_status_real_run;
	FSO_GSM_NETWORK_GET_STATUS_CLASS (klass)->run_finish = msm_network_get_status_real_run_finish;
}


static void msm_network_get_status_instance_init (MsmNetworkGetStatus * self) {
}


GType msm_network_get_status_get_type (void) {
	return msm_network_get_status_type_id;
}


GType msm_network_get_status_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkGetStatusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_get_status_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkGetStatus), 0, (GInstanceInitFunc) msm_network_get_status_instance_init, NULL };
	msm_network_get_status_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_GET_STATUS, "MsmNetworkGetStatus", &g_define_type_info, 0);
	return msm_network_get_status_type_id;
}


static void msm_network_list_providers_real_run_data_free (gpointer _data) {
	MsmNetworkListProvidersRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkListProvidersRunData, _data_);
}


static void msm_network_list_providers_real_run (FsoGsmNetworkListProviders* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkListProviders * self;
	MsmNetworkListProvidersRunData* _data_;
	MsmNetworkListProviders* _tmp0_;
	self = (MsmNetworkListProviders*) base;
	_data_ = g_slice_new0 (MsmNetworkListProvidersRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_list_providers_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_list_providers_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_list_providers_real_run_co (_data_);
}


static void msm_network_list_providers_real_run_finish (FsoGsmNetworkListProviders* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkListProvidersRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean msm_network_list_providers_real_run_co (MsmNetworkListProvidersRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_UNSUPPORTED, "Not yet implemented");
	_data_->_inner_error_ = _data_->_tmp0_;
	if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkListProviders* msm_network_list_providers_construct (GType object_type) {
	MsmNetworkListProviders * self = NULL;
	self = (MsmNetworkListProviders*) fso_gsm_network_list_providers_construct (object_type);
	return self;
}


MsmNetworkListProviders* msm_network_list_providers_new (void) {
	return msm_network_list_providers_construct (TYPE_MSM_NETWORK_LIST_PROVIDERS);
}


static void msm_network_list_providers_class_init (MsmNetworkListProvidersClass * klass) {
	msm_network_list_providers_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_LIST_PROVIDERS_CLASS (klass)->run = msm_network_list_providers_real_run;
	FSO_GSM_NETWORK_LIST_PROVIDERS_CLASS (klass)->run_finish = msm_network_list_providers_real_run_finish;
}


static void msm_network_list_providers_instance_init (MsmNetworkListProviders * self) {
}


GType msm_network_list_providers_get_type (void) {
	return msm_network_list_providers_type_id;
}


GType msm_network_list_providers_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkListProvidersClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_list_providers_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkListProviders), 0, (GInstanceInitFunc) msm_network_list_providers_instance_init, NULL };
	msm_network_list_providers_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_LIST_PROVIDERS, "MsmNetworkListProviders", &g_define_type_info, 0);
	return msm_network_list_providers_type_id;
}


static void msm_network_send_ussd_request_real_run_data_free (gpointer _data) {
	MsmNetworkSendUssdRequestRunData* _data_;
	_data_ = _data;
	_g_free0 (_data_->request);
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkSendUssdRequestRunData, _data_);
}


static void msm_network_send_ussd_request_real_run (FsoGsmNetworkSendUssdRequest* base, const gchar* request, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkSendUssdRequest * self;
	MsmNetworkSendUssdRequestRunData* _data_;
	MsmNetworkSendUssdRequest* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	self = (MsmNetworkSendUssdRequest*) base;
	_data_ = g_slice_new0 (MsmNetworkSendUssdRequestRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_send_ussd_request_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_send_ussd_request_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = request;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->request = _tmp2_;
	msm_network_send_ussd_request_real_run_co (_data_);
}


static void msm_network_send_ussd_request_real_run_finish (FsoGsmNetworkSendUssdRequest* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkSendUssdRequestRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean msm_network_send_ussd_request_real_run_co (MsmNetworkSendUssdRequestRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_UNSUPPORTED, "Not yet implemented");
	_data_->_inner_error_ = _data_->_tmp0_;
	if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkSendUssdRequest* msm_network_send_ussd_request_construct (GType object_type) {
	MsmNetworkSendUssdRequest * self = NULL;
	self = (MsmNetworkSendUssdRequest*) fso_gsm_network_send_ussd_request_construct (object_type);
	return self;
}


MsmNetworkSendUssdRequest* msm_network_send_ussd_request_new (void) {
	return msm_network_send_ussd_request_construct (TYPE_MSM_NETWORK_SEND_USSD_REQUEST);
}


static void msm_network_send_ussd_request_class_init (MsmNetworkSendUssdRequestClass * klass) {
	msm_network_send_ussd_request_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_SEND_USSD_REQUEST_CLASS (klass)->run = msm_network_send_ussd_request_real_run;
	FSO_GSM_NETWORK_SEND_USSD_REQUEST_CLASS (klass)->run_finish = msm_network_send_ussd_request_real_run_finish;
}


static void msm_network_send_ussd_request_instance_init (MsmNetworkSendUssdRequest * self) {
}


GType msm_network_send_ussd_request_get_type (void) {
	return msm_network_send_ussd_request_type_id;
}


GType msm_network_send_ussd_request_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkSendUssdRequestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_send_ussd_request_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkSendUssdRequest), 0, (GInstanceInitFunc) msm_network_send_ussd_request_instance_init, NULL };
	msm_network_send_ussd_request_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_SEND_USSD_REQUEST, "MsmNetworkSendUssdRequest", &g_define_type_info, 0);
	return msm_network_send_ussd_request_type_id;
}


static void msm_network_get_calling_id_real_run_data_free (gpointer _data) {
	MsmNetworkGetCallingIdRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkGetCallingIdRunData, _data_);
}


static void msm_network_get_calling_id_real_run (FsoGsmNetworkGetCallingId* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkGetCallingId * self;
	MsmNetworkGetCallingIdRunData* _data_;
	MsmNetworkGetCallingId* _tmp0_;
	self = (MsmNetworkGetCallingId*) base;
	_data_ = g_slice_new0 (MsmNetworkGetCallingIdRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_get_calling_id_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_get_calling_id_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	msm_network_get_calling_id_real_run_co (_data_);
}


static void msm_network_get_calling_id_real_run_finish (FsoGsmNetworkGetCallingId* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkGetCallingIdRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean msm_network_get_calling_id_real_run_co (MsmNetworkGetCallingIdRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_UNSUPPORTED, "Not yet implemented");
	_data_->_inner_error_ = _data_->_tmp0_;
	if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkGetCallingId* msm_network_get_calling_id_construct (GType object_type) {
	MsmNetworkGetCallingId * self = NULL;
	self = (MsmNetworkGetCallingId*) fso_gsm_network_get_calling_id_construct (object_type);
	return self;
}


MsmNetworkGetCallingId* msm_network_get_calling_id_new (void) {
	return msm_network_get_calling_id_construct (TYPE_MSM_NETWORK_GET_CALLING_ID);
}


static void msm_network_get_calling_id_class_init (MsmNetworkGetCallingIdClass * klass) {
	msm_network_get_calling_id_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_GET_CALLING_ID_CLASS (klass)->run = msm_network_get_calling_id_real_run;
	FSO_GSM_NETWORK_GET_CALLING_ID_CLASS (klass)->run_finish = msm_network_get_calling_id_real_run_finish;
}


static void msm_network_get_calling_id_instance_init (MsmNetworkGetCallingId * self) {
}


GType msm_network_get_calling_id_get_type (void) {
	return msm_network_get_calling_id_type_id;
}


GType msm_network_get_calling_id_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkGetCallingIdClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_get_calling_id_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkGetCallingId), 0, (GInstanceInitFunc) msm_network_get_calling_id_instance_init, NULL };
	msm_network_get_calling_id_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_GET_CALLING_ID, "MsmNetworkGetCallingId", &g_define_type_info, 0);
	return msm_network_get_calling_id_type_id;
}


static void msm_network_set_calling_id_real_run_data_free (gpointer _data) {
	MsmNetworkSetCallingIdRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (MsmNetworkSetCallingIdRunData, _data_);
}


static void msm_network_set_calling_id_real_run (FsoGsmNetworkSetCallingId* base, FreeSmartphoneGSMCallingIdentificationStatus status, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	MsmNetworkSetCallingId * self;
	MsmNetworkSetCallingIdRunData* _data_;
	MsmNetworkSetCallingId* _tmp0_;
	FreeSmartphoneGSMCallingIdentificationStatus _tmp1_;
	self = (MsmNetworkSetCallingId*) base;
	_data_ = g_slice_new0 (MsmNetworkSetCallingIdRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, msm_network_set_calling_id_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, msm_network_set_calling_id_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = status;
	_data_->status = _tmp1_;
	msm_network_set_calling_id_real_run_co (_data_);
}


static void msm_network_set_calling_id_real_run_finish (FsoGsmNetworkSetCallingId* base, GAsyncResult* _res_, GError** error) {
	MsmNetworkSetCallingIdRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean msm_network_set_calling_id_real_run_co (MsmNetworkSetCallingIdRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_UNSUPPORTED, "Not yet implemented");
	_data_->_inner_error_ = _data_->_tmp0_;
	if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


MsmNetworkSetCallingId* msm_network_set_calling_id_construct (GType object_type) {
	MsmNetworkSetCallingId * self = NULL;
	self = (MsmNetworkSetCallingId*) fso_gsm_network_set_calling_id_construct (object_type);
	return self;
}


MsmNetworkSetCallingId* msm_network_set_calling_id_new (void) {
	return msm_network_set_calling_id_construct (TYPE_MSM_NETWORK_SET_CALLING_ID);
}


static void msm_network_set_calling_id_class_init (MsmNetworkSetCallingIdClass * klass) {
	msm_network_set_calling_id_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_SET_CALLING_ID_CLASS (klass)->run = msm_network_set_calling_id_real_run;
	FSO_GSM_NETWORK_SET_CALLING_ID_CLASS (klass)->run_finish = msm_network_set_calling_id_real_run_finish;
}


static void msm_network_set_calling_id_instance_init (MsmNetworkSetCallingId * self) {
}


GType msm_network_set_calling_id_get_type (void) {
	return msm_network_set_calling_id_type_id;
}


GType msm_network_set_calling_id_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (MsmNetworkSetCallingIdClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) msm_network_set_calling_id_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MsmNetworkSetCallingId), 0, (GInstanceInitFunc) msm_network_set_calling_id_instance_init, NULL };
	msm_network_set_calling_id_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_NETWORK_SET_CALLING_ID, "MsmNetworkSetCallingId", &g_define_type_info, 0);
	return msm_network_set_calling_id_type_id;
}



