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

/*
 * Copyright (C) 2009-2011 Michael 'Mickey' Lauer <mlauer@vanille-media.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 <fsobasics.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <freesmartphone.h>
#include <fsotransport.h>
#include <gee.h>
#include <smsutil.h>
#include <conversions.h>
#include <gobject/gvaluecollector.h>


#define FSO_GSM_TYPE_MODEM (fso_gsm_modem_get_type ())
#define FSO_GSM_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_MODEM, FsoGsmModem))
#define FSO_GSM_IS_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_MODEM))
#define FSO_GSM_MODEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_MODEM, FsoGsmModemIface))

typedef struct _FsoGsmModem FsoGsmModem;
typedef struct _FsoGsmModemIface FsoGsmModemIface;

#define FSO_GSM_TYPE_CHANNEL (fso_gsm_channel_get_type ())
#define FSO_GSM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CHANNEL, FsoGsmChannel))
#define FSO_GSM_IS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CHANNEL))
#define FSO_GSM_CHANNEL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_CHANNEL, FsoGsmChannelIface))

typedef struct _FsoGsmChannel FsoGsmChannel;
typedef struct _FsoGsmChannelIface FsoGsmChannelIface;

#define FSO_GSM_MODEM_TYPE_STATUS (fso_gsm_modem_status_get_type ())

#define FSO_GSM_MODEM_TYPE_NETWORK_STATUS (fso_gsm_modem_network_status_get_type ())

#define FSO_GSM_TYPE_AT_COMMAND_SEQUENCE (fso_gsm_at_command_sequence_get_type ())
#define FSO_GSM_AT_COMMAND_SEQUENCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_COMMAND_SEQUENCE, FsoGsmAtCommandSequence))
#define FSO_GSM_AT_COMMAND_SEQUENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_COMMAND_SEQUENCE, FsoGsmAtCommandSequenceClass))
#define FSO_GSM_IS_AT_COMMAND_SEQUENCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_COMMAND_SEQUENCE))
#define FSO_GSM_IS_AT_COMMAND_SEQUENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_COMMAND_SEQUENCE))
#define FSO_GSM_AT_COMMAND_SEQUENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_COMMAND_SEQUENCE, FsoGsmAtCommandSequenceClass))

typedef struct _FsoGsmAtCommandSequence FsoGsmAtCommandSequence;
typedef struct _FsoGsmAtCommandSequenceClass FsoGsmAtCommandSequenceClass;

#define FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND (fso_gsm_at_command_queue_command_get_type ())
#define FSO_GSM_AT_COMMAND_QUEUE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND, FsoGsmAtCommandQueueCommand))
#define FSO_GSM_IS_AT_COMMAND_QUEUE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND))
#define FSO_GSM_AT_COMMAND_QUEUE_COMMAND_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND, FsoGsmAtCommandQueueCommandIface))

typedef struct _FsoGsmAtCommandQueueCommand FsoGsmAtCommandQueueCommand;
typedef struct _FsoGsmAtCommandQueueCommandIface FsoGsmAtCommandQueueCommandIface;

#define FSO_GSM_TYPE_AT_COMMAND (fso_gsm_at_command_get_type ())
#define FSO_GSM_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_COMMAND, FsoGsmAtCommand))
#define FSO_GSM_IS_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_COMMAND))
#define FSO_GSM_AT_COMMAND_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_AT_COMMAND, FsoGsmAtCommandIface))

typedef struct _FsoGsmAtCommand FsoGsmAtCommand;
typedef struct _FsoGsmAtCommandIface FsoGsmAtCommandIface;

#define FSO_GSM_CONSTANTS_TYPE_AT_RESPONSE (fso_gsm_constants_at_response_get_type ())

#define FSO_GSM_MODEM_TYPE_DATA (fso_gsm_modem_data_get_type ())
#define FSO_GSM_MODEM_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemData))
#define FSO_GSM_MODEM_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemDataClass))
#define FSO_GSM_MODEM_IS_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_MODEM_TYPE_DATA))
#define FSO_GSM_MODEM_IS_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_MODEM_TYPE_DATA))
#define FSO_GSM_MODEM_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemDataClass))

typedef struct _FsoGsmModemData FsoGsmModemData;
typedef struct _FsoGsmModemDataClass FsoGsmModemDataClass;

#define FSO_GSM_TYPE_CALL_HANDLER (fso_gsm_call_handler_get_type ())
#define FSO_GSM_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CALL_HANDLER, FsoGsmCallHandler))
#define FSO_GSM_IS_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CALL_HANDLER))
#define FSO_GSM_CALL_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_CALL_HANDLER, FsoGsmCallHandlerIface))

typedef struct _FsoGsmCallHandler FsoGsmCallHandler;
typedef struct _FsoGsmCallHandlerIface FsoGsmCallHandlerIface;

#define FSO_GSM_TYPE_CALL_INFO (fso_gsm_call_info_get_type ())
#define FSO_GSM_CALL_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CALL_INFO, FsoGsmCallInfo))
#define FSO_GSM_CALL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_CALL_INFO, FsoGsmCallInfoClass))
#define FSO_GSM_IS_CALL_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CALL_INFO))
#define FSO_GSM_IS_CALL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_CALL_INFO))
#define FSO_GSM_CALL_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_CALL_INFO, FsoGsmCallInfoClass))

typedef struct _FsoGsmCallInfo FsoGsmCallInfo;
typedef struct _FsoGsmCallInfoClass FsoGsmCallInfoClass;

#define FSO_GSM_TYPE_SMS_HANDLER (fso_gsm_sms_handler_get_type ())
#define FSO_GSM_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_SMS_HANDLER, FsoGsmSmsHandler))
#define FSO_GSM_IS_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_SMS_HANDLER))
#define FSO_GSM_SMS_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_SMS_HANDLER, FsoGsmSmsHandlerIface))

typedef struct _FsoGsmSmsHandler FsoGsmSmsHandler;
typedef struct _FsoGsmSmsHandlerIface FsoGsmSmsHandlerIface;

#define TYPE_WRAP_HEX_PDU (wrap_hex_pdu_get_type ())
#define WRAP_HEX_PDU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WRAP_HEX_PDU, WrapHexPdu))
#define WRAP_HEX_PDU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WRAP_HEX_PDU, WrapHexPduClass))
#define IS_WRAP_HEX_PDU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WRAP_HEX_PDU))
#define IS_WRAP_HEX_PDU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WRAP_HEX_PDU))
#define WRAP_HEX_PDU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WRAP_HEX_PDU, WrapHexPduClass))

typedef struct _WrapHexPdu WrapHexPdu;
typedef struct _WrapHexPduClass WrapHexPduClass;

#define FSO_GSM_TYPE_ISMS_STORAGE (fso_gsm_isms_storage_get_type ())
#define FSO_GSM_ISMS_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ISMS_STORAGE, FsoGsmISmsStorage))
#define FSO_GSM_IS_ISMS_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ISMS_STORAGE))
#define FSO_GSM_ISMS_STORAGE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_ISMS_STORAGE, FsoGsmISmsStorageIface))

typedef struct _FsoGsmISmsStorage FsoGsmISmsStorage;
typedef struct _FsoGsmISmsStorageIface FsoGsmISmsStorageIface;

#define FSO_GSM_TYPE_PHONEBOOK_HANDLER (fso_gsm_phonebook_handler_get_type ())
#define FSO_GSM_PHONEBOOK_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PHONEBOOK_HANDLER, FsoGsmPhonebookHandler))
#define FSO_GSM_IS_PHONEBOOK_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PHONEBOOK_HANDLER))
#define FSO_GSM_PHONEBOOK_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_PHONEBOOK_HANDLER, FsoGsmPhonebookHandlerIface))

typedef struct _FsoGsmPhonebookHandler FsoGsmPhonebookHandler;
typedef struct _FsoGsmPhonebookHandlerIface FsoGsmPhonebookHandlerIface;

#define FSO_GSM_TYPE_PHONEBOOK_STORAGE (fso_gsm_phonebook_storage_get_type ())
#define FSO_GSM_PHONEBOOK_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PHONEBOOK_STORAGE, FsoGsmPhonebookStorage))
#define FSO_GSM_PHONEBOOK_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PHONEBOOK_STORAGE, FsoGsmPhonebookStorageClass))
#define FSO_GSM_IS_PHONEBOOK_STORAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PHONEBOOK_STORAGE))
#define FSO_GSM_IS_PHONEBOOK_STORAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PHONEBOOK_STORAGE))
#define FSO_GSM_PHONEBOOK_STORAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PHONEBOOK_STORAGE, FsoGsmPhonebookStorageClass))

typedef struct _FsoGsmPhonebookStorage FsoGsmPhonebookStorage;
typedef struct _FsoGsmPhonebookStorageClass FsoGsmPhonebookStorageClass;

#define FSO_GSM_TYPE_WATCH_DOG (fso_gsm_watch_dog_get_type ())
#define FSO_GSM_WATCH_DOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_WATCH_DOG, FsoGsmWatchDog))
#define FSO_GSM_IS_WATCH_DOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_WATCH_DOG))
#define FSO_GSM_WATCH_DOG_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_WATCH_DOG, FsoGsmWatchDogIface))

typedef struct _FsoGsmWatchDog FsoGsmWatchDog;
typedef struct _FsoGsmWatchDogIface FsoGsmWatchDogIface;

#define FSO_GSM_TYPE_IPDP_HANDLER (fso_gsm_ipdp_handler_get_type ())
#define FSO_GSM_IPDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_IPDP_HANDLER, FsoGsmIPdpHandler))
#define FSO_GSM_IS_IPDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_IPDP_HANDLER))
#define FSO_GSM_IPDP_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_IPDP_HANDLER, FsoGsmIPdpHandlerIface))

typedef struct _FsoGsmIPdpHandler FsoGsmIPdpHandler;
typedef struct _FsoGsmIPdpHandlerIface FsoGsmIPdpHandlerIface;

#define FSO_GSM_TYPE_ROUTE_INFO (fso_gsm_route_info_get_type ())
#define FSO_GSM_ROUTE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ROUTE_INFO, FsoGsmRouteInfo))
#define FSO_GSM_ROUTE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ROUTE_INFO, FsoGsmRouteInfoClass))
#define FSO_GSM_IS_ROUTE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ROUTE_INFO))
#define FSO_GSM_IS_ROUTE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ROUTE_INFO))
#define FSO_GSM_ROUTE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ROUTE_INFO, FsoGsmRouteInfoClass))

typedef struct _FsoGsmRouteInfo FsoGsmRouteInfo;
typedef struct _FsoGsmRouteInfoClass FsoGsmRouteInfoClass;

#define FSO_GSM_TYPE_PHONEBOOK_PARAMS (fso_gsm_phonebook_params_get_type ())
#define FSO_GSM_PHONEBOOK_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PHONEBOOK_PARAMS, FsoGsmPhonebookParams))
#define FSO_GSM_PHONEBOOK_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PHONEBOOK_PARAMS, FsoGsmPhonebookParamsClass))
#define FSO_GSM_IS_PHONEBOOK_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PHONEBOOK_PARAMS))
#define FSO_GSM_IS_PHONEBOOK_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PHONEBOOK_PARAMS))
#define FSO_GSM_PHONEBOOK_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PHONEBOOK_PARAMS, FsoGsmPhonebookParamsClass))

typedef struct _FsoGsmPhonebookParams FsoGsmPhonebookParams;
typedef struct _FsoGsmPhonebookParamsClass FsoGsmPhonebookParamsClass;
typedef struct _FsoGsmPhonebookParamsPrivate FsoGsmPhonebookParamsPrivate;
typedef struct _FsoGsmParamSpecPhonebookParams FsoGsmParamSpecPhonebookParams;

#define FSO_GSM_TYPE_CONTEXT_PARAMS (fso_gsm_context_params_get_type ())
#define FSO_GSM_CONTEXT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CONTEXT_PARAMS, FsoGsmContextParams))
#define FSO_GSM_CONTEXT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_CONTEXT_PARAMS, FsoGsmContextParamsClass))
#define FSO_GSM_IS_CONTEXT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CONTEXT_PARAMS))
#define FSO_GSM_IS_CONTEXT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_CONTEXT_PARAMS))
#define FSO_GSM_CONTEXT_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_CONTEXT_PARAMS, FsoGsmContextParamsClass))

typedef struct _FsoGsmContextParams FsoGsmContextParams;
typedef struct _FsoGsmContextParamsClass FsoGsmContextParamsClass;
typedef struct _FsoGsmContextParamsPrivate FsoGsmContextParamsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _FsoGsmParamSpecContextParams FsoGsmParamSpecContextParams;

#define FSO_GSM_TYPE_NETWORK_TIME_REPORT (fso_gsm_network_time_report_get_type ())
#define FSO_GSM_NETWORK_TIME_REPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_NETWORK_TIME_REPORT, FsoGsmNetworkTimeReport))
#define FSO_GSM_NETWORK_TIME_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_NETWORK_TIME_REPORT, FsoGsmNetworkTimeReportClass))
#define FSO_GSM_IS_NETWORK_TIME_REPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_NETWORK_TIME_REPORT))
#define FSO_GSM_IS_NETWORK_TIME_REPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_NETWORK_TIME_REPORT))
#define FSO_GSM_NETWORK_TIME_REPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_NETWORK_TIME_REPORT, FsoGsmNetworkTimeReportClass))

typedef struct _FsoGsmNetworkTimeReport FsoGsmNetworkTimeReport;
typedef struct _FsoGsmNetworkTimeReportClass FsoGsmNetworkTimeReportClass;
typedef struct _FsoGsmNetworkTimeReportPrivate FsoGsmNetworkTimeReportPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _FsoGsmParamSpecNetworkTimeReport FsoGsmParamSpecNetworkTimeReport;
typedef struct _FsoGsmModemDataPrivate FsoGsmModemDataPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _fso_gsm_context_params_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_context_params_unref (var), NULL)))
#define _fso_gsm_network_time_report_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_network_time_report_unref (var), NULL)))

#define FSO_GSM_TYPE_ABSTRACT_MODEM (fso_gsm_abstract_modem_get_type ())
#define FSO_GSM_ABSTRACT_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_MODEM, FsoGsmAbstractModem))
#define FSO_GSM_ABSTRACT_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_MODEM, FsoGsmAbstractModemClass))
#define FSO_GSM_IS_ABSTRACT_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_MODEM))
#define FSO_GSM_IS_ABSTRACT_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_MODEM))
#define FSO_GSM_ABSTRACT_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_MODEM, FsoGsmAbstractModemClass))

typedef struct _FsoGsmAbstractModem FsoGsmAbstractModem;
typedef struct _FsoGsmAbstractModemClass FsoGsmAbstractModemClass;
typedef struct _FsoGsmAbstractModemPrivate FsoGsmAbstractModemPrivate;

#define FSO_GSM_TYPE_UNSOLICITED_RESPONSE_HANDLER (fso_gsm_unsolicited_response_handler_get_type ())
#define FSO_GSM_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_UNSOLICITED_RESPONSE_HANDLER, FsoGsmUnsolicitedResponseHandler))
#define FSO_GSM_IS_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_UNSOLICITED_RESPONSE_HANDLER))
#define FSO_GSM_UNSOLICITED_RESPONSE_HANDLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_UNSOLICITED_RESPONSE_HANDLER, FsoGsmUnsolicitedResponseHandlerIface))

typedef struct _FsoGsmUnsolicitedResponseHandler FsoGsmUnsolicitedResponseHandler;
typedef struct _FsoGsmUnsolicitedResponseHandlerIface FsoGsmUnsolicitedResponseHandlerIface;

#define FSO_GSM_TYPE_LOW_LEVEL (fso_gsm_low_level_get_type ())
#define FSO_GSM_LOW_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_LOW_LEVEL, FsoGsmLowLevel))
#define FSO_GSM_IS_LOW_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_LOW_LEVEL))
#define FSO_GSM_LOW_LEVEL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_LOW_LEVEL, FsoGsmLowLevelIface))

typedef struct _FsoGsmLowLevel FsoGsmLowLevel;
typedef struct _FsoGsmLowLevelIface FsoGsmLowLevelIface;
#define _fso_framework_transport_spec_unref0(var) ((var == NULL) ? NULL : (var = (fso_framework_transport_spec_unref (var), NULL)))

#define FSO_GSM_TYPE_NULL_LOW_LEVEL (fso_gsm_null_low_level_get_type ())
#define FSO_GSM_NULL_LOW_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_NULL_LOW_LEVEL, FsoGsmNullLowLevel))
#define FSO_GSM_NULL_LOW_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_NULL_LOW_LEVEL, FsoGsmNullLowLevelClass))
#define FSO_GSM_IS_NULL_LOW_LEVEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_NULL_LOW_LEVEL))
#define FSO_GSM_IS_NULL_LOW_LEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_NULL_LOW_LEVEL))
#define FSO_GSM_NULL_LOW_LEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_NULL_LOW_LEVEL, FsoGsmNullLowLevelClass))

typedef struct _FsoGsmNullLowLevel FsoGsmNullLowLevel;
typedef struct _FsoGsmNullLowLevelClass FsoGsmNullLowLevelClass;

#define FSO_GSM_TYPE_NULL_PDP_HANDLER (fso_gsm_null_pdp_handler_get_type ())
#define FSO_GSM_NULL_PDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_NULL_PDP_HANDLER, FsoGsmNullPdpHandler))
#define FSO_GSM_NULL_PDP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_NULL_PDP_HANDLER, FsoGsmNullPdpHandlerClass))
#define FSO_GSM_IS_NULL_PDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_NULL_PDP_HANDLER))
#define FSO_GSM_IS_NULL_PDP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_NULL_PDP_HANDLER))
#define FSO_GSM_NULL_PDP_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_NULL_PDP_HANDLER, FsoGsmNullPdpHandlerClass))

typedef struct _FsoGsmNullPdpHandler FsoGsmNullPdpHandler;
typedef struct _FsoGsmNullPdpHandlerClass FsoGsmNullPdpHandlerClass;

#define FSO_GSM_TYPE_PDP_HANDLER (fso_gsm_pdp_handler_get_type ())
#define FSO_GSM_PDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PDP_HANDLER, FsoGsmPdpHandler))
#define FSO_GSM_PDP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PDP_HANDLER, FsoGsmPdpHandlerClass))
#define FSO_GSM_IS_PDP_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PDP_HANDLER))
#define FSO_GSM_IS_PDP_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PDP_HANDLER))
#define FSO_GSM_PDP_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PDP_HANDLER, FsoGsmPdpHandlerClass))

typedef struct _FsoGsmPdpHandler FsoGsmPdpHandler;
typedef struct _FsoGsmPdpHandlerClass FsoGsmPdpHandlerClass;
#define _fso_gsm_at_command_sequence_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_at_command_sequence_unref (var), NULL)))
typedef struct _fso_gsm_abstract_modem_checkChannelsForHangupData fso_gsm_abstract_modem_checkChannelsForHangupData;

#define FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER (fso_gsm_base_unsolicited_response_handler_get_type ())
#define FSO_GSM_BASE_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER, FsoGsmBaseUnsolicitedResponseHandler))
#define FSO_GSM_BASE_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER, FsoGsmBaseUnsolicitedResponseHandlerClass))
#define FSO_GSM_IS_BASE_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER))
#define FSO_GSM_IS_BASE_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER))
#define FSO_GSM_BASE_UNSOLICITED_RESPONSE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_BASE_UNSOLICITED_RESPONSE_HANDLER, FsoGsmBaseUnsolicitedResponseHandlerClass))

typedef struct _FsoGsmBaseUnsolicitedResponseHandler FsoGsmBaseUnsolicitedResponseHandler;
typedef struct _FsoGsmBaseUnsolicitedResponseHandlerClass FsoGsmBaseUnsolicitedResponseHandlerClass;

#define FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER (fso_gsm_at_unsolicited_response_handler_get_type ())
#define FSO_GSM_AT_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER, FsoGsmAtUnsolicitedResponseHandler))
#define FSO_GSM_AT_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER, FsoGsmAtUnsolicitedResponseHandlerClass))
#define FSO_GSM_IS_AT_UNSOLICITED_RESPONSE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER))
#define FSO_GSM_IS_AT_UNSOLICITED_RESPONSE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER))
#define FSO_GSM_AT_UNSOLICITED_RESPONSE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_UNSOLICITED_RESPONSE_HANDLER, FsoGsmAtUnsolicitedResponseHandlerClass))

typedef struct _FsoGsmAtUnsolicitedResponseHandler FsoGsmAtUnsolicitedResponseHandler;
typedef struct _FsoGsmAtUnsolicitedResponseHandlerClass FsoGsmAtUnsolicitedResponseHandlerClass;

#define FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER (fso_gsm_abstract_call_handler_get_type ())
#define FSO_GSM_ABSTRACT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandler))
#define FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandlerClass))
#define FSO_GSM_IS_ABSTRACT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER))
#define FSO_GSM_IS_ABSTRACT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER))
#define FSO_GSM_ABSTRACT_CALL_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandlerClass))

typedef struct _FsoGsmAbstractCallHandler FsoGsmAbstractCallHandler;
typedef struct _FsoGsmAbstractCallHandlerClass FsoGsmAbstractCallHandlerClass;

#define FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER (fso_gsm_generic_at_call_handler_get_type ())
#define FSO_GSM_GENERIC_AT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER, FsoGsmGenericAtCallHandler))
#define FSO_GSM_GENERIC_AT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER, FsoGsmGenericAtCallHandlerClass))
#define FSO_GSM_IS_GENERIC_AT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER))
#define FSO_GSM_IS_GENERIC_AT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER))
#define FSO_GSM_GENERIC_AT_CALL_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER, FsoGsmGenericAtCallHandlerClass))

typedef struct _FsoGsmGenericAtCallHandler FsoGsmGenericAtCallHandler;
typedef struct _FsoGsmGenericAtCallHandlerClass FsoGsmGenericAtCallHandlerClass;

#define FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER (fso_gsm_abstract_sms_handler_get_type ())
#define FSO_GSM_ABSTRACT_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER, FsoGsmAbstractSmsHandler))
#define FSO_GSM_ABSTRACT_SMS_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER, FsoGsmAbstractSmsHandlerClass))
#define FSO_GSM_IS_ABSTRACT_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER))
#define FSO_GSM_IS_ABSTRACT_SMS_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER))
#define FSO_GSM_ABSTRACT_SMS_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_SMS_HANDLER, FsoGsmAbstractSmsHandlerClass))

typedef struct _FsoGsmAbstractSmsHandler FsoGsmAbstractSmsHandler;
typedef struct _FsoGsmAbstractSmsHandlerClass FsoGsmAbstractSmsHandlerClass;

#define FSO_GSM_TYPE_AT_SMS_HANDLER (fso_gsm_at_sms_handler_get_type ())
#define FSO_GSM_AT_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_SMS_HANDLER, FsoGsmAtSmsHandler))
#define FSO_GSM_AT_SMS_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_SMS_HANDLER, FsoGsmAtSmsHandlerClass))
#define FSO_GSM_IS_AT_SMS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_SMS_HANDLER))
#define FSO_GSM_IS_AT_SMS_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_SMS_HANDLER))
#define FSO_GSM_AT_SMS_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_SMS_HANDLER, FsoGsmAtSmsHandlerClass))

typedef struct _FsoGsmAtSmsHandler FsoGsmAtSmsHandler;
typedef struct _FsoGsmAtSmsHandlerClass FsoGsmAtSmsHandlerClass;

#define FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER (fso_gsm_at_phonebook_handler_get_type ())
#define FSO_GSM_AT_PHONEBOOK_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER, FsoGsmAtPhonebookHandler))
#define FSO_GSM_AT_PHONEBOOK_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER, FsoGsmAtPhonebookHandlerClass))
#define FSO_GSM_IS_AT_PHONEBOOK_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER))
#define FSO_GSM_IS_AT_PHONEBOOK_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER))
#define FSO_GSM_AT_PHONEBOOK_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_PHONEBOOK_HANDLER, FsoGsmAtPhonebookHandlerClass))

typedef struct _FsoGsmAtPhonebookHandler FsoGsmAtPhonebookHandler;
typedef struct _FsoGsmAtPhonebookHandlerClass FsoGsmAtPhonebookHandlerClass;

#define FSO_GSM_TYPE_GENERIC_WATCH_DOG (fso_gsm_generic_watch_dog_get_type ())
#define FSO_GSM_GENERIC_WATCH_DOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_GENERIC_WATCH_DOG, FsoGsmGenericWatchDog))
#define FSO_GSM_GENERIC_WATCH_DOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_GENERIC_WATCH_DOG, FsoGsmGenericWatchDogClass))
#define FSO_GSM_IS_GENERIC_WATCH_DOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_GENERIC_WATCH_DOG))
#define FSO_GSM_IS_GENERIC_WATCH_DOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_GENERIC_WATCH_DOG))
#define FSO_GSM_GENERIC_WATCH_DOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_GENERIC_WATCH_DOG, FsoGsmGenericWatchDogClass))

typedef struct _FsoGsmGenericWatchDog FsoGsmGenericWatchDog;
typedef struct _FsoGsmGenericWatchDogClass FsoGsmGenericWatchDogClass;
typedef struct _FsoGsmAbstractModemOpenData FsoGsmAbstractModemOpenData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _FsoGsmAbstractModemCloseData FsoGsmAbstractModemCloseData;
typedef struct _FsoGsmAbstractModemSuspendData FsoGsmAbstractModemSuspendData;
typedef struct _FsoGsmAbstractModemResumeData FsoGsmAbstractModemResumeData;

#define FSO_GSM_TYPE_ABSTRACT_MEDIATOR (fso_gsm_abstract_mediator_get_type ())
#define FSO_GSM_ABSTRACT_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_MEDIATOR, FsoGsmAbstractMediator))
#define FSO_GSM_ABSTRACT_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_MEDIATOR, FsoGsmAbstractMediatorClass))
#define FSO_GSM_IS_ABSTRACT_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_MEDIATOR))
#define FSO_GSM_IS_ABSTRACT_MEDIATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_MEDIATOR))
#define FSO_GSM_ABSTRACT_MEDIATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_MEDIATOR, FsoGsmAbstractMediatorClass))

typedef struct _FsoGsmAbstractMediator FsoGsmAbstractMediator;
typedef struct _FsoGsmAbstractMediatorClass FsoGsmAbstractMediatorClass;

#define FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY (fso_gsm_device_set_functionality_get_type ())
#define FSO_GSM_DEVICE_SET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY, FsoGsmDeviceSetFunctionality))
#define FSO_GSM_DEVICE_SET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY, FsoGsmDeviceSetFunctionalityClass))
#define FSO_GSM_IS_DEVICE_SET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY))
#define FSO_GSM_IS_DEVICE_SET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY))
#define FSO_GSM_DEVICE_SET_FUNCTIONALITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY, FsoGsmDeviceSetFunctionalityClass))

typedef struct _FsoGsmDeviceSetFunctionality FsoGsmDeviceSetFunctionality;
typedef struct _FsoGsmDeviceSetFunctionalityClass FsoGsmDeviceSetFunctionalityClass;
typedef struct _fso_gsm_abstract_modem_setFunctionalityData fso_gsm_abstract_modem_setFunctionalityData;
#define _t_destroy_func0(var) (((var == NULL) || (t_destroy_func == NULL)) ? NULL : (var = (t_destroy_func (var), NULL)))

#define FSO_GSM_TYPE_AT_COMMAND_QUEUE (fso_gsm_at_command_queue_get_type ())
#define FSO_GSM_AT_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE, FsoGsmAtCommandQueue))
#define FSO_GSM_AT_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_COMMAND_QUEUE, FsoGsmAtCommandQueueClass))
#define FSO_GSM_IS_AT_COMMAND_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE))
#define FSO_GSM_IS_AT_COMMAND_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_COMMAND_QUEUE))
#define FSO_GSM_AT_COMMAND_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_COMMAND_QUEUE, FsoGsmAtCommandQueueClass))

typedef struct _FsoGsmAtCommandQueue FsoGsmAtCommandQueue;
typedef struct _FsoGsmAtCommandQueueClass FsoGsmAtCommandQueueClass;

#define FSO_GSM_TYPE_AT_CHANNEL (fso_gsm_at_channel_get_type ())
#define FSO_GSM_AT_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_AT_CHANNEL, FsoGsmAtChannel))
#define FSO_GSM_AT_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_AT_CHANNEL, FsoGsmAtChannelClass))
#define FSO_GSM_IS_AT_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_AT_CHANNEL))
#define FSO_GSM_IS_AT_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_AT_CHANNEL))
#define FSO_GSM_AT_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_AT_CHANNEL, FsoGsmAtChannelClass))

typedef struct _FsoGsmAtChannel FsoGsmAtChannel;
typedef struct _FsoGsmAtChannelClass FsoGsmAtChannelClass;
typedef struct _fso_gsm_abstract_modem_processAtCommandAsyncData fso_gsm_abstract_modem_processAtCommandAsyncData;
typedef struct _fso_gsm_abstract_modem_processAtPduCommandAsyncData fso_gsm_abstract_modem_processAtPduCommandAsyncData;

#define FSO_GSM_TYPE_ABSTRACT_GSM_MODEM (fso_gsm_abstract_gsm_modem_get_type ())
#define FSO_GSM_ABSTRACT_GSM_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_GSM_MODEM, FsoGsmAbstractGsmModem))
#define FSO_GSM_ABSTRACT_GSM_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_GSM_MODEM, FsoGsmAbstractGsmModemClass))
#define FSO_GSM_IS_ABSTRACT_GSM_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_GSM_MODEM))
#define FSO_GSM_IS_ABSTRACT_GSM_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_GSM_MODEM))
#define FSO_GSM_ABSTRACT_GSM_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_GSM_MODEM, FsoGsmAbstractGsmModemClass))

typedef struct _FsoGsmAbstractGsmModem FsoGsmAbstractGsmModem;
typedef struct _FsoGsmAbstractGsmModemClass FsoGsmAbstractGsmModemClass;
typedef struct _FsoGsmAbstractGsmModemPrivate FsoGsmAbstractGsmModemPrivate;

#define FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM (fso_gsm_abstract_cdma_modem_get_type ())
#define FSO_GSM_ABSTRACT_CDMA_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM, FsoGsmAbstractCdmaModem))
#define FSO_GSM_ABSTRACT_CDMA_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM, FsoGsmAbstractCdmaModemClass))
#define FSO_GSM_IS_ABSTRACT_CDMA_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM))
#define FSO_GSM_IS_ABSTRACT_CDMA_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM))
#define FSO_GSM_ABSTRACT_CDMA_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_CDMA_MODEM, FsoGsmAbstractCdmaModemClass))

typedef struct _FsoGsmAbstractCdmaModem FsoGsmAbstractCdmaModem;
typedef struct _FsoGsmAbstractCdmaModemClass FsoGsmAbstractCdmaModemClass;
typedef struct _FsoGsmAbstractCdmaModemPrivate FsoGsmAbstractCdmaModemPrivate;

#define FSO_GSM_TYPE_NULL_MODEM (fso_gsm_null_modem_get_type ())
#define FSO_GSM_NULL_MODEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_NULL_MODEM, FsoGsmNullModem))
#define FSO_GSM_NULL_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_NULL_MODEM, FsoGsmNullModemClass))
#define FSO_GSM_IS_NULL_MODEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_NULL_MODEM))
#define FSO_GSM_IS_NULL_MODEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_NULL_MODEM))
#define FSO_GSM_NULL_MODEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_NULL_MODEM, FsoGsmNullModemClass))

typedef struct _FsoGsmNullModem FsoGsmNullModem;
typedef struct _FsoGsmNullModemClass FsoGsmNullModemClass;
typedef struct _FsoGsmNullModemPrivate FsoGsmNullModemPrivate;

struct _FsoGsmChannelIface {
	GTypeInterface parent_iface;
	void (*injectResponse) (FsoGsmChannel* self, const gchar* response);
	void (*suspend) (FsoGsmChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*suspend_finish) (FsoGsmChannel* self, GAsyncResult* _res_);
	void (*resume) (FsoGsmChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*resume_finish) (FsoGsmChannel* self, GAsyncResult* _res_);
};

typedef enum  {
	FSO_GSM_MODEM_STATUS_UNKNOWN,
	FSO_GSM_MODEM_STATUS_CLOSED,
	FSO_GSM_MODEM_STATUS_INITIALIZING,
	FSO_GSM_MODEM_STATUS_ALIVE_NO_SIM,
	FSO_GSM_MODEM_STATUS_ALIVE_SIM_LOCKED,
	FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED,
	FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY,
	FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED,
	FSO_GSM_MODEM_STATUS_SUSPENDING,
	FSO_GSM_MODEM_STATUS_SUSPENDED,
	FSO_GSM_MODEM_STATUS_RESUMING,
	FSO_GSM_MODEM_STATUS_CLOSING
} FsoGsmModemStatus;

typedef enum  {
	FSO_GSM_MODEM_NETWORK_STATUS_UNKNOWN,
	FSO_GSM_MODEM_NETWORK_STATUS_UNREGISTERED,
	FSO_GSM_MODEM_NETWORK_STATUS_SEARCHING,
	FSO_GSM_MODEM_NETWORK_STATUS_REGISTERED
} FsoGsmModemNetworkStatus;

struct _FsoGsmAtCommandQueueCommandIface {
	GTypeInterface parent_iface;
	guint (*get_retry) (FsoGsmAtCommandQueueCommand* self);
	guint (*get_timeout) (FsoGsmAtCommandQueueCommand* self);
	gchar* (*get_prefix) (FsoGsmAtCommandQueueCommand* self);
	gchar* (*get_postfix) (FsoGsmAtCommandQueueCommand* self);
	gboolean (*is_valid_prefix) (FsoGsmAtCommandQueueCommand* self, const gchar* line);
};

typedef enum  {
	FSO_GSM_AT_COMMAND_ERROR_UNABLE_TO_PARSE
} FsoGsmAtCommandError;
#define FSO_GSM_AT_COMMAND_ERROR fso_gsm_at_command_error_quark ()
typedef enum  {
	FSO_GSM_CONSTANTS_AT_RESPONSE_VALID = 0,
	FSO_GSM_CONSTANTS_AT_RESPONSE_OK = 1,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CONNECT = 2,
	FSO_GSM_CONSTANTS_AT_RESPONSE_UNEXPECTED_LENGTH = 501,
	FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE = 502,
	FSO_GSM_CONSTANTS_AT_RESPONSE_ERROR = 503,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_START = 1000,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_000_PHONE_FAILURE = 1000,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_001_NO_CONNECTION_TO_PHONE = 1001,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_002_PHONE_ADAPTER_LINK_RESERVED = 1002,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_003_OPERATION_NOT_ALLOWED = 1003,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_004_OPERATION_NOT_SUPPORTED = 1004,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_005_PH_SIM_PIN_REQUIRED = 1005,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_006_PH_FSIM_PIN_REQUIRED = 1006,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_007_PH_FSIM_PUK_REQUIRED = 1007,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_010_SIM_NOT_INSERTED = 1010,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_011_SIM_PIN_REQUIRED = 1011,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_012_SIM_PUK_REQUIRED = 1012,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_013_SIM_FAILURE = 1013,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_014_SIM_BUSY = 1014,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_015_SIM_WRONG = 1015,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_016_INCORRECT_PASSWORD = 1016,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_017_SIM_PIN2_REQUIRED = 1017,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_018_SIM_PUK2_REQUIRED = 1018,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_020_MEMORY_FULL = 1020,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_021_INVALID_INDEX = 1021,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_022_NOT_FOUND = 1022,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_023_MEMORY_FAILURE = 1023,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_024_TEXT_STRING_TOO_LONG = 1024,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_025_INVALID_CHARACTERS_IN_TEXT_STRING = 1025,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_026_DIAL_STRING_TOO_LONG = 1026,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_027_INVALID_CHARACTERS_IN_DIAL_STRING = 1027,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_030_NO_NETWORK_SERVICE = 1030,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_031_NETWORK_TIMEOUT = 1031,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_032_NETWORK_NOT_ALLOWED_EMERGENCY_CALLS_ONLY = 1032,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_040_NETWORK_PERSONALIZATION_PIN_REQUIRED = 1040,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_041_NETWORK_PERSONALIZATION_PUK_REQUIRED = 1041,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_042_NETWORK_SUBSET_PERSONALIZATION_PIN_REQUIRED = 1042,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_043_NETWORK_SUBSET_PERSONALIZATION_PUK_REQUIRED = 1043,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_044_SERVICE_PROVIDER_PERSONALIZATION_PIN_REQUIRED = 1044,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_045_SERVICE_PROVIDER_PERSONALIZATION_PUK_REQUIRED = 1045,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_046_CORPORATE_PERSONALIZATION_PIN_REQUIRED = 1046,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_047_CORPORATE_PERSONALIZATION_PUK_REQUIRED = 1047,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_048_PH_SIM_PUK_REQUIRED = 1048,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_100_UNKNOWN_ERROR = 1100,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_103_GPRS_ILLEGAL_MS = 1103,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_106_GPRS_ILLEGAL_ME = 1106,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_107_GPRS_SERVICES_NOT_ALLOWED = 1107,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_111_GPRS_PLMN_NOT_ALLOWED = 1111,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_112_GPRS_LOCATION_AREA_NOT_ALLOWED = 1112,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_113_GPRS_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA = 1113,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_126_GPRS_OPERATION_TEMPORARY_NOT_ALLOWED = 1126,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_132_GPRS_SERVICE_OPERATION_NOT_SUPPORTED = 1132,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_133_GPRS_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED = 1133,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_134_GPRS_SERVICE_OPTION_TEMPORARY_OUT_OF_ORDER = 1134,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_148_GPRS_UNSPECIFIED_ERROR = 1148,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_149_GPRS_PDP_AUTHENTICATION_FAILURE = 1149,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_150_GPRS_INVALID_MOBILE_CLASS = 1150,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_256_OPERATION_TEMPORARILY_NOT_ALLOWED = 1256,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_257_CALL_BARRED = 1257,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_258_PHONE_IS_BUSY = 1258,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_259_USER_ABORT = 1259,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_260_INVALID_DIAL_STRING = 1260,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_261_SS_NOT_EXECUTED = 1261,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_262_SIM_BLOCKED = 1262,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_263_INVALID_BLOCK = 1263,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_265_BUSY_TRY_AGAIN = 1265,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_512_FAILED_TO_ABORT_COMMAND = 1512,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_513_ACM_RESET_NEEDED = 1513,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_514_SIM_APPLICATION_TOOLKIT_BUSY = 1514,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_772_SIM_POWERED_DOWN = 1772,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_START = 2000,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_001_UNASSIGNED_NUMBER = 2001,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_008_OPERATOR_DETERMINED_BARRING = 2008,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_010_CALL_BARED = 2010,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_021_SHORT_MESSAGE_TRANSFER_REJECTED = 2021,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_027_DESTINATION_OUT_OF_SERVICE = 2027,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_028_UNIDENTIFIED_SUBSCRIBER = 2028,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_029_FACILITY_REJECTED = 2029,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_030_UNKNOWN_SUBSCRIBER = 2030,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_038_NETWORK_OUT_OF_ORDER = 2038,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_041_TEMPORARY_FAILURE = 2041,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_042_CONGESTION = 2042,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_047_RECOURCES_UNAVAILABLE = 2047,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_050_REQUESTED_FACILITY_NOT_SUBSCRIBED = 2050,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_069_REQUESTED_FACILITY_NOT_IMPLEMENTED = 2069,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_081_INVALID_SHORT_MESSAGE_TRANSFER_REFERENCE_VALUE = 2081,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_095_INVALID_MESSAGE_UNSPECIFIED = 2095,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_096_INVALID_MANDATORY_INFORMATION = 2096,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_097_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED = 2097,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_098_MESSAGE_NOT_COMPATIBLE_WITH_SHORT_MESSAGE_PROTOCOL = 2098,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_099_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED = 2099,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_111_PROTOCOL_ERROR_UNSPECIFIED = 2111,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_127_INTERNETWORKING_UNSPECIFIED = 2127,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_128_TELEMATIC_INTERNETWORKING_NOT_SUPPORTED = 2128,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_129_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED = 2129,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_130_CANNOT_REPLACE_SHORT_MESSAGE = 2130,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_143_UNSPECIFIED_TP_PID_ERROR = 2143,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_144_DATA_CODE_SCHEME_NOT_SUPPORTED = 2144,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_145_MESSAGE_CLASS_NOT_SUPPORTED = 2145,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_159_UNSPECIFIED_TP_DCS_ERROR = 2159,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_160_COMMAND_CANNOT_BE_ACTIONED = 2160,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_161_COMMAND_UNSUPPORTED = 2161,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_175_UNSPECIFIED_TP_COMMAND_ERROR = 2175,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_176_TPDU_NOT_SUPPORTED = 2176,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_192_SC_BUSY = 2192,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_193_NO_SC_SUBSCRIPTION = 2193,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_194_SC_SYSTEM_FAILURE = 2194,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_195_INVALID_SME_ADDRESS = 2195,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_196_DESTINATION_SME_BARRED = 2196,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_197_SM_REJECTED_DUPLICATE_SM = 2197,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_198_TP_VPF_NOT_SUPPORTED = 2198,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_199_TP_VP_NOT_SUPPORTED = 2199,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_208_D0_SIM_SMS_STORAGE_FULL = 2208,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_209_NO_SMS_STORAGE_CAPABILITY_IN_SIM = 2209,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_210_ERROR_IN_MS = 2210,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_211_MEMORY_CAPACITY_EXCEEDED = 2211,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_212_SIM_APPLICATION_TOOLKIT_BUSY = 2212,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_213_SIM_DATA_DOWNLOAD_ERROR = 2213,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_255_UNSPECIFIED_ERROR_CAUSE = 2255,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_300_ME_FAILURE = 2300,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_301_SMS_SERVICE_OF_ME_RESERVED = 2301,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_302_OPERATION_NOT_ALLOWED = 2302,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_303_OPERATION_NOT_SUPPORTED = 2303,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_304_INVALID_PDU_MODE_PARAMETER = 2304,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_305_INVALID_TEXT_MODE_PARAMETER = 2305,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_310_SIM_NOT_INSERTED = 2310,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_311_SIM_PIN_REQUIRED = 2311,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_312_PH_SIM_PIN_REQUIRED = 2312,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_313_SIM_FAILURE = 2313,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_314_SIM_BUSY = 2314,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_315_SIM_WRONG = 2315,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_316_SIM_PUK_REQUIRED = 2316,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_317_SIM_PIN2_REQUIRED = 2317,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_318_SIM_PUK2_REQUIRED = 2318,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_320_MEMORY_FAILURE = 2320,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_321_INVALID_MEMORY_INDEX = 2321,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_322_MEMORY_FULL = 2322,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_330_SMSC_ADDRESS_UNKNOWN = 2330,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_331_NO_NETWORK_SERVICE = 2331,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_332_NETWORK_TIMEOUT = 2332,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_340_NO_CNMA_EXPECTED = 2340,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_500_UNKNOWN_ERROR = 2500,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_512_FAILED_TO_ABORT_COMMAND = 2512,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_513_ACM_RESET_NEEDED = 2513,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_514_INVALID_STATUS = 2514,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_515_DEVICE_BUSY_OR_INVALID_CHARACTER_IN_STRING = 2515,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_516_INVALID_LENGTH = 2516,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_517_INVALID_CHARACTER_IN_PDU = 2517,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_518_INVALID_PARAMETER = 2518,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_519_INVALID_LENGTH_OR_CHARACTER = 2519,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_520_INVALID_CHARACTER_IN_TEXT = 2520,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_521_TIMER_EXPIRED = 2521,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_522_OPERATION_TEMPORARY_NOT_ALLOWED = 2522,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_532_SIM_NOT_READY = 2532,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_534_CELL_BROADCAST_ERROR_UNKNOWN = 2534,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_535_PROTOCOL_STACK_BUSY = 2535,
	FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_538_INVALID_PARAMETER = 2538,
	FSO_GSM_CONSTANTS_AT_RESPONSE_EXT_ERROR_START = 3000,
	FSO_GSM_CONSTANTS_AT_RESPONSE_EXT_ERROR_0_INVALID_PARAMETERR = 3000
} FsoGsmConstantsAtResponse;

struct _FsoGsmAtCommandIface {
	GTypeInterface parent_iface;
	guint (*get_timeout) (FsoGsmAtCommand* self);
	guint (*get_retry) (FsoGsmAtCommand* self);
	gchar* (*get_prefix) (FsoGsmAtCommand* self);
	gchar* (*get_postfix) (FsoGsmAtCommand* self);
	gboolean (*is_valid_prefix) (FsoGsmAtCommand* self, const gchar* line);
	void (*parse) (FsoGsmAtCommand* self, const gchar* response, GError** error);
	void (*parseMulti) (FsoGsmAtCommand* self, gchar** response, int response_length1, GError** error);
	void (*parseTest) (FsoGsmAtCommand* self, const gchar* response, GError** error);
	gchar* (*encodeString) (FsoGsmAtCommand* self, const gchar* str);
	gchar* (*decodeString) (FsoGsmAtCommand* self, const gchar* str);
	FsoGsmConstantsAtResponse (*validate) (FsoGsmAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateTest) (FsoGsmAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateUrc) (FsoGsmAtCommand* self, const gchar* response);
	FsoGsmConstantsAtResponse (*validateUrcPdu) (FsoGsmAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateOk) (FsoGsmAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateMulti) (FsoGsmAtCommand* self, gchar** response, int response_length1);
};

struct _FsoGsmCallHandlerIface {
	GTypeInterface parent_iface;
	void (*handleIncomingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleConnectingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleEndingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*addSupplementaryInformation) (FsoGsmCallHandler* self, const gchar* direction, const gchar* info);
	void (*activate) (FsoGsmCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*activate_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*initiate) (FsoGsmCallHandler* self, const gchar* number, const gchar* ctype, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gint (*initiate_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*hold) (FsoGsmCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*hold_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*release) (FsoGsmCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*release_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*releaseAll) (FsoGsmCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*releaseAll_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
};

struct _FsoGsmISmsStorageIface {
	GTypeInterface parent_iface;
	void (*clean) (FsoGsmISmsStorage* self);
	gint (*addSms) (FsoGsmISmsStorage* self, struct sms* message);
	GeeArrayList* (*keys) (FsoGsmISmsStorage* self);
	void (*message) (FsoGsmISmsStorage* self, const gchar* key, gint index, FreeSmartphoneGSMSIMMessage* result);
	FreeSmartphoneGSMSIMMessage* (*messagebook) (FsoGsmISmsStorage* self, int* result_length1);
	guint16 (*lastReferenceNumber) (FsoGsmISmsStorage* self);
	guint16 (*increasingReferenceNumber) (FsoGsmISmsStorage* self);
	void (*storeTransactionIndizesForSentMessage) (FsoGsmISmsStorage* self, GeeArrayList* hexpdus);
	gint (*confirmReceivedMessage) (FsoGsmISmsStorage* self, gint netreference);
};

struct _FsoGsmSmsHandlerIface {
	GTypeInterface parent_iface;
	void (*handleIncomingSmsOnSim) (FsoGsmSmsHandler* self, guint index, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*handleIncomingSmsOnSim_finish) (FsoGsmSmsHandler* self, GAsyncResult* _res_);
	void (*handleIncomingSms) (FsoGsmSmsHandler* self, const gchar* hexpdu, gint tpdulen, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*handleIncomingSms_finish) (FsoGsmSmsHandler* self, GAsyncResult* _res_);
	void (*handleIncomingSmsReport) (FsoGsmSmsHandler* self, const gchar* hexpdu, gint tpdulen, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*handleIncomingSmsReport_finish) (FsoGsmSmsHandler* self, GAsyncResult* _res_);
	guint16 (*lastReferenceNumber) (FsoGsmSmsHandler* self);
	guint16 (*nextReferenceNumber) (FsoGsmSmsHandler* self);
	GeeArrayList* (*formatTextMessage) (FsoGsmSmsHandler* self, const gchar* number, const gchar* contents, gboolean requestReport);
	void (*storeTransactionIndizesForSentMessage) (FsoGsmSmsHandler* self, GeeArrayList* hexpdus);
	FsoGsmISmsStorage* (*get_storage) (FsoGsmSmsHandler* self);
	void (*set_storage) (FsoGsmSmsHandler* self, FsoGsmISmsStorage* value);
};

struct _FsoGsmPhonebookHandlerIface {
	GTypeInterface parent_iface;
	void (*syncWithSim) (FsoGsmPhonebookHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*syncWithSim_finish) (FsoGsmPhonebookHandler* self, GAsyncResult* _res_);
	FsoGsmPhonebookStorage* (*get_storage) (FsoGsmPhonebookHandler* self);
	void (*set_storage) (FsoGsmPhonebookHandler* self, FsoGsmPhonebookStorage* value);
};

struct _FsoGsmWatchDogIface {
	GTypeInterface parent_iface;
	void (*check) (FsoGsmWatchDog* self);
	void (*resetUnlockMarker) (FsoGsmWatchDog* self);
};

struct _FsoGsmIPdpHandlerIface {
	GTypeInterface parent_iface;
	void (*activate) (FsoGsmIPdpHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*activate_finish) (FsoGsmIPdpHandler* self, GAsyncResult* _res_, GError** error);
	void (*deactivate) (FsoGsmIPdpHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*deactivate_finish) (FsoGsmIPdpHandler* self, GAsyncResult* _res_, GError** error);
	void (*statusUpdate) (FsoGsmIPdpHandler* self, const gchar* status, GHashTable* properties, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*statusUpdate_finish) (FsoGsmIPdpHandler* self, GAsyncResult* _res_);
	void (*connectedWithNewDefaultRoute) (FsoGsmIPdpHandler* self, FsoGsmRouteInfo* route, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*connectedWithNewDefaultRoute_finish) (FsoGsmIPdpHandler* self, GAsyncResult* _res_);
	void (*disconnected) (FsoGsmIPdpHandler* self);
	void (*syncStatus) (FsoGsmIPdpHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*syncStatus_finish) (FsoGsmIPdpHandler* self, GAsyncResult* _res_);
	FreeSmartphoneGSMContextStatus (*get_status) (FsoGsmIPdpHandler* self);
	void (*set_status) (FsoGsmIPdpHandler* self, FreeSmartphoneGSMContextStatus value);
	GHashTable* (*get_properties) (FsoGsmIPdpHandler* self);
	void (*set_properties) (FsoGsmIPdpHandler* self, GHashTable* value);
};

struct _FsoGsmModemIface {
	GTypeInterface parent_iface;
	void (*open) (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*open_finish) (FsoGsmModem* self, GAsyncResult* _res_);
	void (*close) (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*close_finish) (FsoGsmModem* self, GAsyncResult* _res_);
	void (*suspend) (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*suspend_finish) (FsoGsmModem* self, GAsyncResult* _res_);
	void (*resume) (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*resume_finish) (FsoGsmModem* self, GAsyncResult* _res_);
	void (*injectResponse) (FsoGsmModem* self, const gchar* command, const gchar* channel, GError** error);
	void (*setFunctionality) (FsoGsmModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*setFunctionality_finish) (FsoGsmModem* self, GAsyncResult* _res_, GError** error);
	void (*registerChannel) (FsoGsmModem* self, const gchar* name, FsoGsmChannel* channel);
	void (*advanceToState) (FsoGsmModem* self, FsoGsmModemStatus status, gboolean force);
	void (*advanceNetworkState) (FsoGsmModem* self, FsoGsmModemNetworkStatus status);
	FsoGsmAtCommandSequence* (*atCommandSequence) (FsoGsmModem* self, const gchar* channel, const gchar* purpose);
	gpointer (*createMediator) (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error);
	gpointer (*createAtCommand) (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command);
	gpointer (*theDevice) (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func);
	gchar* (*allocateDataPort) (FsoGsmModem* self);
	void (*releaseDataPort) (FsoGsmModem* self);
	void (*processAtCommandAsync) (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*processAtCommandAsync_finish) (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1);
	void (*processAtPduCommandAsync) (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*processAtPduCommandAsync_finish) (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1);
	void (*sendAtCommand) (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries);
	FsoGsmChannel* (*channel) (FsoGsmModem* self, const gchar* category);
	FsoGsmModemStatus (*status) (FsoGsmModem* self);
	FsoGsmModemNetworkStatus (*network_status) (FsoGsmModem* self);
	FreeSmartphoneGSMDeviceStatus (*externalStatus) (FsoGsmModem* self);
	FsoGsmModemData* (*data) (FsoGsmModem* self);
	void (*registerAtCommandSequence) (FsoGsmModem* self, const gchar* channel, const gchar* purpose, FsoGsmAtCommandSequence* sequence);
	gboolean (*isAlive) (FsoGsmModem* self);
	GObject* (*get_parent) (FsoGsmModem* self);
	void (*set_parent) (FsoGsmModem* self, GObject* value);
	FsoGsmCallHandler* (*get_callhandler) (FsoGsmModem* self);
	void (*set_callhandler) (FsoGsmModem* self, FsoGsmCallHandler* value);
	FsoGsmSmsHandler* (*get_smshandler) (FsoGsmModem* self);
	void (*set_smshandler) (FsoGsmModem* self, FsoGsmSmsHandler* value);
	FsoGsmPhonebookHandler* (*get_pbhandler) (FsoGsmModem* self);
	void (*set_pbhandler) (FsoGsmModem* self, FsoGsmPhonebookHandler* value);
	FsoGsmWatchDog* (*get_watchdog) (FsoGsmModem* self);
	void (*set_watchdog) (FsoGsmModem* self, FsoGsmWatchDog* value);
	FsoGsmIPdpHandler* (*get_pdphandler) (FsoGsmModem* self);
	void (*set_pdphandler) (FsoGsmModem* self, FsoGsmIPdpHandler* value);
};

struct _FsoGsmPhonebookParams {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FsoGsmPhonebookParamsPrivate * priv;
	gint min;
	gint max;
};

struct _FsoGsmPhonebookParamsClass {
	GTypeClass parent_class;
	void (*finalize) (FsoGsmPhonebookParams *self);
};

struct _FsoGsmParamSpecPhonebookParams {
	GParamSpec parent_instance;
};

struct _FsoGsmContextParams {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FsoGsmContextParamsPrivate * priv;
	gchar* apn;
	gchar* username;
	gchar* password;
};

struct _FsoGsmContextParamsClass {
	GTypeClass parent_class;
	void (*finalize) (FsoGsmContextParams *self);
};

struct _FsoGsmParamSpecContextParams {
	GParamSpec parent_instance;
};

struct _FsoGsmNetworkTimeReport {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FsoGsmNetworkTimeReportPrivate * priv;
	gint time;
	gint zone;
	gint timestamp;
	gint zonestamp;
};

struct _FsoGsmNetworkTimeReportClass {
	GTypeClass parent_class;
	void (*finalize) (FsoGsmNetworkTimeReport *self);
};

struct _FsoGsmParamSpecNetworkTimeReport {
	GParamSpec parent_instance;
};

struct _FsoGsmModemData {
	GObject parent_instance;
	FsoGsmModemDataPrivate * priv;
	gint alarmCleared;
	gboolean simHasReadySignal;
	guint simReadyTimeout;
	gint speakerVolumeMinimum;
	gint speakerVolumeMaximum;
	FreeSmartphoneGSMSIMAuthStatus simAuthStatus;
	gboolean simBuffersSms;
	GeeHashMap* simPhonebooks;
	gchar* charset;
	GeeHashMap* cmdSequences;
	gchar* functionality;
	gchar* simPin;
	gboolean keepRegistration;
	gboolean supportsGSM;
	gboolean supportsCDMA;
	gboolean supportsVoice;
	gboolean supportsCSD;
	gchar* supportsPDP;
	gchar* supportsFAX;
	GHashTable* simOperatorbook;
	gchar* simIssuer;
	gchar* pppCommand;
	gchar* pppPort;
	gchar** pppOptions;
	gint pppOptions_length1;
	FsoGsmContextParams* contextParams;
	gboolean roamingAllowed;
	gchar* atCommandCancelOutgoing;
	gchar* atCommandRejectIncoming;
	FsoGsmNetworkTimeReport* networkTimeReport;
};

struct _FsoGsmModemDataClass {
	GObjectClass parent_class;
};

struct _FsoGsmUnsolicitedResponseHandlerIface {
	GTypeInterface parent_iface;
	gboolean (*dispatch) (FsoGsmUnsolicitedResponseHandler* self, const gchar* prefix, const gchar* rhs, const gchar* pdu);
};

struct _FsoGsmLowLevelIface {
	GTypeInterface parent_iface;
	gboolean (*poweron) (FsoGsmLowLevel* self);
	gboolean (*poweroff) (FsoGsmLowLevel* self);
	gboolean (*suspend) (FsoGsmLowLevel* self);
	gboolean (*resume) (FsoGsmLowLevel* self);
};

struct _FsoGsmAbstractModem {
	FsoFrameworkAbstractObject parent_instance;
	FsoGsmAbstractModemPrivate * priv;
	FsoGsmModemStatus modem_status;
	FsoGsmModemNetworkStatus modem_network_status;
	FsoGsmModemData* modem_data;
	GeeHashMap* channels;
	GeeHashMap* commands;
	GeeHashMap* mediators;
	FsoGsmUnsolicitedResponseHandler* urc;
	FsoGsmLowLevel* lowlevel;
	FsoGsmModemStatus modem_status_before_suspend;
	guint modemSimTimeoutWatch;
};

struct _FsoGsmAbstractModemClass {
	FsoFrameworkAbstractObjectClass parent_class;
	void (*registerCustomMediators) (FsoGsmAbstractModem* self, GeeHashMap* mediators);
	void (*registerCustomAtCommands) (FsoGsmAbstractModem* self, GeeHashMap* commands);
	FsoGsmUnsolicitedResponseHandler* (*createUnsolicitedHandler) (FsoGsmAbstractModem* self);
	FsoGsmCallHandler* (*createCallHandler) (FsoGsmAbstractModem* self);
	FsoGsmSmsHandler* (*createSmsHandler) (FsoGsmAbstractModem* self);
	FsoGsmPhonebookHandler* (*createPhonebookHandler) (FsoGsmAbstractModem* self);
	FsoGsmWatchDog* (*createWatchDog) (FsoGsmAbstractModem* self);
	gboolean (*powerOn) (FsoGsmAbstractModem* self);
	void (*powerOff) (FsoGsmAbstractModem* self);
	void (*createChannels) (FsoGsmAbstractModem* self);
	void (*configureData) (FsoGsmAbstractModem* self);
	FsoGsmChannel* (*channelForCommand) (FsoGsmAbstractModem* self, FsoGsmAtCommand* command, const gchar* request);
	void (*open) (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*open_finish) (FsoGsmAbstractModem* self, GAsyncResult* _res_);
	void (*close) (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*close_finish) (FsoGsmAbstractModem* self, GAsyncResult* _res_);
	void (*suspend) (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*suspend_finish) (FsoGsmAbstractModem* self, GAsyncResult* _res_);
	void (*resume) (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*resume_finish) (FsoGsmAbstractModem* self, GAsyncResult* _res_);
	void (*injectResponse) (FsoGsmAbstractModem* self, const gchar* command, const gchar* channel, GError** error);
	void (*setFunctionality) (FsoGsmAbstractModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*setFunctionality_finish) (FsoGsmAbstractModem* self, GAsyncResult* _res_, GError** error);
	FsoGsmChannel* (*channel) (FsoGsmAbstractModem* self, const gchar* category);
	gchar* (*allocateDataPort) (FsoGsmAbstractModem* self);
	void (*releaseDataPort) (FsoGsmAbstractModem* self);
};

struct _FsoGsmAbstractModemPrivate {
	FsoFrameworkTransportSpec* _modem_transport_spec;
	FsoFrameworkTransportSpec* _data_transport_spec;
	GObject* _parent;
	FsoGsmCallHandler* _callhandler;
	FsoGsmSmsHandler* _smshandler;
	FsoGsmPhonebookHandler* _pbhandler;
	FsoGsmWatchDog* _watchdog;
	FsoGsmIPdpHandler* _pdphandler;
};

struct _fso_gsm_abstract_modem_checkChannelsForHangupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	FsoFrameworkLogger* _tmp0_;
	gboolean _tmp1_;
	GeeHashMap* _tmp2_;
	gpointer _tmp3_;
	FsoGsmChannel* mainchannel;
	FsoGsmChannel* _tmp4_;
	gboolean _tmp5_;
	FsoFrameworkLogger* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeSet* _tmp8_;
	GeeSet* _tmp9_;
	GeeSet* _tmp10_;
	GeeIterator* _tmp11_;
	GeeIterator* _tmp12_;
	GeeIterator* _cname_it;
	GeeIterator* _tmp13_;
	gboolean _tmp14_;
	GeeIterator* _tmp15_;
	gpointer _tmp16_;
	gchar* cname;
	const gchar* _tmp17_;
	FsoFrameworkLogger* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gboolean _tmp23_;
	GeeHashMap* _tmp24_;
	const gchar* _tmp25_;
	gpointer _tmp26_;
	FsoGsmChannel* channel;
	FsoGsmChannel* _tmp27_;
	gboolean _tmp28_;
	FsoFrameworkLogger* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	FsoGsmChannel* _tmp34_;
	gboolean _tmp35_;
	gboolean ok;
	gboolean _tmp36_;
	FsoFrameworkLogger* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
};

struct _FsoGsmAbstractModemOpenData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	gboolean result;
	FsoFrameworkLogger* _tmp0_;
	gboolean _tmp1_;
	FsoGsmLowLevel* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	FsoFrameworkLogger* _tmp5_;
	GeeHashMap* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gboolean _tmp13_;
	GeeHashMap* _tmp14_;
	GeeSet* _tmp15_;
	GeeSet* _tmp16_;
	GeeSet* _tmp17_;
	gboolean _tmp18_;
	gboolean _tmp19_;
	FsoFrameworkLogger* _tmp20_;
	GeeHashMap* _tmp21_;
	gpointer _tmp22_;
	FsoGsmChannel* mainchannel;
	FsoGsmChannel* _tmp23_;
	gboolean _tmp24_;
	gboolean ok;
	gboolean _tmp25_;
	FsoFrameworkLogger* _tmp26_;
	GeeHashMap* _tmp27_;
	GeeSet* _tmp28_;
	GeeSet* _tmp29_;
	GeeSet* _tmp30_;
	GeeIterator* _tmp31_;
	GeeIterator* _tmp32_;
	GeeIterator* _key_it;
	GeeIterator* _tmp33_;
	gboolean _tmp34_;
	GeeIterator* _tmp35_;
	gpointer _tmp36_;
	gchar* key;
	const gchar* _tmp37_;
	GeeHashMap* _tmp38_;
	const gchar* _tmp39_;
	gpointer _tmp40_;
	FsoGsmChannel* channel;
	FsoGsmChannel* _tmp41_;
	gboolean _tmp42_;
	gboolean open;
	gboolean _tmp43_;
	FsoFrameworkLogger* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	FsoGsmLowLevel* _tmp49_;
};

struct _FsoGsmAbstractModemCloseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	FsoGsmModemStatus _tmp0_;
	FsoFrameworkLogger* _tmp1_;
	gboolean _tmp2_;
	FsoFrameworkLogger* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	FsoGsmIPdpHandler* _tmp6_;
	FsoGsmIPdpHandler* _tmp7_;
	gboolean _tmp8_;
	FsoGsmIPdpHandler* _tmp9_;
	FsoGsmIPdpHandler* _tmp10_;
	FreeSmartphoneGSMContextStatus _tmp11_;
	FreeSmartphoneGSMContextStatus _tmp12_;
	FsoGsmIPdpHandler* _tmp13_;
	FsoGsmIPdpHandler* _tmp14_;
	FreeSmartphoneGSMContextStatus _tmp15_;
	FreeSmartphoneGSMContextStatus _tmp16_;
	gboolean _tmp17_;
	gboolean _tmp18_;
	FsoGsmIPdpHandler* _tmp19_;
	FsoGsmIPdpHandler* _tmp20_;
	GError* e;
	FsoFrameworkLogger* _tmp21_;
	GError* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GeeHashMap* _tmp27_;
	GeeCollection* _tmp28_;
	GeeCollection* _tmp29_;
	GeeCollection* channels;
	GeeCollection* _tmp30_;
	GeeIterator* _tmp31_;
	GeeIterator* _channel_it;
	GeeIterator* _tmp32_;
	gboolean _tmp33_;
	GeeIterator* _tmp34_;
	gpointer _tmp35_;
	FsoGsmChannel* channel;
	FsoGsmChannel* _tmp36_;
	FsoGsmLowLevel* _tmp37_;
	GError * _inner_error_;
};

struct _FsoGsmAbstractModemSuspendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	gboolean result;
	FsoGsmModemStatus _tmp0_;
	GeeHashMap* _tmp1_;
	GeeCollection* _tmp2_;
	GeeCollection* _tmp3_;
	GeeCollection* channels;
	GeeCollection* _tmp4_;
	GeeIterator* _tmp5_;
	GeeIterator* _channel_it;
	GeeIterator* _tmp6_;
	gboolean _tmp7_;
	GeeIterator* _tmp8_;
	gpointer _tmp9_;
	FsoGsmChannel* channel;
	FsoGsmChannel* _tmp10_;
	FsoGsmLowLevel* _tmp11_;
};

struct _FsoGsmAbstractModemResumeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	gboolean result;
	FsoGsmLowLevel* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeCollection* _tmp2_;
	GeeCollection* _tmp3_;
	GeeCollection* channels;
	GeeCollection* _tmp4_;
	GeeIterator* _tmp5_;
	GeeIterator* _channel_it;
	GeeIterator* _tmp6_;
	gboolean _tmp7_;
	GeeIterator* _tmp8_;
	gpointer _tmp9_;
	FsoGsmChannel* channel;
	FsoGsmChannel* _tmp10_;
	FsoGsmModemStatus _tmp11_;
};

struct _fso_gsm_abstract_modem_setFunctionalityData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	gchar* level;
	gboolean autoregister;
	gchar* pin;
	gpointer _tmp0_;
	FsoGsmDeviceSetFunctionality* m;
	FsoGsmDeviceSetFunctionality* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	FsoGsmWatchDog* _tmp5_;
	FsoGsmWatchDog* _tmp6_;
	GError * _inner_error_;
};

struct _fso_gsm_abstract_modem_processAtCommandAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	FsoGsmAtCommand* command;
	gchar* request;
	gint retries;
	gchar** result;
	gint result_length1;
	FsoGsmAtCommand* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmChannel* _tmp2_;
	FsoGsmAtChannel* channel;
	FsoGsmAtCommand* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gchar** _tmp7_;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	gchar** _tmp8_;
	gint _tmp8__length1;
};

struct _fso_gsm_abstract_modem_processAtPduCommandAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAbstractModem* self;
	FsoGsmAtCommand* command;
	gchar* request;
	gint retries;
	gchar** result;
	gint result_length1;
	FsoGsmAtCommand* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmChannel* _tmp2_;
	FsoGsmAtChannel* channel;
	const gchar* _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gchar** pdurequest;
	gint pdurequest_length1;
	gint _pdurequest_size_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	FsoGsmAtChannel* _tmp7_;
	FsoGsmAtCommand* _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	const gchar* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	gchar** _tmp13_;
	gchar** continuation;
	gint continuation_length1;
	gint _continuation_size_;
	gboolean _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gchar** _tmp16_;
	gint _tmp16__length1;
	const gchar* _tmp17_;
	gboolean _tmp18_;
	FsoGsmAtChannel* _tmp19_;
	FsoGsmAtCommand* _tmp20_;
	gchar** _tmp21_;
	gint _tmp21__length1;
	const gchar* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	gchar** _tmp25_;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	gchar** _tmp26_;
	gint _tmp26__length1;
};

struct _FsoGsmAbstractGsmModem {
	FsoGsmAbstractModem parent_instance;
	FsoGsmAbstractGsmModemPrivate * priv;
};

struct _FsoGsmAbstractGsmModemClass {
	FsoGsmAbstractModemClass parent_class;
};

struct _FsoGsmAbstractCdmaModem {
	FsoGsmAbstractModem parent_instance;
	FsoGsmAbstractCdmaModemPrivate * priv;
};

struct _FsoGsmAbstractCdmaModemClass {
	FsoGsmAbstractModemClass parent_class;
};

struct _FsoGsmNullModem {
	FsoGsmAbstractModem parent_instance;
	FsoGsmNullModemPrivate * priv;
};

struct _FsoGsmNullModemClass {
	FsoGsmAbstractModemClass parent_class;
};


extern FsoGsmModem* fso_gsm_theModem;
FsoGsmModem* fso_gsm_theModem = NULL;
extern GList* fso_gsm_theServiceDependencies;
GList* fso_gsm_theServiceDependencies = NULL;
static gpointer fso_gsm_phonebook_params_parent_class = NULL;
static gpointer fso_gsm_context_params_parent_class = NULL;
static gpointer fso_gsm_network_time_report_parent_class = NULL;
static gpointer fso_gsm_modem_data_parent_class = NULL;
static gpointer fso_gsm_abstract_modem_parent_class = NULL;
static FsoGsmModemIface* fso_gsm_abstract_modem_fso_gsm_modem_parent_iface = NULL;
static gpointer fso_gsm_abstract_gsm_modem_parent_class = NULL;
static gpointer fso_gsm_abstract_cdma_modem_parent_class = NULL;
static gpointer fso_gsm_null_modem_parent_class = NULL;

GType fso_gsm_channel_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_status_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_network_status_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_at_command_sequence_ref (gpointer instance);
void fso_gsm_at_command_sequence_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_at_command_sequence (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_at_command_sequence (GValue* value, gpointer v_object);
void fso_gsm_value_take_at_command_sequence (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_at_command_sequence (const GValue* value);
GType fso_gsm_at_command_sequence_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_command_queue_command_get_type (void) G_GNUC_CONST;
GQuark fso_gsm_at_command_error_quark (void);
GType fso_gsm_constants_at_response_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_data_get_type (void) G_GNUC_CONST;
GType fso_gsm_call_info_get_type (void) G_GNUC_CONST;
GType fso_gsm_call_handler_get_type (void) G_GNUC_CONST;
gpointer wrap_hex_pdu_ref (gpointer instance);
void wrap_hex_pdu_unref (gpointer instance);
GParamSpec* param_spec_wrap_hex_pdu (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_wrap_hex_pdu (GValue* value, gpointer v_object);
void value_take_wrap_hex_pdu (GValue* value, gpointer v_object);
gpointer value_get_wrap_hex_pdu (const GValue* value);
GType wrap_hex_pdu_get_type (void) G_GNUC_CONST;
GType fso_gsm_isms_storage_get_type (void) G_GNUC_CONST;
GType fso_gsm_sms_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_phonebook_storage_get_type (void) G_GNUC_CONST;
GType fso_gsm_phonebook_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_watch_dog_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_route_info_ref (gpointer instance);
void fso_gsm_route_info_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_route_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_route_info (GValue* value, gpointer v_object);
void fso_gsm_value_take_route_info (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_route_info (const GValue* value);
GType fso_gsm_route_info_get_type (void) G_GNUC_CONST;
GType fso_gsm_ipdp_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_get_type (void) G_GNUC_CONST;
#define FSO_GSM_CONFIG_SECTION "fsogsm"
#define FSO_GSM_PPPD_DEFAULT_COMMAND "/usr/sbin/pppd"
gpointer fso_gsm_phonebook_params_ref (gpointer instance);
void fso_gsm_phonebook_params_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_phonebook_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_phonebook_params (GValue* value, gpointer v_object);
void fso_gsm_value_take_phonebook_params (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_phonebook_params (const GValue* value);
GType fso_gsm_phonebook_params_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_PHONEBOOK_PARAMS_DUMMY_PROPERTY
};
FsoGsmPhonebookParams* fso_gsm_phonebook_params_new (gint min, gint max);
FsoGsmPhonebookParams* fso_gsm_phonebook_params_construct (GType object_type, gint min, gint max);
static void fso_gsm_phonebook_params_finalize (FsoGsmPhonebookParams* obj);
gpointer fso_gsm_context_params_ref (gpointer instance);
void fso_gsm_context_params_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_context_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_context_params (GValue* value, gpointer v_object);
void fso_gsm_value_take_context_params (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_context_params (const GValue* value);
GType fso_gsm_context_params_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_CONTEXT_PARAMS_DUMMY_PROPERTY
};
FsoGsmContextParams* fso_gsm_context_params_new (const gchar* apn, const gchar* username, const gchar* password);
FsoGsmContextParams* fso_gsm_context_params_construct (GType object_type, const gchar* apn, const gchar* username, const gchar* password);
static void fso_gsm_context_params_finalize (FsoGsmContextParams* obj);
gpointer fso_gsm_network_time_report_ref (gpointer instance);
void fso_gsm_network_time_report_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_network_time_report (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_network_time_report (GValue* value, gpointer v_object);
void fso_gsm_value_take_network_time_report (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_network_time_report (const GValue* value);
GType fso_gsm_network_time_report_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_NETWORK_TIME_REPORT_DUMMY_PROPERTY
};
FsoGsmNetworkTimeReport* fso_gsm_network_time_report_new (void);
FsoGsmNetworkTimeReport* fso_gsm_network_time_report_construct (GType object_type);
void fso_gsm_network_time_report_setTime (FsoGsmNetworkTimeReport* self, gint time);
static void fso_gsm_network_time_report_sendUpdateSignal (FsoGsmNetworkTimeReport* self);
void fso_gsm_network_time_report_setZone (FsoGsmNetworkTimeReport* self, gint zone);
void fso_gsm_network_time_report_setTimeAndZone (FsoGsmNetworkTimeReport* self, gint time, gint zone);
gpointer fso_gsm_modem_theDevice (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func);
static void fso_gsm_network_time_report_finalize (FsoGsmNetworkTimeReport* obj);
void fso_gsm_modem_open (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_modem_open_finish (FsoGsmModem* self, GAsyncResult* _res_);
void fso_gsm_modem_close (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_modem_close_finish (FsoGsmModem* self, GAsyncResult* _res_);
void fso_gsm_modem_suspend (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_modem_suspend_finish (FsoGsmModem* self, GAsyncResult* _res_);
void fso_gsm_modem_resume (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_modem_resume_finish (FsoGsmModem* self, GAsyncResult* _res_);
void fso_gsm_modem_injectResponse (FsoGsmModem* self, const gchar* command, const gchar* channel, GError** error);
void fso_gsm_modem_setFunctionality (FsoGsmModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_modem_setFunctionality_finish (FsoGsmModem* self, GAsyncResult* _res_, GError** error);
void fso_gsm_modem_registerChannel (FsoGsmModem* self, const gchar* name, FsoGsmChannel* channel);
void fso_gsm_modem_advanceToState (FsoGsmModem* self, FsoGsmModemStatus status, gboolean force);
void fso_gsm_modem_advanceNetworkState (FsoGsmModem* self, FsoGsmModemNetworkStatus status);
FsoGsmAtCommandSequence* fso_gsm_modem_atCommandSequence (FsoGsmModem* self, const gchar* channel, const gchar* purpose);
gpointer fso_gsm_modem_createMediator (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error);
gpointer fso_gsm_modem_createAtCommand (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command);
gchar* fso_gsm_modem_allocateDataPort (FsoGsmModem* self);
void fso_gsm_modem_releaseDataPort (FsoGsmModem* self);
void fso_gsm_modem_processAtCommandAsync (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
gchar** fso_gsm_modem_processAtCommandAsync_finish (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1);
void fso_gsm_modem_processAtPduCommandAsync (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
gchar** fso_gsm_modem_processAtPduCommandAsync_finish (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1);
void fso_gsm_modem_sendAtCommand (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries);
FsoGsmChannel* fso_gsm_modem_channel (FsoGsmModem* self, const gchar* category);
FsoGsmModemStatus fso_gsm_modem_status (FsoGsmModem* self);
FsoGsmModemNetworkStatus fso_gsm_modem_network_status (FsoGsmModem* self);
FreeSmartphoneGSMDeviceStatus fso_gsm_modem_externalStatus (FsoGsmModem* self);
FsoGsmModemData* fso_gsm_modem_data (FsoGsmModem* self);
void fso_gsm_modem_registerAtCommandSequence (FsoGsmModem* self, const gchar* channel, const gchar* purpose, FsoGsmAtCommandSequence* sequence);
gboolean fso_gsm_modem_isAlive (FsoGsmModem* self);
#define FSO_GSM_MODEM_DEFAULT_RETRIES 3
GObject* fso_gsm_modem_get_parent (FsoGsmModem* self);
void fso_gsm_modem_set_parent (FsoGsmModem* self, GObject* value);
FsoGsmCallHandler* fso_gsm_modem_get_callhandler (FsoGsmModem* self);
void fso_gsm_modem_set_callhandler (FsoGsmModem* self, FsoGsmCallHandler* value);
FsoGsmSmsHandler* fso_gsm_modem_get_smshandler (FsoGsmModem* self);
void fso_gsm_modem_set_smshandler (FsoGsmModem* self, FsoGsmSmsHandler* value);
FsoGsmPhonebookHandler* fso_gsm_modem_get_pbhandler (FsoGsmModem* self);
void fso_gsm_modem_set_pbhandler (FsoGsmModem* self, FsoGsmPhonebookHandler* value);
FsoGsmWatchDog* fso_gsm_modem_get_watchdog (FsoGsmModem* self);
void fso_gsm_modem_set_watchdog (FsoGsmModem* self, FsoGsmWatchDog* value);
FsoGsmIPdpHandler* fso_gsm_modem_get_pdphandler (FsoGsmModem* self);
void fso_gsm_modem_set_pdphandler (FsoGsmModem* self, FsoGsmIPdpHandler* value);
enum  {
	FSO_GSM_MODEM_DATA_DUMMY_PROPERTY
};
FsoGsmModemData* fso_gsm_modem_data_new (void);
FsoGsmModemData* fso_gsm_modem_data_construct (GType object_type);
static void fso_gsm_modem_data_finalize (GObject* obj);
GType fso_gsm_abstract_modem_get_type (void) G_GNUC_CONST;
GType fso_gsm_unsolicited_response_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_low_level_get_type (void) G_GNUC_CONST;
#define FSO_GSM_ABSTRACT_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_GSM_TYPE_ABSTRACT_MODEM, FsoGsmAbstractModemPrivate))
enum  {
	FSO_GSM_ABSTRACT_MODEM_DUMMY_PROPERTY,
	FSO_GSM_ABSTRACT_MODEM_MODEM_TRANSPORT_SPEC,
	FSO_GSM_ABSTRACT_MODEM_DATA_TRANSPORT_SPEC,
	FSO_GSM_ABSTRACT_MODEM_PARENT,
	FSO_GSM_ABSTRACT_MODEM_CALLHANDLER,
	FSO_GSM_ABSTRACT_MODEM_SMSHANDLER,
	FSO_GSM_ABSTRACT_MODEM_PBHANDLER,
	FSO_GSM_ABSTRACT_MODEM_WATCHDOG,
	FSO_GSM_ABSTRACT_MODEM_PDPHANDLER
};
static void fso_gsm_abstract_modem_initLowlevel (FsoGsmAbstractModem* self);
FsoGsmNullLowLevel* fso_gsm_null_low_level_new (void);
FsoGsmNullLowLevel* fso_gsm_null_low_level_construct (GType object_type);
GType fso_gsm_null_low_level_get_type (void) G_GNUC_CONST;
static void fso_gsm_abstract_modem_initPdpHandler (FsoGsmAbstractModem* self);
FsoGsmNullPdpHandler* fso_gsm_null_pdp_handler_new (void);
FsoGsmNullPdpHandler* fso_gsm_null_pdp_handler_construct (GType object_type);
GType fso_gsm_null_pdp_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_pdp_handler_get_type (void) G_GNUC_CONST;
static void fso_gsm_abstract_modem_initData (FsoGsmAbstractModem* self);
FsoFrameworkTransportSpec* fso_gsm_abstract_modem_get_data_transport_spec (FsoGsmAbstractModem* self);
FsoGsmAtCommandSequence* fso_gsm_at_command_sequence_new (gchar** commands, int commands_length1);
FsoGsmAtCommandSequence* fso_gsm_at_command_sequence_construct (GType object_type, gchar** commands, int commands_length1);
void fso_gsm_at_command_sequence_append (FsoGsmAtCommandSequence* self, gchar** commands, int commands_length1);
void fso_gsm_abstract_modem_configureData (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_registerHandlers (FsoGsmAbstractModem* self);
FsoGsmUnsolicitedResponseHandler* fso_gsm_abstract_modem_createUnsolicitedHandler (FsoGsmAbstractModem* self);
FsoGsmCallHandler* fso_gsm_abstract_modem_createCallHandler (FsoGsmAbstractModem* self);
FsoGsmSmsHandler* fso_gsm_abstract_modem_createSmsHandler (FsoGsmAbstractModem* self);
FsoGsmPhonebookHandler* fso_gsm_abstract_modem_createPhonebookHandler (FsoGsmAbstractModem* self);
FsoGsmWatchDog* fso_gsm_abstract_modem_createWatchDog (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_registerMediators (FsoGsmAbstractModem* self);
void fso_gsm_registerGenericAtMediators (GeeHashMap* table);
void fso_gsm_abstract_modem_registerCustomMediators (FsoGsmAbstractModem* self, GeeHashMap* mediators);
static void fso_gsm_abstract_modem_registerAtCommands (FsoGsmAbstractModem* self);
void fso_gsm_registerGenericAtCommands (GeeHashMap* table);
void fso_gsm_abstract_modem_registerCustomAtCommands (FsoGsmAbstractModem* self, GeeHashMap* commands);
static void fso_gsm_abstract_modem_real_registerAtCommandSequence (FsoGsmModem* base, const gchar* channel, const gchar* purpose, FsoGsmAtCommandSequence* sequence);
static void fso_gsm_abstract_modem_checkChannelsForHangup_data_free (gpointer _data);
static void fso_gsm_abstract_modem_checkChannelsForHangup (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_abstract_modem_checkChannelsForHangup_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_);
static gboolean fso_gsm_abstract_modem_checkChannelsForHangup_co (fso_gsm_abstract_modem_checkChannelsForHangupData* _data_);
gboolean fso_gsm_channel_isActive (FsoGsmChannel* self);
void fso_gsm_abstract_modem_close (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_close_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_);
static void fso_gsm_abstract_modem_checkChannelsForHangup_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_abstract_modem_onChannelHangup (FsoGsmAbstractModem* self);
static gboolean __lambda5_ (FsoGsmAbstractModem* self);
static gboolean ___lambda5__gsource_func (gpointer self);
static void fso_gsm_abstract_modem_real_registerCustomMediators (FsoGsmAbstractModem* self, GeeHashMap* mediators);
static void fso_gsm_abstract_modem_real_registerCustomAtCommands (FsoGsmAbstractModem* self, GeeHashMap* commands);
static FsoGsmUnsolicitedResponseHandler* fso_gsm_abstract_modem_real_createUnsolicitedHandler (FsoGsmAbstractModem* self);
FsoGsmAtUnsolicitedResponseHandler* fso_gsm_at_unsolicited_response_handler_new (void);
FsoGsmAtUnsolicitedResponseHandler* fso_gsm_at_unsolicited_response_handler_construct (GType object_type);
GType fso_gsm_base_unsolicited_response_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_unsolicited_response_handler_get_type (void) G_GNUC_CONST;
static FsoGsmCallHandler* fso_gsm_abstract_modem_real_createCallHandler (FsoGsmAbstractModem* self);
FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_new (void);
FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_construct (GType object_type);
GType fso_gsm_abstract_call_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_generic_at_call_handler_get_type (void) G_GNUC_CONST;
static FsoGsmSmsHandler* fso_gsm_abstract_modem_real_createSmsHandler (FsoGsmAbstractModem* self);
FsoGsmAtSmsHandler* fso_gsm_at_sms_handler_new (void);
FsoGsmAtSmsHandler* fso_gsm_at_sms_handler_construct (GType object_type);
GType fso_gsm_abstract_sms_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_sms_handler_get_type (void) G_GNUC_CONST;
static FsoGsmPhonebookHandler* fso_gsm_abstract_modem_real_createPhonebookHandler (FsoGsmAbstractModem* self);
FsoGsmAtPhonebookHandler* fso_gsm_at_phonebook_handler_new (void);
FsoGsmAtPhonebookHandler* fso_gsm_at_phonebook_handler_construct (GType object_type);
GType fso_gsm_at_phonebook_handler_get_type (void) G_GNUC_CONST;
static FsoGsmWatchDog* fso_gsm_abstract_modem_real_createWatchDog (FsoGsmAbstractModem* self);
FsoGsmGenericWatchDog* fso_gsm_generic_watch_dog_new (void);
FsoGsmGenericWatchDog* fso_gsm_generic_watch_dog_construct (GType object_type);
GType fso_gsm_generic_watch_dog_get_type (void) G_GNUC_CONST;
gboolean fso_gsm_abstract_modem_powerOn (FsoGsmAbstractModem* self);
static gboolean fso_gsm_abstract_modem_real_powerOn (FsoGsmAbstractModem* self);
void fso_gsm_abstract_modem_powerOff (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_real_powerOff (FsoGsmAbstractModem* self);
void fso_gsm_abstract_modem_createChannels (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_real_createChannels (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_real_configureData (FsoGsmAbstractModem* self);
FsoGsmChannel* fso_gsm_abstract_modem_channelForCommand (FsoGsmAbstractModem* self, FsoGsmAtCommand* command, const gchar* request);
static FsoGsmChannel* fso_gsm_abstract_modem_real_channelForCommand (FsoGsmAbstractModem* self, FsoGsmAtCommand* command, const gchar* request);
static void fso_gsm_abstract_modem_real_open_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_open (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_open (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_abstract_modem_open_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_);
static gboolean fso_gsm_abstract_modem_real_open_co (FsoGsmAbstractModemOpenData* _data_);
gboolean fso_gsm_low_level_poweron (FsoGsmLowLevel* self);
static void fso_gsm_abstract_modem_open_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean fso_gsm_low_level_poweroff (FsoGsmLowLevel* self);
static void fso_gsm_abstract_modem_real_close_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_close (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_abstract_modem_real_close_co (FsoGsmAbstractModemCloseData* _data_);
static gboolean _fso_gsm_abstract_modem_real_close_co_gsource_func (gpointer self);
FreeSmartphoneGSMContextStatus fso_gsm_ipdp_handler_get_status (FsoGsmIPdpHandler* self);
void fso_gsm_ipdp_handler_deactivate (FsoGsmIPdpHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_ipdp_handler_deactivate_finish (FsoGsmIPdpHandler* self, GAsyncResult* _res_, GError** error);
static void fso_gsm_abstract_modem_close_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_abstract_modem_real_suspend_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_suspend (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_suspend (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_abstract_modem_suspend_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_);
static gboolean fso_gsm_abstract_modem_real_suspend_co (FsoGsmAbstractModemSuspendData* _data_);
void fso_gsm_channel_suspend (FsoGsmChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_channel_suspend_finish (FsoGsmChannel* self, GAsyncResult* _res_);
static void fso_gsm_abstract_modem_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean fso_gsm_low_level_suspend (FsoGsmLowLevel* self);
static void fso_gsm_abstract_modem_real_resume_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_resume (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_resume (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_abstract_modem_resume_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_);
static gboolean fso_gsm_abstract_modem_real_resume_co (FsoGsmAbstractModemResumeData* _data_);
gboolean fso_gsm_low_level_resume (FsoGsmLowLevel* self);
void fso_gsm_channel_resume (FsoGsmChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean fso_gsm_channel_resume_finish (FsoGsmChannel* self, GAsyncResult* _res_);
static void fso_gsm_abstract_modem_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_abstract_modem_injectResponse (FsoGsmAbstractModem* self, const gchar* command, const gchar* channel, GError** error);
static void fso_gsm_abstract_modem_real_injectResponse (FsoGsmAbstractModem* self, const gchar* command, const gchar* channel, GError** error);
void fso_gsm_channel_injectResponse (FsoGsmChannel* self, const gchar* response);
static void fso_gsm_abstract_modem_real_setFunctionality_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_setFunctionality (FsoGsmAbstractModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_setFunctionality (FsoGsmAbstractModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_modem_setFunctionality_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_, GError** error);
static gboolean fso_gsm_abstract_modem_real_setFunctionality_co (fso_gsm_abstract_modem_setFunctionalityData* _data_);
GType fso_gsm_abstract_mediator_get_type (void) G_GNUC_CONST;
GType fso_gsm_device_set_functionality_get_type (void) G_GNUC_CONST;
void fso_gsm_device_set_functionality_run (FsoGsmDeviceSetFunctionality* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_device_set_functionality_run_finish (FsoGsmDeviceSetFunctionality* self, GAsyncResult* _res_, GError** error);
static void fso_gsm_abstract_modem_setFunctionality_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_watch_dog_check (FsoGsmWatchDog* self);
static gpointer fso_gsm_abstract_modem_real_theDevice (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func);
static FsoGsmModemStatus fso_gsm_abstract_modem_real_status (FsoGsmModem* base);
static FsoGsmModemNetworkStatus fso_gsm_abstract_modem_real_network_status (FsoGsmModem* base);
static FsoGsmModemData* fso_gsm_abstract_modem_real_data (FsoGsmModem* base);
FsoGsmChannel* fso_gsm_abstract_modem_channel (FsoGsmAbstractModem* self, const gchar* category);
static FsoGsmChannel* fso_gsm_abstract_modem_real_channel (FsoGsmAbstractModem* self, const gchar* category);
static gpointer fso_gsm_abstract_modem_real_createMediator (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error);
static gpointer fso_gsm_abstract_modem_real_createAtCommand (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command);
gchar* fso_gsm_abstract_modem_allocateDataPort (FsoGsmAbstractModem* self);
static gchar* fso_gsm_abstract_modem_real_allocateDataPort (FsoGsmAbstractModem* self);
void fso_gsm_abstract_modem_releaseDataPort (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_real_releaseDataPort (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_real_processAtCommandAsync_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_processAtCommandAsync (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_abstract_modem_real_processAtCommandAsync_co (fso_gsm_abstract_modem_processAtCommandAsyncData* _data_);
GType fso_gsm_at_command_queue_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_channel_get_type (void) G_GNUC_CONST;
void fso_gsm_at_command_queue_enqueueAsync (FsoGsmAtCommandQueue* self, FsoGsmAtCommandQueueCommand* command, const gchar* request, gint retries, gint timeout, GAsyncReadyCallback _callback_, gpointer _user_data_);
gchar** fso_gsm_at_command_queue_enqueueAsync_finish (FsoGsmAtCommandQueue* self, GAsyncResult* _res_, int* result_length1);
static void fso_gsm_abstract_modem_processAtCommandAsync_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_abstract_modem_real_sendAtCommand (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries);
void fso_gsm_at_command_queue_enqueue (FsoGsmAtCommandQueue* self, FsoGsmAtCommandQueueCommand* command, const gchar* request, gint retries);
static void fso_gsm_abstract_modem_real_processAtPduCommandAsync_data_free (gpointer _data);
static void fso_gsm_abstract_modem_real_processAtPduCommandAsync (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_abstract_modem_real_processAtPduCommandAsync_co (fso_gsm_abstract_modem_processAtPduCommandAsyncData* _data_);
static void fso_gsm_abstract_modem_processAtPduCommandAsync_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_abstract_modem_processUnsolicitedResponse (FsoGsmAbstractModem* self, const gchar* prefix, const gchar* righthandside, const gchar* pdu);
gboolean fso_gsm_unsolicited_response_handler_dispatch (FsoGsmUnsolicitedResponseHandler* self, const gchar* prefix, const gchar* rhs, const gchar* pdu);
GType fso_gsm_abstract_modem_mediatorFactory (FsoGsmAbstractModem* self, GType mediator, GError** error);
FsoGsmAtCommand* fso_gsm_abstract_modem_atCommandFactory (FsoGsmAbstractModem* self, const gchar* command, GError** error);
static void fso_gsm_abstract_modem_real_registerChannel (FsoGsmModem* base, const gchar* name, FsoGsmChannel* channel);
static void _fso_gsm_abstract_modem_onChannelHangup_fso_gsm_channel_hangup (FsoGsmChannel* _sender, gpointer self);
static void _fso_gsm_abstract_modem_processUnsolicitedResponse_fso_framework_command_queue_unsolicited_handler (const gchar* prefix, const gchar* response, const gchar* pdu, gpointer self);
static void fso_gsm_abstract_modem_real_advanceToState (FsoGsmModem* base, FsoGsmModemStatus next, gboolean force);
const gchar* fso_gsm_modem_status_to_string (FsoGsmModemStatus self);
static gboolean ____lambda4_ (FsoGsmAbstractModem* self);
static gboolean _____lambda4__gsource_func (gpointer self);
static void fso_gsm_abstract_modem_real_advanceNetworkState (FsoGsmModem* base, FsoGsmModemNetworkStatus state);
const gchar* fso_gsm_modem_network_status_to_string (FsoGsmModemNetworkStatus self);
static FsoGsmAtCommandSequence* fso_gsm_abstract_modem_real_atCommandSequence (FsoGsmModem* base, const gchar* channel, const gchar* purpose);
static FreeSmartphoneGSMDeviceStatus fso_gsm_abstract_modem_real_externalStatus (FsoGsmModem* base);
static gboolean fso_gsm_abstract_modem_real_isAlive (FsoGsmModem* base);
FsoGsmAbstractModem* fso_gsm_abstract_modem_construct (GType object_type);
FsoFrameworkTransportSpec* fso_gsm_abstract_modem_get_modem_transport_spec (FsoGsmAbstractModem* self);
static void fso_gsm_abstract_modem_set_modem_transport_spec (FsoGsmAbstractModem* self, FsoFrameworkTransportSpec* value);
static void fso_gsm_abstract_modem_set_data_transport_spec (FsoGsmAbstractModem* self, FsoFrameworkTransportSpec* value);
static GObject * fso_gsm_abstract_modem_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void fso_gsm_abstract_modem_finalize (GObject* obj);
static void _vala_fso_gsm_abstract_modem_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_fso_gsm_abstract_modem_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType fso_gsm_abstract_gsm_modem_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_ABSTRACT_GSM_MODEM_DUMMY_PROPERTY
};
FsoGsmAbstractGsmModem* fso_gsm_abstract_gsm_modem_construct (GType object_type);
GType fso_gsm_abstract_cdma_modem_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_ABSTRACT_CDMA_MODEM_DUMMY_PROPERTY
};
FsoGsmAbstractCdmaModem* fso_gsm_abstract_cdma_modem_construct (GType object_type);
GType fso_gsm_null_modem_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_NULL_MODEM_DUMMY_PROPERTY
};
static gchar* fso_gsm_null_modem_real_repr (FsoFrameworkAbstractObject* base);
static FsoGsmChannel* fso_gsm_null_modem_real_channelForCommand (FsoGsmAbstractModem* base, FsoGsmAtCommand* command, const gchar* query);
FsoGsmNullModem* fso_gsm_null_modem_new (void);
FsoGsmNullModem* fso_gsm_null_modem_construct (GType object_type);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


FsoGsmPhonebookParams* fso_gsm_phonebook_params_construct (GType object_type, gint min, gint max) {
	FsoGsmPhonebookParams* self = NULL;
	gint _tmp0_;
	gint _tmp1_;
	self = (FsoGsmPhonebookParams*) g_type_create_instance (object_type);
	_tmp0_ = min;
	self->min = _tmp0_;
	_tmp1_ = max;
	self->max = _tmp1_;
	return self;
}


FsoGsmPhonebookParams* fso_gsm_phonebook_params_new (gint min, gint max) {
	return fso_gsm_phonebook_params_construct (FSO_GSM_TYPE_PHONEBOOK_PARAMS, min, max);
}


static void fso_gsm_value_phonebook_params_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void fso_gsm_value_phonebook_params_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		fso_gsm_phonebook_params_unref (value->data[0].v_pointer);
	}
}


static void fso_gsm_value_phonebook_params_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = fso_gsm_phonebook_params_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer fso_gsm_value_phonebook_params_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* fso_gsm_value_phonebook_params_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FsoGsmPhonebookParams* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = fso_gsm_phonebook_params_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* fso_gsm_value_phonebook_params_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FsoGsmPhonebookParams** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = fso_gsm_phonebook_params_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* fso_gsm_param_spec_phonebook_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FsoGsmParamSpecPhonebookParams* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FSO_GSM_TYPE_PHONEBOOK_PARAMS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer fso_gsm_value_get_phonebook_params (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_PHONEBOOK_PARAMS), NULL);
	return value->data[0].v_pointer;
}


void fso_gsm_value_set_phonebook_params (GValue* value, gpointer v_object) {
	FsoGsmPhonebookParams* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_PHONEBOOK_PARAMS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_PHONEBOOK_PARAMS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		fso_gsm_phonebook_params_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_phonebook_params_unref (old);
	}
}


void fso_gsm_value_take_phonebook_params (GValue* value, gpointer v_object) {
	FsoGsmPhonebookParams* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_PHONEBOOK_PARAMS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_PHONEBOOK_PARAMS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_phonebook_params_unref (old);
	}
}


static void fso_gsm_phonebook_params_class_init (FsoGsmPhonebookParamsClass * klass) {
	fso_gsm_phonebook_params_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_PHONEBOOK_PARAMS_CLASS (klass)->finalize = fso_gsm_phonebook_params_finalize;
}


static void fso_gsm_phonebook_params_instance_init (FsoGsmPhonebookParams * self) {
	self->ref_count = 1;
}


static void fso_gsm_phonebook_params_finalize (FsoGsmPhonebookParams* obj) {
	FsoGsmPhonebookParams * self;
	self = FSO_GSM_PHONEBOOK_PARAMS (obj);
}


/**
 * @class PhonebookParams
 *
 * Helper class for a set of phonebook parameters
 **/
GType fso_gsm_phonebook_params_get_type (void) {
	static volatile gsize fso_gsm_phonebook_params_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_phonebook_params_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { fso_gsm_value_phonebook_params_init, fso_gsm_value_phonebook_params_free_value, fso_gsm_value_phonebook_params_copy_value, fso_gsm_value_phonebook_params_peek_pointer, "p", fso_gsm_value_phonebook_params_collect_value, "p", fso_gsm_value_phonebook_params_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmPhonebookParamsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_phonebook_params_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmPhonebookParams), 0, (GInstanceInitFunc) fso_gsm_phonebook_params_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType fso_gsm_phonebook_params_type_id;
		fso_gsm_phonebook_params_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FsoGsmPhonebookParams", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&fso_gsm_phonebook_params_type_id__volatile, fso_gsm_phonebook_params_type_id);
	}
	return fso_gsm_phonebook_params_type_id__volatile;
}


gpointer fso_gsm_phonebook_params_ref (gpointer instance) {
	FsoGsmPhonebookParams* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void fso_gsm_phonebook_params_unref (gpointer instance) {
	FsoGsmPhonebookParams* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FSO_GSM_PHONEBOOK_PARAMS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


FsoGsmContextParams* fso_gsm_context_params_construct (GType object_type, const gchar* apn, const gchar* username, const gchar* password) {
	FsoGsmContextParams* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_val_if_fail (apn != NULL, NULL);
	g_return_val_if_fail (username != NULL, NULL);
	g_return_val_if_fail (password != NULL, NULL);
	self = (FsoGsmContextParams*) g_type_create_instance (object_type);
	_tmp0_ = apn;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->apn);
	self->apn = _tmp1_;
	_tmp2_ = username;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->username);
	self->username = _tmp3_;
	_tmp4_ = password;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (self->password);
	self->password = _tmp5_;
	return self;
}


FsoGsmContextParams* fso_gsm_context_params_new (const gchar* apn, const gchar* username, const gchar* password) {
	return fso_gsm_context_params_construct (FSO_GSM_TYPE_CONTEXT_PARAMS, apn, username, password);
}


static void fso_gsm_value_context_params_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void fso_gsm_value_context_params_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		fso_gsm_context_params_unref (value->data[0].v_pointer);
	}
}


static void fso_gsm_value_context_params_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = fso_gsm_context_params_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer fso_gsm_value_context_params_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* fso_gsm_value_context_params_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FsoGsmContextParams* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = fso_gsm_context_params_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* fso_gsm_value_context_params_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FsoGsmContextParams** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = fso_gsm_context_params_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* fso_gsm_param_spec_context_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FsoGsmParamSpecContextParams* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FSO_GSM_TYPE_CONTEXT_PARAMS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer fso_gsm_value_get_context_params (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_CONTEXT_PARAMS), NULL);
	return value->data[0].v_pointer;
}


void fso_gsm_value_set_context_params (GValue* value, gpointer v_object) {
	FsoGsmContextParams* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_CONTEXT_PARAMS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_CONTEXT_PARAMS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		fso_gsm_context_params_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_context_params_unref (old);
	}
}


void fso_gsm_value_take_context_params (GValue* value, gpointer v_object) {
	FsoGsmContextParams* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_CONTEXT_PARAMS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_CONTEXT_PARAMS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_context_params_unref (old);
	}
}


static void fso_gsm_context_params_class_init (FsoGsmContextParamsClass * klass) {
	fso_gsm_context_params_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_CONTEXT_PARAMS_CLASS (klass)->finalize = fso_gsm_context_params_finalize;
}


static void fso_gsm_context_params_instance_init (FsoGsmContextParams * self) {
	self->ref_count = 1;
}


static void fso_gsm_context_params_finalize (FsoGsmContextParams* obj) {
	FsoGsmContextParams * self;
	self = FSO_GSM_CONTEXT_PARAMS (obj);
	_g_free0 (self->apn);
	_g_free0 (self->username);
	_g_free0 (self->password);
}


GType fso_gsm_context_params_get_type (void) {
	static volatile gsize fso_gsm_context_params_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_context_params_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { fso_gsm_value_context_params_init, fso_gsm_value_context_params_free_value, fso_gsm_value_context_params_copy_value, fso_gsm_value_context_params_peek_pointer, "p", fso_gsm_value_context_params_collect_value, "p", fso_gsm_value_context_params_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmContextParamsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_context_params_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmContextParams), 0, (GInstanceInitFunc) fso_gsm_context_params_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType fso_gsm_context_params_type_id;
		fso_gsm_context_params_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FsoGsmContextParams", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&fso_gsm_context_params_type_id__volatile, fso_gsm_context_params_type_id);
	}
	return fso_gsm_context_params_type_id__volatile;
}


gpointer fso_gsm_context_params_ref (gpointer instance) {
	FsoGsmContextParams* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void fso_gsm_context_params_unref (gpointer instance) {
	FsoGsmContextParams* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FSO_GSM_CONTEXT_PARAMS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


FsoGsmNetworkTimeReport* fso_gsm_network_time_report_construct (GType object_type) {
	FsoGsmNetworkTimeReport* self = NULL;
	self = (FsoGsmNetworkTimeReport*) g_type_create_instance (object_type);
	self->time = 0;
	self->zone = 10000;
	self->timestamp = 0;
	self->zonestamp = 0;
	return self;
}


FsoGsmNetworkTimeReport* fso_gsm_network_time_report_new (void) {
	return fso_gsm_network_time_report_construct (FSO_GSM_TYPE_NETWORK_TIME_REPORT);
}


void fso_gsm_network_time_report_setTime (FsoGsmNetworkTimeReport* self, gint time) {
	gint _tmp0_;
	GTimeVal _tmp1_ = {0};
	glong _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = time;
	self->time = _tmp0_;
	g_get_current_time (&_tmp1_);
	_tmp2_ = _tmp1_.tv_sec;
	self->timestamp = (gint) _tmp2_;
	fso_gsm_network_time_report_sendUpdateSignal (self);
}


void fso_gsm_network_time_report_setZone (FsoGsmNetworkTimeReport* self, gint zone) {
	gint _tmp0_;
	GTimeVal _tmp1_ = {0};
	glong _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = zone;
	self->zone = _tmp0_;
	g_get_current_time (&_tmp1_);
	_tmp2_ = _tmp1_.tv_sec;
	self->zonestamp = (gint) _tmp2_;
	fso_gsm_network_time_report_sendUpdateSignal (self);
}


void fso_gsm_network_time_report_setTimeAndZone (FsoGsmNetworkTimeReport* self, gint time, gint zone) {
	gint _tmp0_;
	gint _tmp1_;
	GTimeVal _tmp2_ = {0};
	glong _tmp3_;
	GTimeVal _tmp4_ = {0};
	glong _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = time;
	self->time = _tmp0_;
	_tmp1_ = zone;
	self->zone = _tmp1_;
	g_get_current_time (&_tmp2_);
	_tmp3_ = _tmp2_.tv_sec;
	self->timestamp = (gint) _tmp3_;
	g_get_current_time (&_tmp4_);
	_tmp5_ = _tmp4_.tv_sec;
	self->zonestamp = (gint) _tmp5_;
	fso_gsm_network_time_report_sendUpdateSignal (self);
}


static void fso_gsm_network_time_report_sendUpdateSignal (FsoGsmNetworkTimeReport* self) {
	FsoGsmModem* _tmp0_;
	gpointer _tmp1_ = NULL;
	FreeSmartphoneGSMNetwork* obj;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = fso_gsm_theModem;
	_tmp1_ = fso_gsm_modem_theDevice (_tmp0_, FREE_SMARTPHONE_GSM_TYPE_NETWORK, (GBoxedCopyFunc) g_object_ref, g_object_unref);
	obj = (FreeSmartphoneGSMNetwork*) _tmp1_;
	_tmp2_ = self->time;
	_tmp3_ = self->zone;
	g_signal_emit_by_name (obj, "time-report", _tmp2_, _tmp3_);
	_g_object_unref0 (obj);
}


static void fso_gsm_value_network_time_report_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void fso_gsm_value_network_time_report_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		fso_gsm_network_time_report_unref (value->data[0].v_pointer);
	}
}


static void fso_gsm_value_network_time_report_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = fso_gsm_network_time_report_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer fso_gsm_value_network_time_report_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* fso_gsm_value_network_time_report_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FsoGsmNetworkTimeReport* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = fso_gsm_network_time_report_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* fso_gsm_value_network_time_report_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FsoGsmNetworkTimeReport** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = fso_gsm_network_time_report_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* fso_gsm_param_spec_network_time_report (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FsoGsmParamSpecNetworkTimeReport* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FSO_GSM_TYPE_NETWORK_TIME_REPORT), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer fso_gsm_value_get_network_time_report (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_NETWORK_TIME_REPORT), NULL);
	return value->data[0].v_pointer;
}


void fso_gsm_value_set_network_time_report (GValue* value, gpointer v_object) {
	FsoGsmNetworkTimeReport* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_NETWORK_TIME_REPORT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_NETWORK_TIME_REPORT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		fso_gsm_network_time_report_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_network_time_report_unref (old);
	}
}


void fso_gsm_value_take_network_time_report (GValue* value, gpointer v_object) {
	FsoGsmNetworkTimeReport* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FSO_GSM_TYPE_NETWORK_TIME_REPORT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FSO_GSM_TYPE_NETWORK_TIME_REPORT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		fso_gsm_network_time_report_unref (old);
	}
}


static void fso_gsm_network_time_report_class_init (FsoGsmNetworkTimeReportClass * klass) {
	fso_gsm_network_time_report_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_NETWORK_TIME_REPORT_CLASS (klass)->finalize = fso_gsm_network_time_report_finalize;
}


static void fso_gsm_network_time_report_instance_init (FsoGsmNetworkTimeReport * self) {
	self->ref_count = 1;
}


static void fso_gsm_network_time_report_finalize (FsoGsmNetworkTimeReport* obj) {
	FsoGsmNetworkTimeReport * self;
	self = FSO_GSM_NETWORK_TIME_REPORT (obj);
}


GType fso_gsm_network_time_report_get_type (void) {
	static volatile gsize fso_gsm_network_time_report_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_network_time_report_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { fso_gsm_value_network_time_report_init, fso_gsm_value_network_time_report_free_value, fso_gsm_value_network_time_report_copy_value, fso_gsm_value_network_time_report_peek_pointer, "p", fso_gsm_value_network_time_report_collect_value, "p", fso_gsm_value_network_time_report_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmNetworkTimeReportClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_network_time_report_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmNetworkTimeReport), 0, (GInstanceInitFunc) fso_gsm_network_time_report_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType fso_gsm_network_time_report_type_id;
		fso_gsm_network_time_report_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FsoGsmNetworkTimeReport", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&fso_gsm_network_time_report_type_id__volatile, fso_gsm_network_time_report_type_id);
	}
	return fso_gsm_network_time_report_type_id__volatile;
}


gpointer fso_gsm_network_time_report_ref (gpointer instance) {
	FsoGsmNetworkTimeReport* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void fso_gsm_network_time_report_unref (gpointer instance) {
	FsoGsmNetworkTimeReport* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FSO_GSM_NETWORK_TIME_REPORT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


GType fso_gsm_modem_status_get_type (void) {
	static volatile gsize fso_gsm_modem_status_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_modem_status_type_id__volatile)) {
		static const GEnumValue values[] = {{FSO_GSM_MODEM_STATUS_UNKNOWN, "FSO_GSM_MODEM_STATUS_UNKNOWN", "unknown"}, {FSO_GSM_MODEM_STATUS_CLOSED, "FSO_GSM_MODEM_STATUS_CLOSED", "closed"}, {FSO_GSM_MODEM_STATUS_INITIALIZING, "FSO_GSM_MODEM_STATUS_INITIALIZING", "initializing"}, {FSO_GSM_MODEM_STATUS_ALIVE_NO_SIM, "FSO_GSM_MODEM_STATUS_ALIVE_NO_SIM", "alive-no-sim"}, {FSO_GSM_MODEM_STATUS_ALIVE_SIM_LOCKED, "FSO_GSM_MODEM_STATUS_ALIVE_SIM_LOCKED", "alive-sim-locked"}, {FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED, "FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED", "alive-sim-unlocked"}, {FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY, "FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY", "alive-sim-ready"}, {FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED, "FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED", "alive-registered"}, {FSO_GSM_MODEM_STATUS_SUSPENDING, "FSO_GSM_MODEM_STATUS_SUSPENDING", "suspending"}, {FSO_GSM_MODEM_STATUS_SUSPENDED, "FSO_GSM_MODEM_STATUS_SUSPENDED", "suspended"}, {FSO_GSM_MODEM_STATUS_RESUMING, "FSO_GSM_MODEM_STATUS_RESUMING", "resuming"}, {FSO_GSM_MODEM_STATUS_CLOSING, "FSO_GSM_MODEM_STATUS_CLOSING", "closing"}, {0, NULL, NULL}};
		GType fso_gsm_modem_status_type_id;
		fso_gsm_modem_status_type_id = g_enum_register_static ("FsoGsmModemStatus", values);
		g_once_init_leave (&fso_gsm_modem_status_type_id__volatile, fso_gsm_modem_status_type_id);
	}
	return fso_gsm_modem_status_type_id__volatile;
}


/**
     * Network connection state. We have this separated from the Modem status itself to be
     * able to keep track of it for other purposes than exposing a global modem state
     * (e.g. when state is SUSPENDING or CLOSING it's impossible to find out if we are
     * still registered with any network or not).
     *
     * NOTE: This is currently only for internal use and will not be exposed with our
     * public dbus API (which will maybe happen later).
     **/
GType fso_gsm_modem_network_status_get_type (void) {
	static volatile gsize fso_gsm_modem_network_status_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_modem_network_status_type_id__volatile)) {
		static const GEnumValue values[] = {{FSO_GSM_MODEM_NETWORK_STATUS_UNKNOWN, "FSO_GSM_MODEM_NETWORK_STATUS_UNKNOWN", "unknown"}, {FSO_GSM_MODEM_NETWORK_STATUS_UNREGISTERED, "FSO_GSM_MODEM_NETWORK_STATUS_UNREGISTERED", "unregistered"}, {FSO_GSM_MODEM_NETWORK_STATUS_SEARCHING, "FSO_GSM_MODEM_NETWORK_STATUS_SEARCHING", "searching"}, {FSO_GSM_MODEM_NETWORK_STATUS_REGISTERED, "FSO_GSM_MODEM_NETWORK_STATUS_REGISTERED", "registered"}, {0, NULL, NULL}};
		GType fso_gsm_modem_network_status_type_id;
		fso_gsm_modem_network_status_type_id = g_enum_register_static ("FsoGsmModemNetworkStatus", values);
		g_once_init_leave (&fso_gsm_modem_network_status_type_id__volatile, fso_gsm_modem_network_status_type_id);
	}
	return fso_gsm_modem_network_status_type_id__volatile;
}


void fso_gsm_modem_open (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->open (self, _callback_, _user_data_);
}


gboolean fso_gsm_modem_open_finish (FsoGsmModem* self, GAsyncResult* _res_) {
	return FSO_GSM_MODEM_GET_INTERFACE (self)->open_finish (self, _res_);
}


void fso_gsm_modem_close (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->close (self, _callback_, _user_data_);
}


void fso_gsm_modem_close_finish (FsoGsmModem* self, GAsyncResult* _res_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->close_finish (self, _res_);
}


void fso_gsm_modem_suspend (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->suspend (self, _callback_, _user_data_);
}


gboolean fso_gsm_modem_suspend_finish (FsoGsmModem* self, GAsyncResult* _res_) {
	return FSO_GSM_MODEM_GET_INTERFACE (self)->suspend_finish (self, _res_);
}


void fso_gsm_modem_resume (FsoGsmModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->resume (self, _callback_, _user_data_);
}


gboolean fso_gsm_modem_resume_finish (FsoGsmModem* self, GAsyncResult* _res_) {
	return FSO_GSM_MODEM_GET_INTERFACE (self)->resume_finish (self, _res_);
}


void fso_gsm_modem_injectResponse (FsoGsmModem* self, const gchar* command, const gchar* channel, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->injectResponse (self, command, channel, error);
}


void fso_gsm_modem_setFunctionality (FsoGsmModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->setFunctionality (self, level, autoregister, pin, _callback_, _user_data_);
}


void fso_gsm_modem_setFunctionality_finish (FsoGsmModem* self, GAsyncResult* _res_, GError** error) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->setFunctionality_finish (self, _res_, error);
}


void fso_gsm_modem_registerChannel (FsoGsmModem* self, const gchar* name, FsoGsmChannel* channel) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->registerChannel (self, name, channel);
}


void fso_gsm_modem_advanceToState (FsoGsmModem* self, FsoGsmModemStatus status, gboolean force) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->advanceToState (self, status, force);
}


void fso_gsm_modem_advanceNetworkState (FsoGsmModem* self, FsoGsmModemNetworkStatus status) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->advanceNetworkState (self, status);
}


FsoGsmAtCommandSequence* fso_gsm_modem_atCommandSequence (FsoGsmModem* self, const gchar* channel, const gchar* purpose) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->atCommandSequence (self, channel, purpose);
}


gpointer fso_gsm_modem_createMediator (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->createMediator (self, t_type, t_dup_func, t_destroy_func, error);
}


gpointer fso_gsm_modem_createAtCommand (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->createAtCommand (self, t_type, t_dup_func, t_destroy_func, command);
}


gpointer fso_gsm_modem_theDevice (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->theDevice (self, t_type, t_dup_func, t_destroy_func);
}


gchar* fso_gsm_modem_allocateDataPort (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->allocateDataPort (self);
}


void fso_gsm_modem_releaseDataPort (FsoGsmModem* self) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->releaseDataPort (self);
}


void fso_gsm_modem_processAtCommandAsync (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->processAtCommandAsync (self, command, request, retries, _callback_, _user_data_);
}


gchar** fso_gsm_modem_processAtCommandAsync_finish (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1) {
	return FSO_GSM_MODEM_GET_INTERFACE (self)->processAtCommandAsync_finish (self, _res_, result_length1);
}


void fso_gsm_modem_processAtPduCommandAsync (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_MODEM_GET_INTERFACE (self)->processAtPduCommandAsync (self, command, request, retries, _callback_, _user_data_);
}


gchar** fso_gsm_modem_processAtPduCommandAsync_finish (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1) {
	return FSO_GSM_MODEM_GET_INTERFACE (self)->processAtPduCommandAsync_finish (self, _res_, result_length1);
}


/**
     * Send an AT command to the modem but don't wait for any response. This might me usefull in
     * some cases where we're really sure that the modem will understand the command we're sending.
     *
     * Possible response will be threated as unsolicited ones when using this method.
     **/
void fso_gsm_modem_sendAtCommand (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->sendAtCommand (self, command, request, retries);
}


FsoGsmChannel* fso_gsm_modem_channel (FsoGsmModem* self, const gchar* category) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->channel (self, category);
}


FsoGsmModemStatus fso_gsm_modem_status (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->status (self);
}


FsoGsmModemNetworkStatus fso_gsm_modem_network_status (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->network_status (self);
}


FreeSmartphoneGSMDeviceStatus fso_gsm_modem_externalStatus (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->externalStatus (self);
}


FsoGsmModemData* fso_gsm_modem_data (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->data (self);
}


void fso_gsm_modem_registerAtCommandSequence (FsoGsmModem* self, const gchar* channel, const gchar* purpose, FsoGsmAtCommandSequence* sequence) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->registerAtCommandSequence (self, channel, purpose, sequence);
}


gboolean fso_gsm_modem_isAlive (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, FALSE);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->isAlive (self);
}


GObject* fso_gsm_modem_get_parent (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_parent (self);
}


void fso_gsm_modem_set_parent (FsoGsmModem* self, GObject* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_parent (self, value);
}


FsoGsmCallHandler* fso_gsm_modem_get_callhandler (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_callhandler (self);
}


void fso_gsm_modem_set_callhandler (FsoGsmModem* self, FsoGsmCallHandler* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_callhandler (self, value);
}


FsoGsmSmsHandler* fso_gsm_modem_get_smshandler (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_smshandler (self);
}


void fso_gsm_modem_set_smshandler (FsoGsmModem* self, FsoGsmSmsHandler* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_smshandler (self, value);
}


FsoGsmPhonebookHandler* fso_gsm_modem_get_pbhandler (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_pbhandler (self);
}


void fso_gsm_modem_set_pbhandler (FsoGsmModem* self, FsoGsmPhonebookHandler* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_pbhandler (self, value);
}


FsoGsmWatchDog* fso_gsm_modem_get_watchdog (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_watchdog (self);
}


void fso_gsm_modem_set_watchdog (FsoGsmModem* self, FsoGsmWatchDog* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_watchdog (self, value);
}


FsoGsmIPdpHandler* fso_gsm_modem_get_pdphandler (FsoGsmModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_MODEM_GET_INTERFACE (self)->get_pdphandler (self);
}


void fso_gsm_modem_set_pdphandler (FsoGsmModem* self, FsoGsmIPdpHandler* value) {
	g_return_if_fail (self != NULL);
	FSO_GSM_MODEM_GET_INTERFACE (self)->set_pdphandler (self, value);
}


FsoGsmModemData* fso_gsm_modem_data_construct (GType object_type) {
	FsoGsmModemData * self = NULL;
	self = (FsoGsmModemData*) g_object_new (object_type, NULL);
	return self;
}


FsoGsmModemData* fso_gsm_modem_data_new (void) {
	return fso_gsm_modem_data_construct (FSO_GSM_MODEM_TYPE_DATA);
}


static void fso_gsm_modem_data_class_init (FsoGsmModemDataClass * klass) {
	fso_gsm_modem_data_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_modem_data_finalize;
}


static void fso_gsm_modem_data_instance_init (FsoGsmModemData * self) {
}


static void fso_gsm_modem_data_finalize (GObject* obj) {
	FsoGsmModemData * self;
	self = FSO_GSM_MODEM_DATA (obj);
	_g_object_unref0 (self->simPhonebooks);
	_g_free0 (self->charset);
	_g_object_unref0 (self->cmdSequences);
	_g_free0 (self->functionality);
	_g_free0 (self->simPin);
	_g_free0 (self->supportsPDP);
	_g_free0 (self->supportsFAX);
	_g_hash_table_unref0 (self->simOperatorbook);
	_g_free0 (self->simIssuer);
	_g_free0 (self->pppCommand);
	_g_free0 (self->pppPort);
	self->pppOptions = (_vala_array_free (self->pppOptions, self->pppOptions_length1, (GDestroyNotify) g_free), NULL);
	_fso_gsm_context_params_unref0 (self->contextParams);
	_g_free0 (self->atCommandCancelOutgoing);
	_g_free0 (self->atCommandRejectIncoming);
	_fso_gsm_network_time_report_unref0 (self->networkTimeReport);
	G_OBJECT_CLASS (fso_gsm_modem_data_parent_class)->finalize (obj);
}


GType fso_gsm_modem_data_get_type (void) {
	static volatile gsize fso_gsm_modem_data_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_modem_data_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmModemDataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_modem_data_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmModemData), 0, (GInstanceInitFunc) fso_gsm_modem_data_instance_init, NULL };
		GType fso_gsm_modem_data_type_id;
		fso_gsm_modem_data_type_id = g_type_register_static (G_TYPE_OBJECT, "FsoGsmModemData", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_modem_data_type_id__volatile, fso_gsm_modem_data_type_id);
	}
	return fso_gsm_modem_data_type_id__volatile;
}


static void fso_gsm_modem_base_init (FsoGsmModemIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_object_interface_install_property (iface, g_param_spec_object ("parent", "parent", "parent", G_TYPE_OBJECT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("callhandler", "callhandler", "callhandler", FSO_GSM_TYPE_CALL_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("smshandler", "smshandler", "smshandler", FSO_GSM_TYPE_SMS_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("pbhandler", "pbhandler", "pbhandler", FSO_GSM_TYPE_PHONEBOOK_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("watchdog", "watchdog", "watchdog", FSO_GSM_TYPE_WATCH_DOG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_object_interface_install_property (iface, g_param_spec_object ("pdphandler", "pdphandler", "pdphandler", FSO_GSM_TYPE_IPDP_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		g_signal_new ("hangup", FSO_GSM_TYPE_MODEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
		g_signal_new ("signal_status_changed", FSO_GSM_TYPE_MODEM, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__ENUM, G_TYPE_NONE, 1, FSO_GSM_MODEM_TYPE_STATUS);
	}
}


GType fso_gsm_modem_get_type (void) {
	static volatile gsize fso_gsm_modem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_modem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmModemIface), (GBaseInitFunc) fso_gsm_modem_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType fso_gsm_modem_type_id;
		fso_gsm_modem_type_id = g_type_register_static (G_TYPE_INTERFACE, "FsoGsmModem", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (fso_gsm_modem_type_id, FSO_FRAMEWORK_TYPE_ABSTRACT_OBJECT);
		g_once_init_leave (&fso_gsm_modem_type_id__volatile, fso_gsm_modem_type_id);
	}
	return fso_gsm_modem_type_id__volatile;
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}


static void fso_gsm_abstract_modem_initLowlevel (FsoGsmAbstractModem* self) {
	FsoFrameworkSmartKeyFile* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* lowleveltype;
	gchar* _tmp2_;
	gchar* typename;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GQuark _tmp6_ = 0U;
	static GQuark _tmp5_label0 = 0;
	static GQuark _tmp5_label1 = 0;
	static GQuark _tmp5_label2 = 0;
	static GQuark _tmp5_label3 = 0;
	static GQuark _tmp5_label4 = 0;
	static GQuark _tmp5_label5 = 0;
	const gchar* _tmp19_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp1_ = fso_framework_smart_key_file_stringValue (_tmp0_, FSO_GSM_CONFIG_SECTION, "lowlevel_type", "none");
	lowleveltype = _tmp1_;
	_tmp2_ = g_strdup ("none");
	typename = _tmp2_;
	_tmp3_ = lowleveltype;
	_tmp4_ = _tmp3_;
	_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
	if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("motorola_ezx")))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("LowLevelMotorolaEZX");
				_g_free0 (typename);
				typename = _tmp7_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("openmoko")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("LowLevelOpenmoko");
				_g_free0 (typename);
				typename = _tmp8_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("palmpre")))) {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup ("LowLevelPalmPre");
				_g_free0 (typename);
				typename = _tmp9_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label3) ? _tmp5_label3 : (_tmp5_label3 = g_quark_from_static_string ("nokia900")))) {
		switch (0) {
			default:
			{
				gchar* _tmp10_;
				_tmp10_ = g_strdup ("LowLevelNokia900");
				_g_free0 (typename);
				typename = _tmp10_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label4) ? _tmp5_label4 : (_tmp5_label4 = g_quark_from_static_string ("samsung_crespo")))) {
		switch (0) {
			default:
			{
				gchar* _tmp11_;
				_tmp11_ = g_strdup ("LowLevelSamsungCrespo");
				_g_free0 (typename);
				typename = _tmp11_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label5) ? _tmp5_label5 : (_tmp5_label5 = g_quark_from_static_string ("gta04")))) {
		switch (0) {
			default:
			{
				gchar* _tmp12_;
				_tmp12_ = g_strdup ("LowLevelGTA04");
				_g_free0 (typename);
				typename = _tmp12_;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				FsoFrameworkLogger* _tmp13_;
				const gchar* _tmp14_;
				const gchar* _tmp15_ = NULL;
				gchar* _tmp16_ = NULL;
				gchar* _tmp17_;
				FsoGsmNullLowLevel* _tmp18_;
				_tmp13_ = ((FsoFrameworkAbstractObject*) self)->logger;
				_tmp14_ = lowleveltype;
				_tmp15_ = string_to_string (_tmp14_);
				_tmp16_ = g_strconcat ("Invalid lowlevel_type ", _tmp15_, "; vendor specifics will NOT be available", NULL);
				_tmp17_ = _tmp16_;
				fso_framework_logger_warning (_tmp13_, _tmp17_);
				_g_free0 (_tmp17_);
				_tmp18_ = fso_gsm_null_low_level_new ();
				_g_object_unref0 (self->lowlevel);
				self->lowlevel = (FsoGsmLowLevel*) _tmp18_;
				_g_free0 (typename);
				_g_free0 (lowleveltype);
				return;
			}
		}
	}
	_tmp19_ = lowleveltype;
	if (g_strcmp0 (_tmp19_, "none") != 0) {
		const gchar* _tmp20_;
		GType _tmp21_ = 0UL;
		GType lowlevelclass;
		GType _tmp22_;
		GType _tmp29_;
		GObject* _tmp30_ = NULL;
		GObject* _tmp31_;
		FsoFrameworkLogger* _tmp32_;
		const gchar* _tmp33_;
		const gchar* _tmp34_ = NULL;
		gchar* _tmp35_ = NULL;
		gchar* _tmp36_;
		_tmp20_ = typename;
		_tmp21_ = g_type_from_name (_tmp20_);
		lowlevelclass = _tmp21_;
		_tmp22_ = lowlevelclass;
		if (_tmp22_ == G_TYPE_INVALID) {
			FsoFrameworkLogger* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_ = NULL;
			gchar* _tmp26_ = NULL;
			gchar* _tmp27_;
			FsoGsmNullLowLevel* _tmp28_;
			_tmp23_ = ((FsoFrameworkAbstractObject*) self)->logger;
			_tmp24_ = lowleveltype;
			_tmp25_ = string_to_string (_tmp24_);
			_tmp26_ = g_strconcat ("Can't find plugin for lowlevel_type ", _tmp25_, "; vendor specifics will NOT be available", NULL);
			_tmp27_ = _tmp26_;
			fso_framework_logger_warning (_tmp23_, _tmp27_);
			_g_free0 (_tmp27_);
			_tmp28_ = fso_gsm_null_low_level_new ();
			_g_object_unref0 (self->lowlevel);
			self->lowlevel = (FsoGsmLowLevel*) _tmp28_;
			_g_free0 (typename);
			_g_free0 (lowleveltype);
			return;
		}
		_tmp29_ = lowlevelclass;
		_tmp30_ = g_object_new (_tmp29_, NULL);
		_tmp31_ = G_IS_INITIALLY_UNOWNED (_tmp30_) ? g_object_ref_sink (_tmp30_) : _tmp30_;
		_g_object_unref0 (self->lowlevel);
		self->lowlevel = FSO_GSM_IS_LOW_LEVEL (_tmp31_) ? ((FsoGsmLowLevel*) _tmp31_) : NULL;
		_tmp32_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp33_ = lowleveltype;
		_tmp34_ = string_to_string (_tmp33_);
		_tmp35_ = g_strconcat ("Ready. Using lowlevel plugin ", _tmp34_, " to handle vendor specifics", NULL);
		_tmp36_ = _tmp35_;
		fso_framework_logger_info (_tmp32_, _tmp36_);
		_g_free0 (_tmp36_);
	}
	_g_free0 (typename);
	_g_free0 (lowleveltype);
}


static void fso_gsm_abstract_modem_initPdpHandler (FsoGsmAbstractModem* self) {
	FsoFrameworkSmartKeyFile* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* pdphandlertype;
	gchar* _tmp2_;
	gchar* typename;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GQuark _tmp6_ = 0U;
	static GQuark _tmp5_label0 = 0;
	static GQuark _tmp5_label1 = 0;
	static GQuark _tmp5_label2 = 0;
	static GQuark _tmp5_label3 = 0;
	static GQuark _tmp5_label4 = 0;
	static GQuark _tmp5_label5 = 0;
	static GQuark _tmp5_label6 = 0;
	const gchar* _tmp21_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp1_ = fso_framework_smart_key_file_stringValue (_tmp0_, FSO_GSM_CONFIG_SECTION, "pdp_type", "none");
	pdphandlertype = _tmp1_;
	_tmp2_ = g_strdup ("none");
	typename = _tmp2_;
	_tmp3_ = pdphandlertype;
	_tmp4_ = _tmp3_;
	_tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_);
	if (_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("ppp")))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("PdpPpp");
				_g_free0 (typename);
				typename = _tmp7_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("mux")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("PdpPppMux");
				_g_free0 (typename);
				typename = _tmp8_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("qmi")))) {
		switch (0) {
			default:
			{
				gchar* _tmp9_;
				_tmp9_ = g_strdup ("PdpQmi");
				_g_free0 (typename);
				typename = _tmp9_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label3) ? _tmp5_label3 : (_tmp5_label3 = g_quark_from_static_string ("ippp")))) {
		switch (0) {
			default:
			{
				gchar* _tmp10_;
				_tmp10_ = g_strdup ("PdpPppInternal");
				_g_free0 (typename);
				typename = _tmp10_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label4) ? _tmp5_label4 : (_tmp5_label4 = g_quark_from_static_string ("nokia_isi")))) {
		switch (0) {
			default:
			{
				gchar* _tmp11_;
				_tmp11_ = g_strdup ("PdpNokiaIsi");
				_g_free0 (typename);
				typename = _tmp11_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label5) ? _tmp5_label5 : (_tmp5_label5 = g_quark_from_static_string ("samsung_ipc")))) {
		switch (0) {
			default:
			{
				gchar* _tmp12_;
				_tmp12_ = g_strdup ("SamsungPdpHandler");
				_g_free0 (typename);
				typename = _tmp12_;
				break;
			}
		}
	} else if (_tmp6_ == ((0 != _tmp5_label6) ? _tmp5_label6 : (_tmp5_label6 = g_quark_from_static_string ("option_gtm601")))) {
		switch (0) {
			default:
			{
				gchar* _tmp13_;
				_tmp13_ = g_strdup ("PdpOptionGtm601");
				_g_free0 (typename);
				typename = _tmp13_;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				FsoFrameworkLogger* _tmp14_;
				const gchar* _tmp15_;
				const gchar* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				gchar* _tmp18_;
				FsoGsmNullPdpHandler* _tmp19_;
				FsoGsmNullPdpHandler* _tmp20_;
				_tmp14_ = ((FsoFrameworkAbstractObject*) self)->logger;
				_tmp15_ = pdphandlertype;
				_tmp16_ = string_to_string (_tmp15_);
				_tmp17_ = g_strconcat ("Invalid pdp_type ", _tmp16_, "; data connectivity will NOT be available", NULL);
				_tmp18_ = _tmp17_;
				fso_framework_logger_warning (_tmp14_, _tmp18_);
				_g_free0 (_tmp18_);
				_tmp19_ = fso_gsm_null_pdp_handler_new ();
				_tmp20_ = _tmp19_;
				fso_gsm_modem_set_pdphandler ((FsoGsmModem*) self, (FsoGsmIPdpHandler*) _tmp20_);
				_g_object_unref0 (_tmp20_);
				_g_free0 (typename);
				_g_free0 (pdphandlertype);
				return;
			}
		}
	}
	_tmp21_ = pdphandlertype;
	if (g_strcmp0 (_tmp21_, "none") != 0) {
		const gchar* _tmp22_;
		GType _tmp23_ = 0UL;
		GType pdphandlerclass;
		GType _tmp24_;
		GType _tmp32_;
		GObject* _tmp33_ = NULL;
		GObject* _tmp34_;
		FsoGsmPdpHandler* _tmp35_;
		FsoFrameworkLogger* _tmp36_;
		const gchar* _tmp37_;
		const gchar* _tmp38_ = NULL;
		gchar* _tmp39_ = NULL;
		gchar* _tmp40_;
		_tmp22_ = typename;
		_tmp23_ = g_type_from_name (_tmp22_);
		pdphandlerclass = _tmp23_;
		_tmp24_ = pdphandlerclass;
		if (_tmp24_ == G_TYPE_INVALID) {
			FsoFrameworkLogger* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_ = NULL;
			gchar* _tmp28_ = NULL;
			gchar* _tmp29_;
			FsoGsmNullPdpHandler* _tmp30_;
			FsoGsmNullPdpHandler* _tmp31_;
			_tmp25_ = ((FsoFrameworkAbstractObject*) self)->logger;
			_tmp26_ = pdphandlertype;
			_tmp27_ = string_to_string (_tmp26_);
			_tmp28_ = g_strconcat ("Can't find plugin for pdp_type ", _tmp27_, "; data connectivity will NOT be available", NULL);
			_tmp29_ = _tmp28_;
			fso_framework_logger_warning (_tmp25_, _tmp29_);
			_g_free0 (_tmp29_);
			_tmp30_ = fso_gsm_null_pdp_handler_new ();
			_tmp31_ = _tmp30_;
			fso_gsm_modem_set_pdphandler ((FsoGsmModem*) self, (FsoGsmIPdpHandler*) _tmp31_);
			_g_object_unref0 (_tmp31_);
			_g_free0 (typename);
			_g_free0 (pdphandlertype);
			return;
		}
		_tmp32_ = pdphandlerclass;
		_tmp33_ = g_object_new (_tmp32_, NULL);
		_tmp34_ = G_IS_INITIALLY_UNOWNED (_tmp33_) ? g_object_ref_sink (_tmp33_) : _tmp33_;
		_tmp35_ = FSO_GSM_IS_PDP_HANDLER (_tmp34_) ? ((FsoGsmPdpHandler*) _tmp34_) : NULL;
		fso_gsm_modem_set_pdphandler ((FsoGsmModem*) self, (FsoGsmIPdpHandler*) _tmp35_);
		_g_object_unref0 (_tmp35_);
		_tmp36_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp37_ = pdphandlertype;
		_tmp38_ = string_to_string (_tmp37_);
		_tmp39_ = g_strconcat ("Ready. Using pdp plugin ", _tmp38_, " to handle data connectivity", NULL);
		_tmp40_ = _tmp39_;
		fso_framework_logger_info (_tmp36_, _tmp40_);
		_g_free0 (_tmp40_);
	}
	_g_free0 (typename);
	_g_free0 (pdphandlertype);
}


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


static void fso_gsm_abstract_modem_initData (FsoGsmAbstractModem* self) {
	FsoGsmModemData* _tmp0_;
	FsoGsmModemData* _tmp1_;
	FsoGsmModemData* _tmp2_;
	FsoGsmModemData* _tmp3_;
	FsoGsmModemData* _tmp4_;
	FsoGsmModemData* _tmp5_;
	gchar* _tmp6_;
	FsoGsmModemData* _tmp7_;
	gchar* _tmp8_;
	FsoGsmModemData* _tmp9_;
	FsoFrameworkSmartKeyFile* _tmp10_;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	gchar* _tmp13_ = NULL;
	FsoGsmModemData* _tmp14_;
	FsoGsmModemData* _tmp15_;
	FsoGsmModemData* _tmp16_;
	FsoGsmModemData* _tmp17_;
	FsoGsmModemData* _tmp18_;
	FsoGsmModemData* _tmp19_;
	FsoGsmModemData* _tmp20_;
	FsoFrameworkSmartKeyFile* _tmp21_;
	gboolean _tmp22_ = FALSE;
	FsoGsmModemData* _tmp23_;
	GeeHashMap* _tmp24_;
	FsoGsmModemData* _tmp25_;
	GeeHashMap* _tmp26_;
	FsoGsmModemData* _tmp27_;
	FsoGsmNetworkTimeReport* _tmp28_;
	FsoGsmModemData* _tmp29_;
	FsoFrameworkSmartKeyFile* _tmp30_;
	gchar* _tmp31_ = NULL;
	FsoGsmModemData* _tmp32_;
	FsoFrameworkSmartKeyFile* _tmp33_;
	gboolean _tmp34_ = FALSE;
	FsoGsmModemData* _tmp35_;
	FsoFrameworkSmartKeyFile* _tmp36_;
	gchar* _tmp37_ = NULL;
	FsoFrameworkTransportSpec* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	const gchar* _tmp42_;
	FsoGsmModemData* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	FsoGsmModemData* _tmp48_;
	FsoFrameworkSmartKeyFile* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* _tmp64_;
	gchar** _tmp65_ = NULL;
	gchar** _tmp66_;
	gint _tmp66__length1;
	gint _tmp67_ = 0;
	gchar** _tmp68_ = NULL;
	FsoGsmModemData* _tmp69_;
	FsoGsmModemData* _tmp70_;
	GeeHashMap* _tmp71_;
	GeeHashMap* _tmp72_;
	GeeHashMap* seq;
	gchar** _tmp73_ = NULL;
	gchar** _tmp74_;
	gint _tmp74__length1;
	FsoGsmAtCommandSequence* _tmp75_;
	FsoGsmAtCommandSequence* _tmp76_;
	gchar* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar** _tmp87_ = NULL;
	gchar** _tmp88_;
	gint _tmp88__length1;
	FsoGsmAtCommandSequence* _tmp89_;
	FsoGsmAtCommandSequence* _tmp90_;
	FsoGsmAtCommandSequence* initsequence;
	FsoFrameworkSmartKeyFile* _tmp91_;
	gchar** _tmp92_ = NULL;
	gchar** _tmp93_;
	gint _tmp93__length1;
	gint _tmp94_ = 0;
	gchar** _tmp95_ = NULL;
	gchar** _tmp96_;
	gint _tmp96__length1;
	gchar** _tmp97_ = NULL;
	gchar** _tmp98_;
	gint _tmp98__length1;
	FsoGsmAtCommandSequence* _tmp99_;
	FsoGsmAtCommandSequence* _tmp100_;
	g_return_if_fail (self != NULL);
	_tmp0_ = fso_gsm_modem_data_new ();
	_g_object_unref0 (self->modem_data);
	self->modem_data = _tmp0_;
	_tmp1_ = self->modem_data;
	_tmp1_->supportsGSM = TRUE;
	_tmp2_ = self->modem_data;
	_tmp2_->supportsCDMA = FALSE;
	_tmp3_ = self->modem_data;
	_tmp3_->supportsVoice = TRUE;
	_tmp4_ = self->modem_data;
	_tmp4_->supportsCSD = TRUE;
	_tmp5_ = self->modem_data;
	_tmp6_ = g_strdup ("B");
	_g_free0 (_tmp5_->supportsPDP);
	_tmp5_->supportsPDP = _tmp6_;
	_tmp7_ = self->modem_data;
	_tmp8_ = g_strdup ("8");
	_g_free0 (_tmp7_->supportsFAX);
	_tmp7_->supportsFAX = _tmp8_;
	_tmp9_ = self->modem_data;
	_tmp10_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp11_ = fso_framework_smart_key_file_stringValue (_tmp10_, FSO_GSM_CONFIG_SECTION, "modem_charset", "guess");
	_tmp12_ = _tmp11_;
	_tmp13_ = g_utf8_strup (_tmp12_, (gssize) (-1));
	_g_free0 (_tmp9_->charset);
	_tmp9_->charset = _tmp13_;
	_g_free0 (_tmp12_);
	_tmp14_ = self->modem_data;
	_tmp14_->simHasReadySignal = FALSE;
	_tmp15_ = self->modem_data;
	_tmp15_->simReadyTimeout = (guint) 30;
	_tmp16_ = self->modem_data;
	_tmp16_->speakerVolumeMinimum = -1;
	_tmp17_ = self->modem_data;
	_tmp17_->speakerVolumeMaximum = -1;
	_tmp18_ = self->modem_data;
	_tmp18_->alarmCleared = 946684800;
	_tmp19_ = self->modem_data;
	_tmp19_->simAuthStatus = FREE_SMARTPHONE_GSM_SIM_AUTH_STATUS_UNKNOWN;
	_tmp20_ = self->modem_data;
	_tmp21_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp22_ = fso_framework_smart_key_file_boolValue (_tmp21_, FSO_GSM_CONFIG_SECTION, "sim_buffers_sms", TRUE);
	_tmp20_->simBuffersSms = _tmp22_;
	_tmp23_ = self->modem_data;
	_tmp24_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FSO_GSM_TYPE_PHONEBOOK_PARAMS, (GBoxedCopyFunc) fso_gsm_phonebook_params_ref, fso_gsm_phonebook_params_unref, NULL, NULL, NULL);
	_g_object_unref0 (_tmp23_->simPhonebooks);
	_tmp23_->simPhonebooks = _tmp24_;
	_tmp25_ = self->modem_data;
	_tmp26_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FSO_GSM_TYPE_AT_COMMAND_SEQUENCE, (GBoxedCopyFunc) fso_gsm_at_command_sequence_ref, fso_gsm_at_command_sequence_unref, NULL, NULL, NULL);
	_g_object_unref0 (_tmp25_->cmdSequences);
	_tmp25_->cmdSequences = _tmp26_;
	_tmp27_ = self->modem_data;
	_tmp28_ = fso_gsm_network_time_report_new ();
	_fso_gsm_network_time_report_unref0 (_tmp27_->networkTimeReport);
	_tmp27_->networkTimeReport = _tmp28_;
	_tmp29_ = self->modem_data;
	_tmp30_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp31_ = fso_framework_smart_key_file_stringValue (_tmp30_, FSO_GSM_CONFIG_SECTION, "auto_unlock", "");
	_g_free0 (_tmp29_->simPin);
	_tmp29_->simPin = _tmp31_;
	_tmp32_ = self->modem_data;
	_tmp33_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp34_ = fso_framework_smart_key_file_boolValue (_tmp33_, FSO_GSM_CONFIG_SECTION, "auto_register", FALSE);
	_tmp32_->keepRegistration = _tmp34_;
	_tmp35_ = self->modem_data;
	_tmp36_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp37_ = fso_framework_smart_key_file_stringValue (_tmp36_, FSO_GSM_CONFIG_SECTION, "ppp_command", FSO_GSM_PPPD_DEFAULT_COMMAND);
	_g_free0 (_tmp35_->pppCommand);
	_tmp35_->pppCommand = _tmp37_;
	_tmp38_ = self->priv->_data_transport_spec;
	_tmp39_ = _tmp38_->name;
	_tmp40_ = g_strdup (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = _tmp41_;
	if (_tmp42_ == NULL) {
		FsoFrameworkSmartKeyFile* _tmp43_;
		gchar* _tmp44_ = NULL;
		_tmp43_ = ((FsoFrameworkAbstractObject*) self)->config;
		_tmp44_ = fso_framework_smart_key_file_stringValue (_tmp43_, FSO_GSM_CONFIG_SECTION, "ppp_port", "/dev/null");
		_g_free0 (_tmp41_);
		_tmp41_ = _tmp44_;
	}
	_tmp45_ = self->modem_data;
	_tmp46_ = _tmp41_;
	_tmp47_ = g_strdup (_tmp46_);
	_g_free0 (_tmp45_->pppPort);
	_tmp45_->pppPort = _tmp47_;
	_tmp48_ = self->modem_data;
	_tmp49_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp50_ = g_strdup ("115200");
	_tmp51_ = g_strdup ("nodetach");
	_tmp52_ = g_strdup ("modem");
	_tmp53_ = g_strdup ("crtscts");
	_tmp54_ = g_strdup ("nodefaultroute");
	_tmp55_ = g_strdup ("noreplacedefaultroute");
	_tmp56_ = g_strdup ("debug");
	_tmp57_ = g_strdup ("hide-password");
	_tmp58_ = g_strdup ("ktune");
	_tmp59_ = g_strdup ("noccp");
	_tmp60_ = g_strdup ("noipdefault");
	_tmp61_ = g_strdup ("novj");
	_tmp62_ = g_strdup ("novjccomp");
	_tmp63_ = g_strdup ("proxyarp");
	_tmp64_ = g_strdup ("usepeerdns");
	_tmp65_ = g_new0 (gchar*, 15 + 1);
	_tmp65_[0] = _tmp50_;
	_tmp65_[1] = _tmp51_;
	_tmp65_[2] = _tmp52_;
	_tmp65_[3] = _tmp53_;
	_tmp65_[4] = _tmp54_;
	_tmp65_[5] = _tmp55_;
	_tmp65_[6] = _tmp56_;
	_tmp65_[7] = _tmp57_;
	_tmp65_[8] = _tmp58_;
	_tmp65_[9] = _tmp59_;
	_tmp65_[10] = _tmp60_;
	_tmp65_[11] = _tmp61_;
	_tmp65_[12] = _tmp62_;
	_tmp65_[13] = _tmp63_;
	_tmp65_[14] = _tmp64_;
	_tmp66_ = _tmp65_;
	_tmp66__length1 = 15;
	_tmp68_ = fso_framework_smart_key_file_stringListValue (_tmp49_, FSO_GSM_CONFIG_SECTION, "ppp_options", _tmp66_, 15, &_tmp67_);
	_tmp48_->pppOptions = (_vala_array_free (_tmp48_->pppOptions, _tmp48_->pppOptions_length1, (GDestroyNotify) g_free), NULL);
	_tmp48_->pppOptions = _tmp68_;
	_tmp48_->pppOptions_length1 = _tmp67_;
	_tmp66_ = (_vala_array_free (_tmp66_, _tmp66__length1, (GDestroyNotify) g_free), NULL);
	_tmp69_ = self->modem_data;
	_tmp69_->roamingAllowed = FALSE;
	_tmp70_ = self->modem_data;
	_tmp71_ = _tmp70_->cmdSequences;
	_tmp72_ = _g_object_ref0 (_tmp71_);
	seq = _tmp72_;
	_tmp73_ = g_new0 (gchar*, 0 + 1);
	_tmp74_ = _tmp73_;
	_tmp74__length1 = 0;
	_tmp75_ = fso_gsm_at_command_sequence_new (_tmp74_, 0);
	_tmp76_ = _tmp75_;
	gee_abstract_map_set ((GeeAbstractMap*) seq, "null", _tmp76_);
	_fso_gsm_at_command_sequence_unref0 (_tmp76_);
	_tmp74_ = (_vala_array_free (_tmp74_, _tmp74__length1, (GDestroyNotify) g_free), NULL);
	_tmp77_ = g_strdup ("E0Q0V1");
	_tmp78_ = g_strdup ("+CMEE=1");
	_tmp79_ = g_strdup ("+CRC=1");
	_tmp80_ = g_strdup ("+CSNS=0");
	_tmp81_ = g_strdup ("+CMGF=0");
	_tmp82_ = g_strdup ("+CLIP=0");
	_tmp83_ = g_strdup ("+CLIR=0");
	_tmp84_ = g_strdup ("+COLP=0");
	_tmp85_ = g_strdup ("+CCWA=0");
	_tmp86_ = g_strdup ("+CSMS=1");
	_tmp87_ = g_new0 (gchar*, 10 + 1);
	_tmp87_[0] = _tmp77_;
	_tmp87_[1] = _tmp78_;
	_tmp87_[2] = _tmp79_;
	_tmp87_[3] = _tmp80_;
	_tmp87_[4] = _tmp81_;
	_tmp87_[5] = _tmp82_;
	_tmp87_[6] = _tmp83_;
	_tmp87_[7] = _tmp84_;
	_tmp87_[8] = _tmp85_;
	_tmp87_[9] = _tmp86_;
	_tmp88_ = _tmp87_;
	_tmp88__length1 = 10;
	_tmp89_ = fso_gsm_at_command_sequence_new (_tmp88_, 10);
	_tmp90_ = _tmp89_;
	_tmp88_ = (_vala_array_free (_tmp88_, _tmp88__length1, (GDestroyNotify) g_free), NULL);
	initsequence = _tmp90_;
	_tmp91_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp92_ = g_new0 (gchar*, 0 + 1);
	_tmp93_ = _tmp92_;
	_tmp93__length1 = 0;
	_tmp95_ = fso_framework_smart_key_file_stringListValue (_tmp91_, FSO_GSM_CONFIG_SECTION, "modem_init", _tmp93_, 0, &_tmp94_);
	_tmp96_ = _tmp95_;
	_tmp96__length1 = _tmp94_;
	fso_gsm_at_command_sequence_append (initsequence, _tmp96_, _tmp94_);
	_tmp96_ = (_vala_array_free (_tmp96_, _tmp96__length1, (GDestroyNotify) g_free), NULL);
	_tmp93_ = (_vala_array_free (_tmp93_, _tmp93__length1, (GDestroyNotify) g_free), NULL);
	fso_gsm_modem_registerAtCommandSequence ((FsoGsmModem*) self, "MODEM", "init", initsequence);
	_tmp97_ = g_new0 (gchar*, 0 + 1);
	_tmp98_ = _tmp97_;
	_tmp98__length1 = 0;
	_tmp99_ = fso_gsm_at_command_sequence_new (_tmp98_, 0);
	_tmp100_ = _tmp99_;
	fso_gsm_modem_registerAtCommandSequence ((FsoGsmModem*) self, "MODEM", "shutdown", _tmp100_);
	_fso_gsm_at_command_sequence_unref0 (_tmp100_);
	_tmp98_ = (_vala_array_free (_tmp98_, _tmp98__length1, (GDestroyNotify) g_free), NULL);
	fso_gsm_abstract_modem_configureData (self);
	_fso_gsm_at_command_sequence_unref0 (initsequence);
	_g_object_unref0 (seq);
	_g_free0 (_tmp41_);
}


static void fso_gsm_abstract_modem_registerHandlers (FsoGsmAbstractModem* self) {
	FsoGsmUnsolicitedResponseHandler* _tmp0_ = NULL;
	FsoGsmCallHandler* _tmp1_ = NULL;
	FsoGsmCallHandler* _tmp2_;
	FsoGsmSmsHandler* _tmp3_ = NULL;
	FsoGsmSmsHandler* _tmp4_;
	FsoGsmPhonebookHandler* _tmp5_ = NULL;
	FsoGsmPhonebookHandler* _tmp6_;
	FsoGsmWatchDog* _tmp7_ = NULL;
	FsoGsmWatchDog* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = fso_gsm_abstract_modem_createUnsolicitedHandler (self);
	_g_object_unref0 (self->urc);
	self->urc = _tmp0_;
	_tmp1_ = fso_gsm_abstract_modem_createCallHandler (self);
	_tmp2_ = _tmp1_;
	fso_gsm_modem_set_callhandler ((FsoGsmModem*) self, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = fso_gsm_abstract_modem_createSmsHandler (self);
	_tmp4_ = _tmp3_;
	fso_gsm_modem_set_smshandler ((FsoGsmModem*) self, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = fso_gsm_abstract_modem_createPhonebookHandler (self);
	_tmp6_ = _tmp5_;
	fso_gsm_modem_set_pbhandler ((FsoGsmModem*) self, _tmp6_);
	_g_object_unref0 (_tmp6_);
	_tmp7_ = fso_gsm_abstract_modem_createWatchDog (self);
	_tmp8_ = _tmp7_;
	fso_gsm_modem_set_watchdog ((FsoGsmModem*) self, _tmp8_);
	_g_object_unref0 (_tmp8_);
}


static void fso_gsm_abstract_modem_registerMediators (FsoGsmAbstractModem* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_GTYPE, NULL, NULL, G_TYPE_GTYPE, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->mediators);
	self->mediators = _tmp0_;
	_tmp1_ = self->mediators;
	fso_gsm_registerGenericAtMediators (_tmp1_);
	_tmp2_ = self->mediators;
	fso_gsm_abstract_modem_registerCustomMediators (self, _tmp2_);
}


static void fso_gsm_abstract_modem_registerAtCommands (FsoGsmAbstractModem* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FSO_GSM_TYPE_AT_COMMAND, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->commands);
	self->commands = _tmp0_;
	_tmp1_ = self->commands;
	fso_gsm_registerGenericAtCommands (_tmp1_);
	_tmp2_ = self->commands;
	fso_gsm_abstract_modem_registerCustomAtCommands (self, _tmp2_);
}


static void fso_gsm_abstract_modem_real_registerAtCommandSequence (FsoGsmModem* base, const gchar* channel, const gchar* purpose, FsoGsmAtCommandSequence* sequence) {
	FsoGsmAbstractModem * self;
	gboolean _tmp0_ = FALSE;
	FsoGsmModemData* _tmp1_;
	gboolean _tmp4_;
	FsoGsmModemData* _tmp5_;
	GeeHashMap* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp9_;
	const gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_;
	FsoGsmAtCommandSequence* _tmp13_;
	self = (FsoGsmAbstractModem*) base;
	g_return_if_fail (channel != NULL);
	g_return_if_fail (purpose != NULL);
	g_return_if_fail (sequence != NULL);
	_tmp1_ = self->modem_data;
	if (_tmp1_ != NULL) {
		FsoGsmModemData* _tmp2_;
		GeeHashMap* _tmp3_;
		_tmp2_ = self->modem_data;
		_tmp3_ = _tmp2_->cmdSequences;
		_tmp0_ = _tmp3_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp4_ = _tmp0_;
	g_assert (_tmp4_);
	_tmp5_ = self->modem_data;
	_tmp6_ = _tmp5_->cmdSequences;
	_tmp7_ = channel;
	_tmp8_ = string_to_string (_tmp7_);
	_tmp9_ = purpose;
	_tmp10_ = string_to_string (_tmp9_);
	_tmp11_ = g_strconcat (_tmp8_, "-", _tmp10_, NULL);
	_tmp12_ = _tmp11_;
	_tmp13_ = sequence;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, _tmp12_, _tmp13_);
	_g_free0 (_tmp12_);
}


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


static void fso_gsm_abstract_modem_checkChannelsForHangup (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_abstract_modem_checkChannelsForHangupData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	_data_ = g_slice_new0 (fso_gsm_abstract_modem_checkChannelsForHangupData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_checkChannelsForHangup);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_checkChannelsForHangup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_abstract_modem_checkChannelsForHangup_co (_data_);
}


static void fso_gsm_abstract_modem_checkChannelsForHangup_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	fso_gsm_abstract_modem_checkChannelsForHangupData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_abstract_modem_checkChannelsForHangup_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_abstract_modem_checkChannelsForHangupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_checkChannelsForHangup_co (_data_);
}


static gboolean fso_gsm_abstract_modem_checkChannelsForHangup_co (fso_gsm_abstract_modem_checkChannelsForHangupData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = fso_framework_logger_debug (_data_->_tmp0_, "Checking our channels as one had a hangup ...");
	g_assert (_data_->_tmp1_);
	_data_->_tmp2_ = _data_->self->channels;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp2_, "main");
	_data_->mainchannel = (FsoGsmChannel*) _data_->_tmp3_;
	_data_->_tmp4_ = _data_->mainchannel;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = fso_gsm_channel_isActive (_data_->_tmp4_);
	if (!_data_->_tmp5_) {
		_data_->_tmp6_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		fso_framework_logger_error (_data_->_tmp6_, "Detected main channel hangup; closing modem ...");
		fso_gsm_abstract_modem_close (_data_->self, NULL, NULL);
		g_signal_emit_by_name ((FsoGsmModem*) _data_->self, "hangup");
	} else {
		{
			_data_->_tmp7_ = _data_->self->channels;
			_data_->_tmp8_ = gee_abstract_map_get_keys ((GeeMap*) _data_->_tmp7_);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp10_);
			_data_->_tmp12_ = _data_->_tmp11_;
			_g_object_unref0 (_data_->_tmp10_);
			_data_->_cname_it = _data_->_tmp12_;
			while (TRUE) {
				_data_->_tmp13_ = _data_->_cname_it;
				_data_->_tmp14_ = FALSE;
				_data_->_tmp14_ = gee_iterator_next (_data_->_tmp13_);
				if (!_data_->_tmp14_) {
					break;
				}
				_data_->_tmp15_ = _data_->_cname_it;
				_data_->_tmp16_ = NULL;
				_data_->_tmp16_ = gee_iterator_get (_data_->_tmp15_);
				_data_->cname = (gchar*) _data_->_tmp16_;
				_data_->_tmp17_ = _data_->cname;
				if (g_strcmp0 (_data_->_tmp17_, "main") != 0) {
					_data_->_tmp18_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
					_data_->_tmp19_ = _data_->cname;
					_data_->_tmp20_ = NULL;
					_data_->_tmp20_ = string_to_string (_data_->_tmp19_);
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = g_strconcat ("Checking channel ", _data_->_tmp20_, " for hangup ...", NULL);
					_data_->_tmp22_ = _data_->_tmp21_;
					_data_->_tmp23_ = FALSE;
					_data_->_tmp23_ = fso_framework_logger_debug (_data_->_tmp18_, _data_->_tmp22_);
					g_assert (_data_->_tmp23_);
					_g_free0 (_data_->_tmp22_);
					_data_->_tmp24_ = _data_->self->channels;
					_data_->_tmp25_ = _data_->cname;
					_data_->_tmp26_ = NULL;
					_data_->_tmp26_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp24_, _data_->_tmp25_);
					_data_->channel = (FsoGsmChannel*) _data_->_tmp26_;
					_data_->_tmp27_ = _data_->channel;
					_data_->_tmp28_ = FALSE;
					_data_->_tmp28_ = fso_gsm_channel_isActive (_data_->_tmp27_);
					if (!_data_->_tmp28_) {
						_data_->_tmp29_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
						_data_->_tmp30_ = _data_->cname;
						_data_->_tmp31_ = NULL;
						_data_->_tmp31_ = string_to_string (_data_->_tmp30_);
						_data_->_tmp32_ = NULL;
						_data_->_tmp32_ = g_strconcat ("Detected ", _data_->_tmp31_, " channel hangup; reopening channel ...", NULL);
						_data_->_tmp33_ = _data_->_tmp32_;
						fso_framework_logger_info (_data_->_tmp29_, _data_->_tmp33_);
						_g_free0 (_data_->_tmp33_);
						_data_->_tmp34_ = _data_->channel;
						_data_->_state_ = 1;
						fso_framework_command_queue_open ((FsoFrameworkCommandQueue*) _data_->_tmp34_, fso_gsm_abstract_modem_checkChannelsForHangup_ready, _data_);
						return FALSE;
						_state_1:
						_data_->_tmp35_ = FALSE;
						_data_->_tmp35_ = fso_framework_command_queue_open_finish ((FsoFrameworkCommandQueue*) _data_->_tmp34_, _data_->_res_);
						_data_->ok = _data_->_tmp35_;
						_data_->_tmp36_ = _data_->ok;
						if (!_data_->_tmp36_) {
							_data_->_tmp37_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
							_data_->_tmp38_ = _data_->cname;
							_data_->_tmp39_ = NULL;
							_data_->_tmp39_ = string_to_string (_data_->_tmp38_);
							_data_->_tmp40_ = NULL;
							_data_->_tmp40_ = g_strconcat ("Could not reopen channel '", _data_->_tmp39_, "' after hangup!!!", NULL);
							_data_->_tmp41_ = _data_->_tmp40_;
							fso_framework_logger_error (_data_->_tmp37_, _data_->_tmp41_);
							_g_free0 (_data_->_tmp41_);
						}
					}
					_g_object_unref0 (_data_->channel);
				}
				_g_free0 (_data_->cname);
			}
			_g_object_unref0 (_data_->_cname_it);
		}
	}
	_g_object_unref0 (_data_->mainchannel);
	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 gboolean __lambda5_ (FsoGsmAbstractModem* self) {
	gboolean result = FALSE;
	fso_gsm_abstract_modem_checkChannelsForHangup (self, NULL, NULL);
	result = FALSE;
	return result;
}


static gboolean ___lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda5_ (self);
	return result;
}


static void fso_gsm_abstract_modem_onChannelHangup (FsoGsmAbstractModem* self) {
	FsoGsmModemStatus _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->modem_status;
	if (_tmp0_ == FSO_GSM_MODEM_STATUS_CLOSING) {
		FsoFrameworkLogger* _tmp1_;
		_tmp1_ = ((FsoFrameworkAbstractObject*) self)->logger;
		fso_framework_logger_warning (_tmp1_, "Ignoring additional channel hangup while already closing the modem...");
		return;
	}
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda5__gsource_func, g_object_ref (self), g_object_unref);
}


/**
     * Override this to register additional mediators specific to your modem or
     * override generic mediators with modem-specific versions.
     **/
static void fso_gsm_abstract_modem_real_registerCustomMediators (FsoGsmAbstractModem* self, GeeHashMap* mediators) {
	g_return_if_fail (mediators != NULL);
}


void fso_gsm_abstract_modem_registerCustomMediators (FsoGsmAbstractModem* self, GeeHashMap* mediators) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->registerCustomMediators (self, mediators);
}


/**
     * Override this to register additional AT commands specific to your modem or
     * override generic AT commands with modem-specific versions.
     **/
static void fso_gsm_abstract_modem_real_registerCustomAtCommands (FsoGsmAbstractModem* self, GeeHashMap* commands) {
	g_return_if_fail (commands != NULL);
}


void fso_gsm_abstract_modem_registerCustomAtCommands (FsoGsmAbstractModem* self, GeeHashMap* commands) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->registerCustomAtCommands (self, commands);
}


/**
     * Override this to return a custom type of urc handler to be used for this modem.
     **/
static FsoGsmUnsolicitedResponseHandler* fso_gsm_abstract_modem_real_createUnsolicitedHandler (FsoGsmAbstractModem* self) {
	FsoGsmUnsolicitedResponseHandler* result = NULL;
	FsoGsmAtUnsolicitedResponseHandler* _tmp0_;
	_tmp0_ = fso_gsm_at_unsolicited_response_handler_new ();
	result = (FsoGsmUnsolicitedResponseHandler*) _tmp0_;
	return result;
}


FsoGsmUnsolicitedResponseHandler* fso_gsm_abstract_modem_createUnsolicitedHandler (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createUnsolicitedHandler (self);
}


/**
     * Override this to return a custom type of Call handler to be used for this modem.
     **/
static FsoGsmCallHandler* fso_gsm_abstract_modem_real_createCallHandler (FsoGsmAbstractModem* self) {
	FsoGsmCallHandler* result = NULL;
	FsoGsmGenericAtCallHandler* _tmp0_;
	_tmp0_ = fso_gsm_generic_at_call_handler_new ();
	result = (FsoGsmCallHandler*) _tmp0_;
	return result;
}


FsoGsmCallHandler* fso_gsm_abstract_modem_createCallHandler (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createCallHandler (self);
}


/**
     * Override this to return a custom type of SMS handler to be used for this modem.
     **/
static FsoGsmSmsHandler* fso_gsm_abstract_modem_real_createSmsHandler (FsoGsmAbstractModem* self) {
	FsoGsmSmsHandler* result = NULL;
	FsoGsmAtSmsHandler* _tmp0_;
	_tmp0_ = fso_gsm_at_sms_handler_new ();
	result = (FsoGsmSmsHandler*) _tmp0_;
	return result;
}


FsoGsmSmsHandler* fso_gsm_abstract_modem_createSmsHandler (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createSmsHandler (self);
}


/**
     * Override this to return a custom type of PB handler to be used for this modem.
     **/
static FsoGsmPhonebookHandler* fso_gsm_abstract_modem_real_createPhonebookHandler (FsoGsmAbstractModem* self) {
	FsoGsmPhonebookHandler* result = NULL;
	FsoGsmAtPhonebookHandler* _tmp0_;
	_tmp0_ = fso_gsm_at_phonebook_handler_new ();
	result = (FsoGsmPhonebookHandler*) _tmp0_;
	return result;
}


FsoGsmPhonebookHandler* fso_gsm_abstract_modem_createPhonebookHandler (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createPhonebookHandler (self);
}


/**
     * Override this to return a custom type of Watch Dog to be used for this modem.
     **/
static FsoGsmWatchDog* fso_gsm_abstract_modem_real_createWatchDog (FsoGsmAbstractModem* self) {
	FsoGsmWatchDog* result = NULL;
	FsoGsmGenericWatchDog* _tmp0_;
	_tmp0_ = fso_gsm_generic_watch_dog_new ();
	result = (FsoGsmWatchDog*) _tmp0_;
	return result;
}


FsoGsmWatchDog* fso_gsm_abstract_modem_createWatchDog (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createWatchDog (self);
}


/**
     * Override this to power on external components before the maintransport
     * will be opened
     **/
static gboolean fso_gsm_abstract_modem_real_powerOn (FsoGsmAbstractModem* self) {
	gboolean result = FALSE;
	result = TRUE;
	return result;
}


gboolean fso_gsm_abstract_modem_powerOn (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, FALSE);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->powerOn (self);
}


/**
     * Override this to power off external components before the maintransport
     * will be closed
     **/
static void fso_gsm_abstract_modem_real_powerOff (FsoGsmAbstractModem* self) {
}


void fso_gsm_abstract_modem_powerOff (FsoGsmAbstractModem* self) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->powerOff (self);
}


/**
     * Override this to create your channels and assorted transports.
     **/
static void fso_gsm_abstract_modem_real_createChannels (FsoGsmAbstractModem* self) {
}


void fso_gsm_abstract_modem_createChannels (FsoGsmAbstractModem* self) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->createChannels (self);
}


/**
     * Override this to configure the data instance for your modem.
     **/
static void fso_gsm_abstract_modem_real_configureData (FsoGsmAbstractModem* self) {
}


void fso_gsm_abstract_modem_configureData (FsoGsmAbstractModem* self) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->configureData (self);
}


/**
     * Implement this to create the command/channel-assignment function.
     **/
static FsoGsmChannel* fso_gsm_abstract_modem_real_channelForCommand (FsoGsmAbstractModem* self, FsoGsmAtCommand* command, const gchar* request) {
	g_critical ("Type `%s' does not implement abstract method `fso_gsm_abstract_modem_channelForCommand'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}


FsoGsmChannel* fso_gsm_abstract_modem_channelForCommand (FsoGsmAbstractModem* self, FsoGsmAtCommand* command, const gchar* request) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->channelForCommand (self, command, request);
}


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


static void fso_gsm_abstract_modem_real_open (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModemOpenData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAbstractModemOpenData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_open);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_open_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_abstract_modem_real_open_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_open_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	gboolean result;
	FsoGsmAbstractModemOpenData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_abstract_modem_open_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAbstractModemOpenData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_open_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_open_co (FsoGsmAbstractModemOpenData* _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_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = fso_framework_logger_debug (_data_->_tmp0_, "Opening the modem device...");
	g_assert (_data_->_tmp1_);
	_data_->_tmp2_ = _data_->self->lowlevel;
	_data_->_tmp3_ = FALSE;
	_data_->_tmp3_ = fso_gsm_low_level_poweron (_data_->_tmp2_);
	if (!_data_->_tmp3_) {
		_data_->result = 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;
	}
	_data_->_tmp4_ = FALSE;
	_data_->_tmp4_ = fso_gsm_abstract_modem_powerOn (_data_->self);
	if (!_data_->_tmp4_) {
		_data_->result = 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;
	}
	_data_->_tmp5_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp6_ = _data_->self->channels;
	_data_->_tmp7_ = gee_abstract_map_get_size ((GeeMap*) _data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = g_strdup_printf ("%i", _data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = g_strconcat ("Will open ", _data_->_tmp10_, " channels...", NULL);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = FALSE;
	_data_->_tmp13_ = fso_framework_logger_debug (_data_->_tmp5_, _data_->_tmp12_);
	g_assert (_data_->_tmp13_);
	_g_free0 (_data_->_tmp12_);
	_g_free0 (_data_->_tmp10_);
	_data_->_tmp14_ = _data_->self->channels;
	_data_->_tmp15_ = gee_abstract_map_get_keys ((GeeMap*) _data_->_tmp14_);
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = _data_->_tmp16_;
	_data_->_tmp18_ = FALSE;
	_data_->_tmp18_ = gee_collection_contains ((GeeCollection*) _data_->_tmp17_, "main");
	_data_->_tmp19_ = !_data_->_tmp18_;
	_g_object_unref0 (_data_->_tmp17_);
	if (_data_->_tmp19_) {
		_data_->_tmp20_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		fso_framework_logger_error (_data_->_tmp20_, "Can't open main channel; not found in channel list");
		_data_->result = 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;
	}
	_data_->_tmp21_ = _data_->self->channels;
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp21_, "main");
	_data_->mainchannel = (FsoGsmChannel*) _data_->_tmp22_;
	_data_->_tmp23_ = _data_->mainchannel;
	_data_->_state_ = 1;
	fso_framework_command_queue_open ((FsoFrameworkCommandQueue*) _data_->_tmp23_, fso_gsm_abstract_modem_open_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp24_ = FALSE;
	_data_->_tmp24_ = fso_framework_command_queue_open_finish ((FsoFrameworkCommandQueue*) _data_->_tmp23_, _data_->_res_);
	_data_->ok = _data_->_tmp24_;
	_data_->_tmp25_ = _data_->ok;
	if (!_data_->_tmp25_) {
		_data_->_tmp26_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		fso_framework_logger_error (_data_->_tmp26_, "Can't open main channel; open returned false");
		_data_->result = FALSE;
		_g_object_unref0 (_data_->mainchannel);
		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_->_tmp27_ = _data_->self->channels;
		_data_->_tmp28_ = gee_abstract_map_get_keys ((GeeMap*) _data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_tmp31_ = NULL;
		_data_->_tmp31_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp30_);
		_data_->_tmp32_ = _data_->_tmp31_;
		_g_object_unref0 (_data_->_tmp30_);
		_data_->_key_it = _data_->_tmp32_;
		while (TRUE) {
			_data_->_tmp33_ = _data_->_key_it;
			_data_->_tmp34_ = FALSE;
			_data_->_tmp34_ = gee_iterator_next (_data_->_tmp33_);
			if (!_data_->_tmp34_) {
				break;
			}
			_data_->_tmp35_ = _data_->_key_it;
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = gee_iterator_get (_data_->_tmp35_);
			_data_->key = (gchar*) _data_->_tmp36_;
			_data_->_tmp37_ = _data_->key;
			if (g_strcmp0 (_data_->_tmp37_, "main") != 0) {
				_data_->_tmp38_ = _data_->self->channels;
				_data_->_tmp39_ = _data_->key;
				_data_->_tmp40_ = NULL;
				_data_->_tmp40_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp38_, _data_->_tmp39_);
				_data_->channel = (FsoGsmChannel*) _data_->_tmp40_;
				_data_->_tmp41_ = _data_->channel;
				_data_->_state_ = 2;
				fso_framework_command_queue_open ((FsoFrameworkCommandQueue*) _data_->_tmp41_, fso_gsm_abstract_modem_open_ready, _data_);
				return FALSE;
				_state_2:
				_data_->_tmp42_ = FALSE;
				_data_->_tmp42_ = fso_framework_command_queue_open_finish ((FsoFrameworkCommandQueue*) _data_->_tmp41_, _data_->_res_);
				_data_->open = _data_->_tmp42_;
				_data_->_tmp43_ = _data_->open;
				if (!_data_->_tmp43_) {
					_data_->_tmp44_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
					_data_->_tmp45_ = _data_->key;
					_data_->_tmp46_ = NULL;
					_data_->_tmp46_ = string_to_string (_data_->_tmp45_);
					_data_->_tmp47_ = NULL;
					_data_->_tmp47_ = g_strconcat ("Can't open ", _data_->_tmp46_, " channel; open returned false", NULL);
					_data_->_tmp48_ = _data_->_tmp47_;
					fso_framework_logger_error (_data_->_tmp44_, _data_->_tmp48_);
					_g_free0 (_data_->_tmp48_);
					_data_->_tmp49_ = _data_->self->lowlevel;
					fso_gsm_low_level_poweroff (_data_->_tmp49_);
					_data_->result = FALSE;
					_g_object_unref0 (_data_->channel);
					_g_free0 (_data_->key);
					_g_object_unref0 (_data_->_key_it);
					_g_object_unref0 (_data_->mainchannel);
					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;
				}
				_g_object_unref0 (_data_->channel);
			}
			_g_free0 (_data_->key);
		}
		_g_object_unref0 (_data_->_key_it);
	}
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_INITIALIZING, FALSE);
	_data_->result = TRUE;
	_g_object_unref0 (_data_->mainchannel);
	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;
	_g_object_unref0 (_data_->mainchannel);
	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;
}


void fso_gsm_abstract_modem_open (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->open (self, _callback_, _user_data_);
}


gboolean fso_gsm_abstract_modem_open_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->open_finish (self, _res_);
}


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


static void fso_gsm_abstract_modem_real_close (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModemCloseData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAbstractModemCloseData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_close);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_close_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_abstract_modem_real_close_co (_data_);
}


static void fso_gsm_abstract_modem_real_close_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	FsoGsmAbstractModemCloseData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean _fso_gsm_abstract_modem_real_close_co_gsource_func (gpointer self) {
	gboolean result;
	result = fso_gsm_abstract_modem_real_close_co (self);
	return result;
}


static void fso_gsm_abstract_modem_close_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAbstractModemCloseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_close_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_close_co (FsoGsmAbstractModemCloseData* _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_ = 0;
	_data_->_tmp0_ = fso_gsm_modem_status ((FsoGsmModem*) _data_->self);
	if (_data_->_tmp0_ == FSO_GSM_MODEM_STATUS_CLOSED) {
		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_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp2_ = FALSE;
	_data_->_tmp2_ = fso_framework_logger_debug (_data_->_tmp1_, "Closing the modem device...");
	g_assert (_data_->_tmp2_);
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_CLOSING, FALSE);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 3, _fso_gsm_abstract_modem_real_close_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp3_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp4_ = FALSE;
	_data_->_tmp4_ = fso_framework_logger_debug (_data_->_tmp3_, "Check wether we have to deactivate the PDP context ...");
	g_assert (_data_->_tmp4_);
	_data_->_tmp6_ = fso_gsm_modem_get_pdphandler ((FsoGsmModem*) _data_->self);
	_data_->_tmp7_ = _data_->_tmp6_;
	if (_data_->_tmp7_ != NULL) {
		_data_->_tmp9_ = fso_gsm_modem_get_pdphandler ((FsoGsmModem*) _data_->self);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp11_ = fso_gsm_ipdp_handler_get_status (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		if (_data_->_tmp12_ == FREE_SMARTPHONE_GSM_CONTEXT_STATUS_ACTIVE) {
			_data_->_tmp8_ = TRUE;
		} else {
			_data_->_tmp13_ = fso_gsm_modem_get_pdphandler ((FsoGsmModem*) _data_->self);
			_data_->_tmp14_ = _data_->_tmp13_;
			_data_->_tmp15_ = fso_gsm_ipdp_handler_get_status (_data_->_tmp14_);
			_data_->_tmp16_ = _data_->_tmp15_;
			_data_->_tmp8_ = _data_->_tmp16_ == FREE_SMARTPHONE_GSM_CONTEXT_STATUS_SUSPENDED;
		}
		_data_->_tmp17_ = _data_->_tmp8_;
		_data_->_tmp5_ = _data_->_tmp17_;
	} else {
		_data_->_tmp5_ = FALSE;
	}
	_data_->_tmp18_ = _data_->_tmp5_;
	if (_data_->_tmp18_) {
		{
			_data_->_tmp19_ = fso_gsm_modem_get_pdphandler ((FsoGsmModem*) _data_->self);
			_data_->_tmp20_ = _data_->_tmp19_;
			_data_->_state_ = 2;
			fso_gsm_ipdp_handler_deactivate (_data_->_tmp20_, fso_gsm_abstract_modem_close_ready, _data_);
			return FALSE;
			_state_2:
			fso_gsm_ipdp_handler_deactivate_finish (_data_->_tmp20_, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch49_g_error;
			}
		}
		goto __finally49;
		__catch49_g_error:
		{
			_data_->e = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp21_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
			_data_->_tmp22_ = _data_->e;
			_data_->_tmp23_ = _data_->_tmp22_->message;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = string_to_string (_data_->_tmp23_);
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = g_strconcat ("Could not deactivate PDP handle: ", _data_->_tmp24_, NULL);
			_data_->_tmp26_ = _data_->_tmp25_;
			fso_framework_logger_error (_data_->_tmp21_, _data_->_tmp26_);
			_g_free0 (_data_->_tmp26_);
			_g_error_free0 (_data_->e);
		}
		__finally49:
		if (_data_->_inner_error_ != NULL) {
			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;
		}
	}
	_data_->_tmp27_ = _data_->self->channels;
	_data_->_tmp28_ = gee_abstract_map_get_values ((GeeMap*) _data_->_tmp27_);
	_data_->_tmp29_ = _data_->_tmp28_;
	_data_->channels = _data_->_tmp29_;
	{
		_data_->_tmp30_ = _data_->channels;
		_data_->_tmp31_ = NULL;
		_data_->_tmp31_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp30_);
		_data_->_channel_it = _data_->_tmp31_;
		while (TRUE) {
			_data_->_tmp32_ = _data_->_channel_it;
			_data_->_tmp33_ = FALSE;
			_data_->_tmp33_ = gee_iterator_next (_data_->_tmp32_);
			if (!_data_->_tmp33_) {
				break;
			}
			_data_->_tmp34_ = _data_->_channel_it;
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = gee_iterator_get (_data_->_tmp34_);
			_data_->channel = (FsoGsmChannel*) _data_->_tmp35_;
			_data_->_tmp36_ = _data_->channel;
			fso_framework_command_queue_close ((FsoFrameworkCommandQueue*) _data_->_tmp36_, NULL, NULL);
			_g_object_unref0 (_data_->channel);
		}
		_g_object_unref0 (_data_->_channel_it);
	}
	_data_->_tmp37_ = _data_->self->lowlevel;
	fso_gsm_low_level_poweroff (_data_->_tmp37_);
	fso_gsm_abstract_modem_powerOff (_data_->self);
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_CLOSED, TRUE);
	fso_gsm_abstract_modem_initData (_data_->self);
	_g_object_unref0 (_data_->channels);
	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;
}


void fso_gsm_abstract_modem_close (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->close (self, _callback_, _user_data_);
}


void fso_gsm_abstract_modem_close_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->close_finish (self, _res_);
}


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


static void fso_gsm_abstract_modem_real_suspend (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModemSuspendData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAbstractModemSuspendData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_suspend);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_suspend_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_abstract_modem_real_suspend_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_suspend_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	gboolean result;
	FsoGsmAbstractModemSuspendData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_abstract_modem_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAbstractModemSuspendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_suspend_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_suspend_co (FsoGsmAbstractModemSuspendData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->modem_status;
	_data_->self->modem_status_before_suspend = _data_->_tmp0_;
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_SUSPENDING, FALSE);
	_data_->_tmp1_ = _data_->self->channels;
	_data_->_tmp2_ = gee_abstract_map_get_values ((GeeMap*) _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->channels = _data_->_tmp3_;
	{
		_data_->_tmp4_ = _data_->channels;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp4_);
		_data_->_channel_it = _data_->_tmp5_;
		while (TRUE) {
			_data_->_tmp6_ = _data_->_channel_it;
			_data_->_tmp7_ = FALSE;
			_data_->_tmp7_ = gee_iterator_next (_data_->_tmp6_);
			if (!_data_->_tmp7_) {
				break;
			}
			_data_->_tmp8_ = _data_->_channel_it;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = gee_iterator_get (_data_->_tmp8_);
			_data_->channel = (FsoGsmChannel*) _data_->_tmp9_;
			_data_->_tmp10_ = _data_->channel;
			_data_->_state_ = 1;
			fso_gsm_channel_suspend (_data_->_tmp10_, fso_gsm_abstract_modem_suspend_ready, _data_);
			return FALSE;
			_state_1:
			fso_gsm_channel_suspend_finish (_data_->_tmp10_, _data_->_res_);
			_g_object_unref0 (_data_->channel);
		}
		_g_object_unref0 (_data_->_channel_it);
	}
	_data_->_tmp11_ = _data_->self->lowlevel;
	fso_gsm_low_level_suspend (_data_->_tmp11_);
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_SUSPENDED, FALSE);
	_data_->result = TRUE;
	_g_object_unref0 (_data_->channels);
	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;
	_g_object_unref0 (_data_->channels);
	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;
}


void fso_gsm_abstract_modem_suspend (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->suspend (self, _callback_, _user_data_);
}


gboolean fso_gsm_abstract_modem_suspend_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->suspend_finish (self, _res_);
}


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


static void fso_gsm_abstract_modem_real_resume (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModemResumeData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAbstractModemResumeData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_resume);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_resume_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_abstract_modem_real_resume_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_resume_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	gboolean result;
	FsoGsmAbstractModemResumeData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_abstract_modem_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAbstractModemResumeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_resume_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_resume_co (FsoGsmAbstractModemResumeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->lowlevel;
	fso_gsm_low_level_resume (_data_->_tmp0_);
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, FSO_GSM_MODEM_STATUS_RESUMING, FALSE);
	_data_->_tmp1_ = _data_->self->channels;
	_data_->_tmp2_ = gee_abstract_map_get_values ((GeeMap*) _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->channels = _data_->_tmp3_;
	{
		_data_->_tmp4_ = _data_->channels;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp4_);
		_data_->_channel_it = _data_->_tmp5_;
		while (TRUE) {
			_data_->_tmp6_ = _data_->_channel_it;
			_data_->_tmp7_ = FALSE;
			_data_->_tmp7_ = gee_iterator_next (_data_->_tmp6_);
			if (!_data_->_tmp7_) {
				break;
			}
			_data_->_tmp8_ = _data_->_channel_it;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = gee_iterator_get (_data_->_tmp8_);
			_data_->channel = (FsoGsmChannel*) _data_->_tmp9_;
			_data_->_tmp10_ = _data_->channel;
			_data_->_state_ = 1;
			fso_gsm_channel_resume (_data_->_tmp10_, fso_gsm_abstract_modem_resume_ready, _data_);
			return FALSE;
			_state_1:
			fso_gsm_channel_resume_finish (_data_->_tmp10_, _data_->_res_);
			_g_object_unref0 (_data_->channel);
		}
		_g_object_unref0 (_data_->_channel_it);
	}
	_data_->_tmp11_ = _data_->self->modem_status_before_suspend;
	fso_gsm_modem_advanceToState ((FsoGsmModem*) _data_->self, _data_->_tmp11_, TRUE);
	_data_->result = TRUE;
	_g_object_unref0 (_data_->channels);
	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;
	_g_object_unref0 (_data_->channels);
	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;
}


void fso_gsm_abstract_modem_resume (FsoGsmAbstractModem* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->resume (self, _callback_, _user_data_);
}


gboolean fso_gsm_abstract_modem_resume_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_) {
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->resume_finish (self, _res_);
}


static void fso_gsm_abstract_modem_real_injectResponse (FsoGsmAbstractModem* self, const gchar* command, const gchar* channel, GError** error) {
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_ = NULL;
	FsoGsmChannel* chan;
	FsoGsmChannel* _tmp3_;
	FsoGsmChannel* _tmp10_;
	const gchar* _tmp11_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (command != NULL);
	g_return_if_fail (channel != NULL);
	_tmp0_ = self->channels;
	_tmp1_ = channel;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
	chan = (FsoGsmChannel*) _tmp2_;
	_tmp3_ = chan;
	if (_tmp3_ == NULL) {
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		GError* _tmp8_;
		GError* _tmp9_;
		_tmp4_ = channel;
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = g_strconcat ("Channel ", _tmp5_, " not found", NULL);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INVALID_PARAMETER, _tmp7_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		_inner_error_ = _tmp9_;
		if (_inner_error_->domain == FREE_SMARTPHONE_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (chan);
			return;
		} else {
			_g_object_unref0 (chan);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp10_ = chan;
	_tmp11_ = command;
	fso_gsm_channel_injectResponse (_tmp10_, _tmp11_);
	_g_object_unref0 (chan);
}


void fso_gsm_abstract_modem_injectResponse (FsoGsmAbstractModem* self, const gchar* command, const gchar* channel, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->injectResponse (self, command, channel, error);
}


static void fso_gsm_abstract_modem_real_setFunctionality_data_free (gpointer _data) {
	fso_gsm_abstract_modem_setFunctionalityData* _data_;
	_data_ = _data;
	_g_free0 (_data_->level);
	_g_free0 (_data_->pin);
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_abstract_modem_setFunctionalityData, _data_);
}


static void fso_gsm_abstract_modem_real_setFunctionality (FsoGsmAbstractModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_abstract_modem_setFunctionalityData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	_data_ = g_slice_new0 (fso_gsm_abstract_modem_setFunctionalityData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_setFunctionality);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_setFunctionality_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = level;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->level = _tmp2_;
	_tmp3_ = autoregister;
	_data_->autoregister = _tmp3_;
	_tmp4_ = pin;
	_tmp5_ = g_strdup (_tmp4_);
	_data_->pin = _tmp5_;
	fso_gsm_abstract_modem_real_setFunctionality_co (_data_);
}


static void fso_gsm_abstract_modem_real_setFunctionality_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_, GError** error) {
	fso_gsm_abstract_modem_setFunctionalityData* _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 fso_gsm_abstract_modem_setFunctionality_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_abstract_modem_setFunctionalityData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_setFunctionality_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_setFunctionality_co (fso_gsm_abstract_modem_setFunctionalityData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = fso_gsm_modem_createMediator ((FsoGsmModem*) _data_->self, FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY, (GBoxedCopyFunc) g_object_ref, g_object_unref, &_data_->_inner_error_);
	_data_->m = (FsoGsmDeviceSetFunctionality*) _data_->_tmp0_;
	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;
		}
	}
	_data_->_tmp1_ = _data_->m;
	_data_->_tmp2_ = _data_->level;
	_data_->_tmp3_ = _data_->autoregister;
	_data_->_tmp4_ = _data_->pin;
	_data_->_state_ = 1;
	fso_gsm_device_set_functionality_run (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, fso_gsm_abstract_modem_setFunctionality_ready, _data_);
	return FALSE;
	_state_1:
	fso_gsm_device_set_functionality_run_finish (_data_->_tmp1_, _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_);
			_g_object_unref0 (_data_->m);
			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_->m);
			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;
		}
	}
	_data_->_tmp5_ = fso_gsm_modem_get_watchdog ((FsoGsmModem*) _data_->self);
	_data_->_tmp6_ = _data_->_tmp5_;
	fso_gsm_watch_dog_check (_data_->_tmp6_);
	_g_object_unref0 (_data_->m);
	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;
}


void fso_gsm_abstract_modem_setFunctionality (FsoGsmAbstractModem* self, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->setFunctionality (self, level, autoregister, pin, _callback_, _user_data_);
}


void fso_gsm_abstract_modem_setFunctionality_finish (FsoGsmAbstractModem* self, GAsyncResult* _res_, GError** error) {
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->setFunctionality_finish (self, _res_, error);
}


static gpointer fso_gsm_abstract_modem_real_theDevice (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func) {
	FsoGsmAbstractModem * self;
	gpointer result = NULL;
	GObject* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	GObject* _tmp3_;
	gpointer _tmp4_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = fso_gsm_modem_get_parent ((FsoGsmModem*) self);
	_tmp1_ = _tmp0_;
	g_assert (_tmp1_ != NULL);
	_tmp2_ = fso_gsm_modem_get_parent ((FsoGsmModem*) self);
	_tmp3_ = _tmp2_;
	_tmp4_ = ((((gconstpointer) _tmp3_) != NULL) && (t_dup_func != NULL)) ? t_dup_func ((gpointer) ((gconstpointer) _tmp3_)) : ((gpointer) ((gconstpointer) _tmp3_));
	result = _tmp4_;
	return result;
}


static FsoGsmModemStatus fso_gsm_abstract_modem_real_status (FsoGsmModem* base) {
	FsoGsmAbstractModem * self;
	FsoGsmModemStatus result = 0;
	FsoGsmModemStatus _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->modem_status;
	result = _tmp0_;
	return result;
}


static FsoGsmModemNetworkStatus fso_gsm_abstract_modem_real_network_status (FsoGsmModem* base) {
	FsoGsmAbstractModem * self;
	FsoGsmModemNetworkStatus result = 0;
	FsoGsmModemNetworkStatus _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->modem_network_status;
	result = _tmp0_;
	return result;
}


static FsoGsmModemData* fso_gsm_abstract_modem_real_data (FsoGsmModem* base) {
	FsoGsmAbstractModem * self;
	FsoGsmModemData* result = NULL;
	FsoGsmModemData* _tmp0_;
	FsoGsmModemData* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->modem_data;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


static FsoGsmChannel* fso_gsm_abstract_modem_real_channel (FsoGsmAbstractModem* self, const gchar* category) {
	FsoGsmChannel* result = NULL;
	GeeHashMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	const gchar* _tmp3_;
	g_return_val_if_fail (category != NULL, NULL);
	_tmp0_ = self->channels;
	_tmp1_ = gee_abstract_map_get_size ((GeeMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == 0) {
		result = NULL;
		return result;
	}
	_tmp3_ = category;
	if (g_strcmp0 (_tmp3_, "") == 0) {
		{
			GeeHashMap* _tmp4_;
			GeeCollection* _tmp5_;
			GeeCollection* _tmp6_;
			GeeCollection* _tmp7_;
			GeeIterator* _tmp8_ = NULL;
			GeeIterator* _tmp9_;
			GeeIterator* _chan_it;
			_tmp4_ = self->channels;
			_tmp5_ = gee_abstract_map_get_values ((GeeMap*) _tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = _tmp6_;
			_tmp8_ = gee_iterable_iterator ((GeeIterable*) _tmp7_);
			_tmp9_ = _tmp8_;
			_g_object_unref0 (_tmp7_);
			_chan_it = _tmp9_;
			while (TRUE) {
				GeeIterator* _tmp10_;
				gboolean _tmp11_ = FALSE;
				GeeIterator* _tmp12_;
				gpointer _tmp13_ = NULL;
				FsoGsmChannel* chan;
				_tmp10_ = _chan_it;
				_tmp11_ = gee_iterator_next (_tmp10_);
				if (!_tmp11_) {
					break;
				}
				_tmp12_ = _chan_it;
				_tmp13_ = gee_iterator_get (_tmp12_);
				chan = (FsoGsmChannel*) _tmp13_;
				result = chan;
				_g_object_unref0 (_chan_it);
				return result;
			}
			_g_object_unref0 (_chan_it);
		}
	} else {
		GeeHashMap* _tmp14_;
		const gchar* _tmp15_;
		gpointer _tmp16_ = NULL;
		_tmp14_ = self->channels;
		_tmp15_ = category;
		_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp14_, _tmp15_);
		result = (FsoGsmChannel*) _tmp16_;
		return result;
	}
	result = NULL;
	return result;
}


FsoGsmChannel* fso_gsm_abstract_modem_channel (FsoGsmAbstractModem* self, const gchar* category) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->channel (self, category);
}


static gpointer fso_gsm_abstract_modem_real_createMediator (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error) {
	FsoGsmAbstractModem * self;
	gpointer result = NULL;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_ = NULL;
	GType typ;
	GType _tmp2_;
	GType _tmp3_;
	GType _tmp15_;
	GObject* _tmp16_ = NULL;
	GObject* _tmp17_;
	gpointer obj;
	FsoFrameworkLogger* _tmp18_;
	const gchar* _tmp19_ = NULL;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_;
	gboolean _tmp23_ = FALSE;
	GError * _inner_error_ = NULL;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->mediators;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, GINT_TO_POINTER (t_type));
	typ = GPOINTER_TO_INT (_tmp1_);
	_tmp2_ = typ;
	g_assert (_tmp2_ != t_type);
	_tmp3_ = typ;
	if (_tmp3_ == G_TYPE_INVALID) {
		FsoFrameworkLogger* _tmp4_;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		const gchar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_;
		GError* _tmp13_;
		GError* _tmp14_;
		_tmp4_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp5_ = g_type_name (t_type);
		_tmp6_ = string_to_string (_tmp5_);
		_tmp7_ = g_strconcat ("Requested mediator ", _tmp6_, " not present for this modem", NULL);
		_tmp8_ = _tmp7_;
		fso_framework_logger_error (_tmp4_, _tmp8_);
		_g_free0 (_tmp8_);
		_tmp9_ = g_type_name (t_type);
		_tmp10_ = string_to_string (_tmp9_);
		_tmp11_ = g_strconcat ("Not implemented (yet) for this modem (M:", _tmp10_, ")", NULL);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INTERNAL_ERROR, _tmp12_);
		_tmp14_ = _tmp13_;
		_g_free0 (_tmp12_);
		_inner_error_ = _tmp14_;
		if (_inner_error_->domain == FREE_SMARTPHONE_ERROR) {
			g_propagate_error (error, _inner_error_);
			return NULL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	_tmp15_ = typ;
	_tmp16_ = g_object_new (_tmp15_, NULL);
	_tmp17_ = G_IS_INITIALLY_UNOWNED (_tmp16_) ? g_object_ref_sink (_tmp16_) : _tmp16_;
	obj = _tmp17_;
	g_assert (obj != NULL);
	_tmp18_ = ((FsoFrameworkAbstractObject*) self)->logger;
	_tmp19_ = g_type_name (t_type);
	_tmp20_ = string_to_string (_tmp19_);
	_tmp21_ = g_strconcat ("Created mediator ", _tmp20_, NULL);
	_tmp22_ = _tmp21_;
	_tmp23_ = fso_framework_logger_debug (_tmp18_, _tmp22_);
	g_assert (_tmp23_);
	_g_free0 (_tmp22_);
	result = obj;
	return result;
}


static gpointer fso_gsm_abstract_modem_real_createAtCommand (FsoGsmModem* base, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command) {
	FsoGsmAbstractModem * self;
	gpointer result = NULL;
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_ = NULL;
	FsoGsmAtCommand* cmd;
	gpointer _tmp8_;
	self = (FsoGsmAbstractModem*) base;
	g_return_val_if_fail (command != NULL, NULL);
	_tmp0_ = self->commands;
	_tmp1_ = command;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
	cmd = (FsoGsmAtCommand*) _tmp2_;
	if (cmd == NULL) {
		FsoFrameworkLogger* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		_tmp3_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp4_ = command;
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = g_strconcat ("Requested AT command ", _tmp5_, " unknown", NULL);
		_tmp7_ = _tmp6_;
		fso_framework_logger_critical (_tmp3_, _tmp7_);
		_g_free0 (_tmp7_);
		g_assert_not_reached ();
	}
	_tmp8_ = ((((gconstpointer) cmd) != NULL) && (t_dup_func != NULL)) ? t_dup_func ((gpointer) ((gconstpointer) cmd)) : ((gpointer) ((gconstpointer) cmd));
	result = _tmp8_;
	_g_object_unref0 (cmd);
	return result;
}


/**
     * Override this, if the data port is not static or if you need special initialization
     * before the data context is being opened.
     **/
static gchar* fso_gsm_abstract_modem_real_allocateDataPort (FsoGsmAbstractModem* self) {
	gchar* result = NULL;
	FsoFrameworkTransportSpec* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	_tmp0_ = self->priv->_data_transport_spec;
	_tmp1_ = _tmp0_->name;
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}


gchar* fso_gsm_abstract_modem_allocateDataPort (FsoGsmAbstractModem* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->allocateDataPort (self);
}


/**
     * Override this, if you need to clean up after the data context is being closed.
     **/
static void fso_gsm_abstract_modem_real_releaseDataPort (FsoGsmAbstractModem* self) {
}


void fso_gsm_abstract_modem_releaseDataPort (FsoGsmAbstractModem* self) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_MODEM_GET_CLASS (self)->releaseDataPort (self);
}


static void fso_gsm_abstract_modem_real_processAtCommandAsync_data_free (gpointer _data) {
	fso_gsm_abstract_modem_processAtCommandAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->command);
	_g_free0 (_data_->request);
	_data_->result = (_vala_array_free (_data_->result, _data_->result_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_abstract_modem_processAtCommandAsyncData, _data_);
}


static void fso_gsm_abstract_modem_real_processAtCommandAsync (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModem * self;
	fso_gsm_abstract_modem_processAtCommandAsyncData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	FsoGsmAtCommand* _tmp1_;
	FsoGsmAtCommand* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gint _tmp5_;
	self = (FsoGsmAbstractModem*) base;
	_data_ = g_slice_new0 (fso_gsm_abstract_modem_processAtCommandAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_processAtCommandAsync);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_processAtCommandAsync_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = command;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->command = _tmp2_;
	_tmp3_ = request;
	_tmp4_ = g_strdup (_tmp3_);
	_data_->request = _tmp4_;
	_tmp5_ = retries;
	_data_->retries = _tmp5_;
	fso_gsm_abstract_modem_real_processAtCommandAsync_co (_data_);
}


static gchar** fso_gsm_abstract_modem_real_processAtCommandAsync_finish (FsoGsmModem* base, GAsyncResult* _res_, int* result_length1) {
	gchar** result;
	fso_gsm_abstract_modem_processAtCommandAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	*result_length1 = _data_->result_length1;
	_data_->result = NULL;
	return result;
}


static void fso_gsm_abstract_modem_processAtCommandAsync_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_abstract_modem_processAtCommandAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_processAtCommandAsync_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_processAtCommandAsync_co (fso_gsm_abstract_modem_processAtCommandAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->command;
	_data_->_tmp1_ = _data_->request;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_abstract_modem_channelForCommand (_data_->self, _data_->_tmp0_, _data_->_tmp1_);
	_data_->channel = FSO_GSM_IS_AT_CHANNEL (_data_->_tmp2_) ? ((FsoGsmAtChannel*) _data_->_tmp2_) : NULL;
	_data_->_tmp3_ = _data_->command;
	_data_->_tmp4_ = _data_->request;
	_data_->_tmp5_ = _data_->retries;
	_data_->_tmp6_ = 0;
	_data_->_state_ = 1;
	fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->channel, (FsoGsmAtCommandQueueCommand*) _data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, 0, fso_gsm_abstract_modem_processAtCommandAsync_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->channel, _data_->_res_, &_data_->_tmp6_);
	_data_->response = _data_->_tmp7_;
	_data_->response_length1 = _data_->_tmp6_;
	_data_->_response_size_ = _data_->response_length1;
	_data_->_tmp8_ = _data_->response;
	_data_->_tmp8__length1 = _data_->response_length1;
	_data_->result_length1 = _data_->_tmp8__length1;
	_data_->result = _data_->_tmp8_;
	_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_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
	_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 fso_gsm_abstract_modem_real_sendAtCommand (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries) {
	FsoGsmAbstractModem * self;
	FsoGsmAtCommand* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmChannel* _tmp2_ = NULL;
	FsoGsmAtChannel* channel;
	FsoGsmAtCommand* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
	self = (FsoGsmAbstractModem*) base;
	g_return_if_fail (command != NULL);
	g_return_if_fail (request != NULL);
	_tmp0_ = command;
	_tmp1_ = request;
	_tmp2_ = fso_gsm_abstract_modem_channelForCommand (self, _tmp0_, _tmp1_);
	channel = FSO_GSM_IS_AT_CHANNEL (_tmp2_) ? ((FsoGsmAtChannel*) _tmp2_) : NULL;
	_tmp3_ = command;
	_tmp4_ = request;
	_tmp5_ = retries;
	fso_gsm_at_command_queue_enqueue ((FsoGsmAtCommandQueue*) channel, (FsoGsmAtCommandQueueCommand*) _tmp3_, _tmp4_, _tmp5_);
	_g_object_unref0 (channel);
}


static void fso_gsm_abstract_modem_real_processAtPduCommandAsync_data_free (gpointer _data) {
	fso_gsm_abstract_modem_processAtPduCommandAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->command);
	_g_free0 (_data_->request);
	_data_->result = (_vala_array_free (_data_->result, _data_->result_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_abstract_modem_processAtPduCommandAsyncData, _data_);
}


static void fso_gsm_abstract_modem_real_processAtPduCommandAsync (FsoGsmModem* base, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAbstractModem * self;
	fso_gsm_abstract_modem_processAtPduCommandAsyncData* _data_;
	FsoGsmAbstractModem* _tmp0_;
	FsoGsmAtCommand* _tmp1_;
	FsoGsmAtCommand* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gint _tmp5_;
	self = (FsoGsmAbstractModem*) base;
	_data_ = g_slice_new0 (fso_gsm_abstract_modem_processAtPduCommandAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_abstract_modem_real_processAtPduCommandAsync);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_abstract_modem_real_processAtPduCommandAsync_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = command;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->command = _tmp2_;
	_tmp3_ = request;
	_tmp4_ = g_strdup (_tmp3_);
	_data_->request = _tmp4_;
	_tmp5_ = retries;
	_data_->retries = _tmp5_;
	fso_gsm_abstract_modem_real_processAtPduCommandAsync_co (_data_);
}


static gchar** fso_gsm_abstract_modem_real_processAtPduCommandAsync_finish (FsoGsmModem* base, GAsyncResult* _res_, int* result_length1) {
	gchar** result;
	fso_gsm_abstract_modem_processAtPduCommandAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	*result_length1 = _data_->result_length1;
	_data_->result = NULL;
	return result;
}


static void fso_gsm_abstract_modem_processAtPduCommandAsync_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_abstract_modem_processAtPduCommandAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_abstract_modem_real_processAtPduCommandAsync_co (_data_);
}


static gboolean fso_gsm_abstract_modem_real_processAtPduCommandAsync_co (fso_gsm_abstract_modem_processAtPduCommandAsyncData* _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_ = _data_->command;
	_data_->_tmp1_ = _data_->request;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_abstract_modem_channelForCommand (_data_->self, _data_->_tmp0_, _data_->_tmp1_);
	_data_->channel = FSO_GSM_IS_AT_CHANNEL (_data_->_tmp2_) ? ((FsoGsmAtChannel*) _data_->_tmp2_) : NULL;
	_data_->_tmp3_ = _data_->request;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->_tmp4_ = g_strsplit (_data_->_tmp3_, "\n", 0);
	_data_->pdurequest = _data_->_tmp5_;
	_data_->pdurequest_length1 = _vala_array_length (_data_->_tmp4_);
	_data_->_pdurequest_size_ = _data_->pdurequest_length1;
	_data_->_tmp6_ = _data_->pdurequest;
	_data_->_tmp6__length1 = _data_->pdurequest_length1;
	g_assert (_data_->_tmp6__length1 == 2);
	_data_->_tmp7_ = _data_->channel;
	_data_->_tmp8_ = _data_->command;
	_data_->_tmp9_ = _data_->pdurequest;
	_data_->_tmp9__length1 = _data_->pdurequest_length1;
	_data_->_tmp10_ = _data_->_tmp9_[0];
	_data_->_tmp11_ = _data_->retries;
	_data_->_tmp12_ = 0;
	_data_->_state_ = 1;
	fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->_tmp7_, (FsoGsmAtCommandQueueCommand*) _data_->_tmp8_, _data_->_tmp10_, _data_->_tmp11_, 0, fso_gsm_abstract_modem_processAtPduCommandAsync_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->_tmp7_, _data_->_res_, &_data_->_tmp12_);
	_data_->continuation = _data_->_tmp13_;
	_data_->continuation_length1 = _data_->_tmp12_;
	_data_->_continuation_size_ = _data_->continuation_length1;
	_data_->_tmp15_ = _data_->continuation;
	_data_->_tmp15__length1 = _data_->continuation_length1;
	if (_data_->_tmp15__length1 == 1) {
		_data_->_tmp16_ = _data_->continuation;
		_data_->_tmp16__length1 = _data_->continuation_length1;
		_data_->_tmp17_ = _data_->_tmp16_[0];
		_data_->_tmp14_ = g_strcmp0 (_data_->_tmp17_, "> ") == 0;
	} else {
		_data_->_tmp14_ = FALSE;
	}
	_data_->_tmp18_ = _data_->_tmp14_;
	g_assert (_data_->_tmp18_);
	_data_->_tmp19_ = _data_->channel;
	_data_->_tmp20_ = _data_->command;
	_data_->_tmp21_ = _data_->pdurequest;
	_data_->_tmp21__length1 = _data_->pdurequest_length1;
	_data_->_tmp22_ = _data_->_tmp21_[1];
	_data_->_tmp23_ = _data_->retries;
	_data_->_tmp24_ = 0;
	_data_->_state_ = 2;
	fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->_tmp19_, (FsoGsmAtCommandQueueCommand*) _data_->_tmp20_, _data_->_tmp22_, _data_->_tmp23_, 0, fso_gsm_abstract_modem_processAtPduCommandAsync_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->_tmp19_, _data_->_res_, &_data_->_tmp24_);
	_data_->response = _data_->_tmp25_;
	_data_->response_length1 = _data_->_tmp24_;
	_data_->_response_size_ = _data_->response_length1;
	_data_->_tmp26_ = _data_->response;
	_data_->_tmp26__length1 = _data_->response_length1;
	_data_->result_length1 = _data_->_tmp26__length1;
	_data_->result = _data_->_tmp26_;
	_data_->continuation = (_vala_array_free (_data_->continuation, _data_->continuation_length1, (GDestroyNotify) g_free), NULL);
	_data_->pdurequest = (_vala_array_free (_data_->pdurequest, _data_->pdurequest_length1, (GDestroyNotify) g_free), NULL);
	_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_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
	_data_->continuation = (_vala_array_free (_data_->continuation, _data_->continuation_length1, (GDestroyNotify) g_free), NULL);
	_data_->pdurequest = (_vala_array_free (_data_->pdurequest, _data_->pdurequest_length1, (GDestroyNotify) g_free), NULL);
	_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;
}


void fso_gsm_abstract_modem_processUnsolicitedResponse (FsoGsmAbstractModem* self, const gchar* prefix, const gchar* righthandside, const gchar* pdu) {
	FsoGsmUnsolicitedResponseHandler* _tmp0_;
	FsoGsmUnsolicitedResponseHandler* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean _tmp5_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prefix != NULL);
	g_return_if_fail (righthandside != NULL);
	_tmp0_ = self->urc;
	g_assert (_tmp0_ != NULL);
	_tmp1_ = self->urc;
	_tmp2_ = prefix;
	_tmp3_ = righthandside;
	_tmp4_ = pdu;
	_tmp5_ = fso_gsm_unsolicited_response_handler_dispatch (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
	if (!_tmp5_) {
		FsoFrameworkLogger* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_ = NULL;
		const gchar* _tmp9_;
		const gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_;
		_tmp6_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp7_ = prefix;
		_tmp8_ = string_to_string (_tmp7_);
		_tmp9_ = righthandside;
		_tmp10_ = string_to_string (_tmp9_);
		_tmp11_ = g_strconcat ("No handler for URC ", _tmp8_, " w/ rhs ", _tmp10_, ", please report to Mickey <smartphones-userland@linuxtogo.org>", NULL);
		_tmp12_ = _tmp11_;
		fso_framework_logger_warning (_tmp6_, _tmp12_);
		_g_free0 (_tmp12_);
	}
}


GType fso_gsm_abstract_modem_mediatorFactory (FsoGsmAbstractModem* self, GType mediator, GError** error) {
	GType result = 0UL;
	GeeHashMap* _tmp0_;
	GType _tmp1_;
	gpointer _tmp2_ = NULL;
	GType typ;
	GType _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, 0UL);
	_tmp0_ = self->mediators;
	_tmp1_ = mediator;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, GINT_TO_POINTER (_tmp1_));
	typ = GPOINTER_TO_INT (_tmp2_);
	_tmp3_ = typ;
	if (_tmp3_ == G_TYPE_INVALID) {
		GType _tmp4_;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		GError* _tmp9_;
		GError* _tmp10_;
		_tmp4_ = mediator;
		_tmp5_ = g_type_name (_tmp4_);
		_tmp6_ = string_to_string (_tmp5_);
		_tmp7_ = g_strconcat ("Requested mediator ", _tmp6_, " unknown", NULL);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INTERNAL_ERROR, _tmp8_);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		_inner_error_ = _tmp10_;
		if (_inner_error_->domain == FREE_SMARTPHONE_ERROR) {
			g_propagate_error (error, _inner_error_);
			return 0UL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0UL;
		}
	}
	result = typ;
	return result;
}


FsoGsmAtCommand* fso_gsm_abstract_modem_atCommandFactory (FsoGsmAbstractModem* self, const gchar* command, GError** error) {
	FsoGsmAtCommand* result = NULL;
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_ = NULL;
	FsoGsmAtCommand* cmd;
	FsoGsmAtCommand* _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (command != NULL, NULL);
	_tmp0_ = self->commands;
	_tmp1_ = command;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
	cmd = (FsoGsmAtCommand*) _tmp2_;
	_tmp3_ = cmd;
	if (_tmp3_ == NULL) {
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		GError* _tmp8_;
		GError* _tmp9_;
		_tmp4_ = command;
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = g_strconcat ("Requested AT command ", _tmp5_, " unknown", NULL);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INTERNAL_ERROR, _tmp7_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		_inner_error_ = _tmp9_;
		if (_inner_error_->domain == FREE_SMARTPHONE_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (cmd);
			return NULL;
		} else {
			_g_object_unref0 (cmd);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	result = cmd;
	return result;
}


static void _fso_gsm_abstract_modem_onChannelHangup_fso_gsm_channel_hangup (FsoGsmChannel* _sender, gpointer self) {
	fso_gsm_abstract_modem_onChannelHangup (self);
}


static void _fso_gsm_abstract_modem_processUnsolicitedResponse_fso_framework_command_queue_unsolicited_handler (const gchar* prefix, const gchar* response, const gchar* pdu, gpointer self) {
	fso_gsm_abstract_modem_processUnsolicitedResponse (self, prefix, response, pdu);
}


static void fso_gsm_abstract_modem_real_registerChannel (FsoGsmModem* base, const gchar* name, FsoGsmChannel* channel) {
	FsoGsmAbstractModem * self;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	const gchar* _tmp2_;
	gpointer _tmp3_ = NULL;
	FsoGsmChannel* _tmp4_;
	GeeHashMap* _tmp5_;
	const gchar* _tmp6_;
	FsoGsmChannel* _tmp7_;
	FsoGsmChannel* _tmp8_;
	FsoGsmChannel* _tmp9_;
	self = (FsoGsmAbstractModem*) base;
	g_return_if_fail (name != NULL);
	g_return_if_fail (channel != NULL);
	_tmp0_ = self->channels;
	g_assert (_tmp0_ != NULL);
	_tmp1_ = self->channels;
	_tmp2_ = name;
	_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp2_);
	_tmp4_ = (FsoGsmChannel*) _tmp3_;
	g_assert (_tmp4_ == NULL);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->channels;
	_tmp6_ = name;
	_tmp7_ = channel;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, _tmp6_, _tmp7_);
	_tmp8_ = channel;
	g_signal_connect_object (_tmp8_, "hangup", (GCallback) _fso_gsm_abstract_modem_onChannelHangup_fso_gsm_channel_hangup, self, 0);
	_tmp9_ = channel;
	if (FSO_GSM_IS_AT_CHANNEL (_tmp9_)) {
		FsoGsmChannel* _tmp10_;
		_tmp10_ = channel;
		fso_framework_command_queue_registerUnsolicitedHandler ((FsoFrameworkCommandQueue*) _tmp10_, _fso_gsm_abstract_modem_processUnsolicitedResponse_fso_framework_command_queue_unsolicited_handler, self);
	}
}


/**
     * The only reason for this to be public is that the only authorized source to call this
     * is the command queues / channels and there are no friend classes in Vala. However,
     * it should _never_ be called by any other classes.
     **/
static gboolean ____lambda4_ (FsoGsmAbstractModem* self) {
	gboolean result = FALSE;
	self->modemSimTimeoutWatch = (guint) 0;
	fso_gsm_modem_advanceToState ((FsoGsmModem*) self, FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY, FALSE);
	result = FALSE;
	return result;
}


static gboolean _____lambda4__gsource_func (gpointer self) {
	gboolean result;
	result = ____lambda4_ (self);
	return result;
}


static void fso_gsm_abstract_modem_real_advanceToState (FsoGsmModem* base, FsoGsmModemStatus next, gboolean force) {
	FsoGsmAbstractModem * self;
	FsoGsmModemStatus _tmp0_;
	FsoGsmModemStatus _tmp1_;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_;
	gboolean _tmp11_;
	FsoGsmModemStatus _tmp17_;
	FsoGsmModemStatus _tmp20_;
	FsoGsmModemStatus _tmp26_;
	FsoGsmModemStatus _tmp27_;
	GObject* _tmp28_;
	GObject* _tmp29_;
	FsoFrameworkLogger* _tmp35_;
	FsoGsmModemStatus _tmp36_;
	GEnumValue* _tmp37_;
	gchar* _tmp38_ = NULL;
	gchar* _tmp39_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = next;
	_tmp1_ = self->modem_status;
	if (_tmp0_ == _tmp1_) {
		FsoFrameworkLogger* _tmp2_;
		FsoGsmModemStatus _tmp3_;
		GEnumValue* _tmp4_;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		_tmp2_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp3_ = next;
		_tmp4_ = g_enum_get_value (g_type_class_ref (FSO_GSM_MODEM_TYPE_STATUS), _tmp3_);
		_tmp5_ = g_strconcat ("Already in status ", (_tmp4_ != NULL) ? _tmp4_->value_name : NULL, ", not advancing", NULL);
		_tmp6_ = _tmp5_;
		fso_framework_logger_debug (_tmp2_, _tmp6_);
		_g_free0 (_tmp6_);
		return;
	}
	_tmp8_ = force;
	if (!_tmp8_) {
		FsoGsmModemStatus _tmp9_;
		FsoGsmModemStatus _tmp10_;
		_tmp9_ = next;
		_tmp10_ = self->modem_status;
		_tmp7_ = _tmp9_ < _tmp10_;
	} else {
		_tmp7_ = FALSE;
	}
	_tmp11_ = _tmp7_;
	if (_tmp11_) {
		FsoFrameworkLogger* _tmp12_;
		FsoGsmModemStatus _tmp13_;
		GEnumValue* _tmp14_;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_;
		_tmp12_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp13_ = next;
		_tmp14_ = g_enum_get_value (g_type_class_ref (FSO_GSM_MODEM_TYPE_STATUS), _tmp13_);
		_tmp15_ = g_strconcat ("Already beyond status ", (_tmp14_ != NULL) ? _tmp14_->value_name : NULL, ", not advancing", NULL);
		_tmp16_ = _tmp15_;
		fso_framework_logger_debug (_tmp12_, _tmp16_);
		_g_free0 (_tmp16_);
		return;
	}
	_tmp17_ = next;
	if (_tmp17_ == FSO_GSM_MODEM_STATUS_CLOSING) {
		guint _tmp18_;
		_tmp18_ = self->modemSimTimeoutWatch;
		if (_tmp18_ > ((guint) 0)) {
			guint _tmp19_;
			_tmp19_ = self->modemSimTimeoutWatch;
			g_source_remove (_tmp19_);
		}
	}
	_tmp20_ = next;
	if (_tmp20_ == FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED) {
		FsoGsmModemData* _tmp21_;
		gboolean _tmp22_;
		_tmp21_ = self->modem_data;
		_tmp22_ = _tmp21_->simHasReadySignal;
		if (_tmp22_) {
			FsoGsmModemData* _tmp23_;
			guint _tmp24_;
			guint _tmp25_ = 0U;
			_tmp23_ = self->modem_data;
			_tmp24_ = _tmp23_->simReadyTimeout;
			_tmp25_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, _tmp24_, _____lambda4__gsource_func, g_object_ref (self), g_object_unref);
			self->modemSimTimeoutWatch = _tmp25_;
		} else {
			next = FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY;
		}
	}
	_tmp26_ = next;
	self->modem_status = _tmp26_;
	_tmp27_ = self->modem_status;
	g_signal_emit_by_name ((FsoGsmModem*) self, "signal-status-changed", _tmp27_);
	_tmp28_ = fso_gsm_modem_get_parent ((FsoGsmModem*) self);
	_tmp29_ = _tmp28_;
	if (_tmp29_ != NULL) {
		GObject* _tmp30_;
		GObject* _tmp31_;
		FreeSmartphoneGSMDevice* _tmp32_;
		FreeSmartphoneGSMDevice* obj;
		FreeSmartphoneGSMDevice* _tmp33_;
		FreeSmartphoneGSMDeviceStatus _tmp34_ = 0;
		_tmp30_ = fso_gsm_modem_get_parent ((FsoGsmModem*) self);
		_tmp31_ = _tmp30_;
		_tmp32_ = _g_object_ref0 (FREE_SMARTPHONE_GSM_IS_DEVICE (_tmp31_) ? ((FreeSmartphoneGSMDevice*) _tmp31_) : NULL);
		obj = _tmp32_;
		_tmp33_ = obj;
		_tmp34_ = fso_gsm_modem_externalStatus ((FsoGsmModem*) self);
		g_signal_emit_by_name (_tmp33_, "device-status", _tmp34_);
		_g_object_unref0 (obj);
	}
	_tmp35_ = ((FsoFrameworkAbstractObject*) self)->logger;
	_tmp36_ = self->modem_status;
	_tmp37_ = g_enum_get_value (g_type_class_ref (FSO_GSM_MODEM_TYPE_STATUS), _tmp36_);
	_tmp38_ = g_strconcat ("Modem Status changed to ", (_tmp37_ != NULL) ? _tmp37_->value_name : NULL, NULL);
	_tmp39_ = _tmp38_;
	fso_framework_logger_info (_tmp35_, _tmp39_);
	_g_free0 (_tmp39_);
}


static void fso_gsm_abstract_modem_real_advanceNetworkState (FsoGsmModem* base, FsoGsmModemNetworkStatus state) {
	FsoGsmAbstractModem * self;
	FsoFrameworkLogger* _tmp0_;
	FsoGsmModemNetworkStatus _tmp1_;
	GEnumValue* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gboolean _tmp5_ = FALSE;
	FsoGsmModemNetworkStatus _tmp6_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = ((FsoFrameworkAbstractObject*) self)->logger;
	_tmp1_ = state;
	_tmp2_ = g_enum_get_value (g_type_class_ref (FSO_GSM_MODEM_TYPE_NETWORK_STATUS), _tmp1_);
	_tmp3_ = g_strconcat ("Advancing network state to ", (_tmp2_ != NULL) ? _tmp2_->value_name : NULL, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = fso_framework_logger_debug (_tmp0_, _tmp4_);
	g_assert (_tmp5_);
	_g_free0 (_tmp4_);
	_tmp6_ = state;
	self->modem_network_status = _tmp6_;
}


static gpointer _fso_gsm_at_command_sequence_ref0 (gpointer self) {
	return self ? fso_gsm_at_command_sequence_ref (self) : NULL;
}


static FsoGsmAtCommandSequence* fso_gsm_abstract_modem_real_atCommandSequence (FsoGsmModem* base, const gchar* channel, const gchar* purpose) {
	FsoGsmAbstractModem * self;
	FsoGsmAtCommandSequence* result = NULL;
	FsoGsmModemData* _tmp0_;
	GeeHashMap* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_;
	gpointer _tmp8_ = NULL;
	FsoGsmAtCommandSequence* _tmp9_;
	FsoGsmAtCommandSequence* seq;
	FsoGsmAtCommandSequence* _tmp10_ = NULL;
	FsoGsmAtCommandSequence* _tmp11_;
	self = (FsoGsmAbstractModem*) base;
	g_return_val_if_fail (channel != NULL, NULL);
	g_return_val_if_fail (purpose != NULL, NULL);
	_tmp0_ = self->modem_data;
	_tmp1_ = _tmp0_->cmdSequences;
	_tmp2_ = channel;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = purpose;
	_tmp5_ = string_to_string (_tmp4_);
	_tmp6_ = g_strconcat (_tmp3_, "-", _tmp5_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp7_);
	_tmp9_ = (FsoGsmAtCommandSequence*) _tmp8_;
	_g_free0 (_tmp7_);
	seq = _tmp9_;
	_tmp11_ = seq;
	if (_tmp11_ != NULL) {
		FsoGsmAtCommandSequence* _tmp12_;
		FsoGsmAtCommandSequence* _tmp13_;
		_tmp12_ = seq;
		_tmp13_ = _fso_gsm_at_command_sequence_ref0 (_tmp12_);
		_fso_gsm_at_command_sequence_unref0 (_tmp10_);
		_tmp10_ = _tmp13_;
	} else {
		FsoGsmModemData* _tmp14_;
		GeeHashMap* _tmp15_;
		gpointer _tmp16_ = NULL;
		_tmp14_ = self->modem_data;
		_tmp15_ = _tmp14_->cmdSequences;
		_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp15_, "null");
		_fso_gsm_at_command_sequence_unref0 (_tmp10_);
		_tmp10_ = (FsoGsmAtCommandSequence*) _tmp16_;
	}
	result = _tmp10_;
	_fso_gsm_at_command_sequence_unref0 (seq);
	return result;
}


static FreeSmartphoneGSMDeviceStatus fso_gsm_abstract_modem_real_externalStatus (FsoGsmModem* base) {
	FsoGsmAbstractModem * self;
	FreeSmartphoneGSMDeviceStatus result = 0;
	FsoGsmModemStatus _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->modem_status;
	switch (_tmp0_) {
		case FSO_GSM_MODEM_STATUS_CLOSED:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_CLOSED;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_INITIALIZING:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_INITIALIZING;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_NO_SIM:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_ALIVE_NO_SIM;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_SIM_LOCKED:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_ALIVE_SIM_LOCKED;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_ALIVE_SIM_UNLOCKED;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_ALIVE_SIM_READY;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_ALIVE_REGISTERED;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_SUSPENDING:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_SUSPENDING;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_SUSPENDED:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_SUSPENDED;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_RESUMING:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_RESUMING;
			return result;
		}
		case FSO_GSM_MODEM_STATUS_CLOSING:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_CLOSING;
			return result;
		}
		default:
		{
			result = FREE_SMARTPHONE_GSM_DEVICE_STATUS_UNKNOWN;
			return result;
		}
	}
}


static gboolean fso_gsm_abstract_modem_real_isAlive (FsoGsmModem* base) {
	FsoGsmAbstractModem * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	FsoGsmModemStatus _tmp4_;
	gboolean _tmp6_;
	gboolean _tmp8_;
	gboolean _tmp10_;
	gboolean _tmp12_;
	self = (FsoGsmAbstractModem*) base;
	_tmp4_ = self->modem_status;
	if (_tmp4_ == FSO_GSM_MODEM_STATUS_ALIVE_NO_SIM) {
		_tmp3_ = TRUE;
	} else {
		FsoGsmModemStatus _tmp5_;
		_tmp5_ = self->modem_status;
		_tmp3_ = _tmp5_ == FSO_GSM_MODEM_STATUS_ALIVE_SIM_LOCKED;
	}
	_tmp6_ = _tmp3_;
	if (_tmp6_) {
		_tmp2_ = TRUE;
	} else {
		FsoGsmModemStatus _tmp7_;
		_tmp7_ = self->modem_status;
		_tmp2_ = _tmp7_ == FSO_GSM_MODEM_STATUS_ALIVE_SIM_UNLOCKED;
	}
	_tmp8_ = _tmp2_;
	if (_tmp8_) {
		_tmp1_ = TRUE;
	} else {
		FsoGsmModemStatus _tmp9_;
		_tmp9_ = self->modem_status;
		_tmp1_ = _tmp9_ == FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY;
	}
	_tmp10_ = _tmp1_;
	if (_tmp10_) {
		_tmp0_ = TRUE;
	} else {
		FsoGsmModemStatus _tmp11_;
		_tmp11_ = self->modem_status;
		_tmp0_ = _tmp11_ == FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED;
	}
	_tmp12_ = _tmp0_;
	result = _tmp12_;
	return result;
}


FsoGsmAbstractModem* fso_gsm_abstract_modem_construct (GType object_type) {
	FsoGsmAbstractModem * self = NULL;
	self = (FsoGsmAbstractModem*) fso_framework_abstract_object_construct (object_type);
	return self;
}


FsoFrameworkTransportSpec* fso_gsm_abstract_modem_get_modem_transport_spec (FsoGsmAbstractModem* self) {
	FsoFrameworkTransportSpec* result;
	FsoFrameworkTransportSpec* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_modem_transport_spec;
	result = _tmp0_;
	return result;
}


static gpointer _fso_framework_transport_spec_ref0 (gpointer self) {
	return self ? fso_framework_transport_spec_ref (self) : NULL;
}


static void fso_gsm_abstract_modem_set_modem_transport_spec (FsoGsmAbstractModem* self, FsoFrameworkTransportSpec* value) {
	FsoFrameworkTransportSpec* _tmp0_;
	FsoFrameworkTransportSpec* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _fso_framework_transport_spec_ref0 (_tmp0_);
	_fso_framework_transport_spec_unref0 (self->priv->_modem_transport_spec);
	self->priv->_modem_transport_spec = _tmp1_;
	g_object_notify ((GObject *) self, "modem-transport-spec");
}


FsoFrameworkTransportSpec* fso_gsm_abstract_modem_get_data_transport_spec (FsoGsmAbstractModem* self) {
	FsoFrameworkTransportSpec* result;
	FsoFrameworkTransportSpec* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_data_transport_spec;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_set_data_transport_spec (FsoGsmAbstractModem* self, FsoFrameworkTransportSpec* value) {
	FsoFrameworkTransportSpec* _tmp0_;
	FsoFrameworkTransportSpec* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _fso_framework_transport_spec_ref0 (_tmp0_);
	_fso_framework_transport_spec_unref0 (self->priv->_data_transport_spec);
	self->priv->_data_transport_spec = _tmp1_;
	g_object_notify ((GObject *) self, "data-transport-spec");
}


static GObject* fso_gsm_abstract_modem_real_get_parent (FsoGsmModem* base) {
	GObject* result;
	FsoGsmAbstractModem* self;
	GObject* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_parent;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_parent (FsoGsmModem* base, GObject* value) {
	FsoGsmAbstractModem* self;
	GObject* _tmp0_;
	GObject* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_parent);
	self->priv->_parent = _tmp1_;
	g_object_notify ((GObject *) self, "parent");
}


static FsoGsmCallHandler* fso_gsm_abstract_modem_real_get_callhandler (FsoGsmModem* base) {
	FsoGsmCallHandler* result;
	FsoGsmAbstractModem* self;
	FsoGsmCallHandler* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_callhandler;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_callhandler (FsoGsmModem* base, FsoGsmCallHandler* value) {
	FsoGsmAbstractModem* self;
	FsoGsmCallHandler* _tmp0_;
	FsoGsmCallHandler* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_callhandler);
	self->priv->_callhandler = _tmp1_;
	g_object_notify ((GObject *) self, "callhandler");
}


static FsoGsmSmsHandler* fso_gsm_abstract_modem_real_get_smshandler (FsoGsmModem* base) {
	FsoGsmSmsHandler* result;
	FsoGsmAbstractModem* self;
	FsoGsmSmsHandler* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_smshandler;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_smshandler (FsoGsmModem* base, FsoGsmSmsHandler* value) {
	FsoGsmAbstractModem* self;
	FsoGsmSmsHandler* _tmp0_;
	FsoGsmSmsHandler* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_smshandler);
	self->priv->_smshandler = _tmp1_;
	g_object_notify ((GObject *) self, "smshandler");
}


static FsoGsmPhonebookHandler* fso_gsm_abstract_modem_real_get_pbhandler (FsoGsmModem* base) {
	FsoGsmPhonebookHandler* result;
	FsoGsmAbstractModem* self;
	FsoGsmPhonebookHandler* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_pbhandler;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_pbhandler (FsoGsmModem* base, FsoGsmPhonebookHandler* value) {
	FsoGsmAbstractModem* self;
	FsoGsmPhonebookHandler* _tmp0_;
	FsoGsmPhonebookHandler* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_pbhandler);
	self->priv->_pbhandler = _tmp1_;
	g_object_notify ((GObject *) self, "pbhandler");
}


static FsoGsmWatchDog* fso_gsm_abstract_modem_real_get_watchdog (FsoGsmModem* base) {
	FsoGsmWatchDog* result;
	FsoGsmAbstractModem* self;
	FsoGsmWatchDog* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_watchdog;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_watchdog (FsoGsmModem* base, FsoGsmWatchDog* value) {
	FsoGsmAbstractModem* self;
	FsoGsmWatchDog* _tmp0_;
	FsoGsmWatchDog* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_watchdog);
	self->priv->_watchdog = _tmp1_;
	g_object_notify ((GObject *) self, "watchdog");
}


static FsoGsmIPdpHandler* fso_gsm_abstract_modem_real_get_pdphandler (FsoGsmModem* base) {
	FsoGsmIPdpHandler* result;
	FsoGsmAbstractModem* self;
	FsoGsmIPdpHandler* _tmp0_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = self->priv->_pdphandler;
	result = _tmp0_;
	return result;
}


static void fso_gsm_abstract_modem_real_set_pdphandler (FsoGsmModem* base, FsoGsmIPdpHandler* value) {
	FsoGsmAbstractModem* self;
	FsoGsmIPdpHandler* _tmp0_;
	FsoGsmIPdpHandler* _tmp1_;
	self = (FsoGsmAbstractModem*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_pdphandler);
	self->priv->_pdphandler = _tmp1_;
	g_object_notify ((GObject *) self, "pdphandler");
}


static GObject * fso_gsm_abstract_modem_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FsoGsmAbstractModem * self;
	FsoGsmModem* _tmp0_;
	FsoGsmModem* _tmp1_;
	GeeHashMap* _tmp2_;
	FsoFrameworkSmartKeyFile* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* modem_config;
	const gchar* _tmp5_;
	FsoFrameworkTransportSpec* _tmp6_ = NULL;
	FsoFrameworkTransportSpec* _tmp7_;
	FsoFrameworkSmartKeyFile* _tmp8_;
	gchar* _tmp9_ = NULL;
	gchar* data_config;
	const gchar* _tmp10_;
	FsoFrameworkTransportSpec* _tmp11_ = NULL;
	FsoFrameworkTransportSpec* _tmp12_;
	FsoFrameworkTransportSpec* _tmp13_;
	gchar* _tmp14_ = NULL;
	gchar* configuration;
	const gchar* _tmp15_;
	FsoFrameworkLogger* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_ = NULL;
	gchar* _tmp27_ = NULL;
	gchar* _tmp28_;
	gboolean _tmp29_ = FALSE;
	parent_class = G_OBJECT_CLASS (fso_gsm_abstract_modem_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = FSO_GSM_ABSTRACT_MODEM (obj);
	_tmp0_ = fso_gsm_theModem;
	g_assert (_tmp0_ == NULL);
	_tmp1_ = _g_object_ref0 ((FsoGsmModem*) self);
	_g_object_unref0 (fso_gsm_theModem);
	fso_gsm_theModem = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FSO_GSM_TYPE_CHANNEL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->channels);
	self->channels = _tmp2_;
	_tmp3_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp4_ = fso_framework_smart_key_file_stringValue (_tmp3_, FSO_GSM_CONFIG_SECTION, "modem_access", "invalid:invalid:-1");
	modem_config = _tmp4_;
	_tmp5_ = modem_config;
	_tmp6_ = fso_framework_transport_spec_parse (_tmp5_);
	_tmp7_ = _tmp6_;
	fso_gsm_abstract_modem_set_modem_transport_spec (self, _tmp7_);
	_fso_framework_transport_spec_unref0 (_tmp7_);
	_tmp8_ = ((FsoFrameworkAbstractObject*) self)->config;
	_tmp9_ = fso_framework_smart_key_file_stringValue (_tmp8_, FSO_GSM_CONFIG_SECTION, "data_access", "");
	data_config = _tmp9_;
	_tmp10_ = data_config;
	_tmp11_ = fso_framework_transport_spec_parse (_tmp10_);
	_tmp12_ = _tmp11_;
	fso_gsm_abstract_modem_set_data_transport_spec (self, _tmp12_);
	_fso_framework_transport_spec_unref0 (_tmp12_);
	fso_gsm_abstract_modem_initLowlevel (self);
	fso_gsm_abstract_modem_initPdpHandler (self);
	fso_gsm_abstract_modem_initData (self);
	fso_gsm_modem_advanceToState ((FsoGsmModem*) self, FSO_GSM_MODEM_STATUS_CLOSED, FALSE);
	fso_gsm_abstract_modem_registerHandlers (self);
	fso_gsm_abstract_modem_registerMediators (self);
	fso_gsm_abstract_modem_registerAtCommands (self);
	fso_gsm_abstract_modem_createChannels (self);
	_tmp13_ = self->priv->_modem_transport_spec;
	_tmp14_ = fso_framework_transport_spec_repr (_tmp13_);
	configuration = _tmp14_;
	_tmp15_ = data_config;
	if (g_strcmp0 (_tmp15_, "") != 0) {
		const gchar* _tmp16_;
		FsoFrameworkTransportSpec* _tmp17_;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp16_ = configuration;
		_tmp17_ = self->priv->_data_transport_spec;
		_tmp18_ = fso_framework_transport_spec_repr (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = string_to_string (_tmp19_);
		_tmp21_ = g_strconcat (" / ", _tmp20_, NULL);
		_tmp22_ = _tmp21_;
		_tmp23_ = g_strconcat (_tmp16_, _tmp22_, NULL);
		_g_free0 (configuration);
		configuration = _tmp23_;
		_g_free0 (_tmp22_);
		_g_free0 (_tmp19_);
	}
	_tmp24_ = ((FsoFrameworkAbstractObject*) self)->logger;
	_tmp25_ = configuration;
	_tmp26_ = string_to_string (_tmp25_);
	_tmp27_ = g_strconcat ("Created; configured for ", _tmp26_, NULL);
	_tmp28_ = _tmp27_;
	_tmp29_ = fso_framework_logger_debug (_tmp24_, _tmp28_);
	g_assert (_tmp29_);
	_g_free0 (_tmp28_);
	_g_free0 (configuration);
	_g_free0 (data_config);
	_g_free0 (modem_config);
	return obj;
}


static void fso_gsm_abstract_modem_class_init (FsoGsmAbstractModemClass * klass) {
	fso_gsm_abstract_modem_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoGsmAbstractModemPrivate));
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->registerCustomMediators = fso_gsm_abstract_modem_real_registerCustomMediators;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->registerCustomAtCommands = fso_gsm_abstract_modem_real_registerCustomAtCommands;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createUnsolicitedHandler = fso_gsm_abstract_modem_real_createUnsolicitedHandler;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createCallHandler = fso_gsm_abstract_modem_real_createCallHandler;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createSmsHandler = fso_gsm_abstract_modem_real_createSmsHandler;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createPhonebookHandler = fso_gsm_abstract_modem_real_createPhonebookHandler;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createWatchDog = fso_gsm_abstract_modem_real_createWatchDog;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->powerOn = fso_gsm_abstract_modem_real_powerOn;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->powerOff = fso_gsm_abstract_modem_real_powerOff;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->createChannels = fso_gsm_abstract_modem_real_createChannels;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->configureData = fso_gsm_abstract_modem_real_configureData;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->channelForCommand = fso_gsm_abstract_modem_real_channelForCommand;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->open = fso_gsm_abstract_modem_real_open;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->open_finish = fso_gsm_abstract_modem_real_open_finish;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->close = fso_gsm_abstract_modem_real_close;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->close_finish = fso_gsm_abstract_modem_real_close_finish;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->suspend = fso_gsm_abstract_modem_real_suspend;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->suspend_finish = fso_gsm_abstract_modem_real_suspend_finish;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->resume = fso_gsm_abstract_modem_real_resume;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->resume_finish = fso_gsm_abstract_modem_real_resume_finish;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->injectResponse = fso_gsm_abstract_modem_real_injectResponse;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->setFunctionality = fso_gsm_abstract_modem_real_setFunctionality;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->setFunctionality_finish = fso_gsm_abstract_modem_real_setFunctionality_finish;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->channel = fso_gsm_abstract_modem_real_channel;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->allocateDataPort = fso_gsm_abstract_modem_real_allocateDataPort;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->releaseDataPort = fso_gsm_abstract_modem_real_releaseDataPort;
	G_OBJECT_CLASS (klass)->get_property = _vala_fso_gsm_abstract_modem_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_fso_gsm_abstract_modem_set_property;
	G_OBJECT_CLASS (klass)->constructor = fso_gsm_abstract_modem_constructor;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_abstract_modem_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_MODEM_TRANSPORT_SPEC, fso_framework_param_spec_transport_spec ("modem-transport-spec", "modem-transport-spec", "modem-transport-spec", FSO_FRAMEWORK_TYPE_TRANSPORT_SPEC, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_DATA_TRANSPORT_SPEC, fso_framework_param_spec_transport_spec ("data-transport-spec", "data-transport-spec", "data-transport-spec", FSO_FRAMEWORK_TYPE_TRANSPORT_SPEC, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_PARENT, g_param_spec_object ("parent", "parent", "parent", G_TYPE_OBJECT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_CALLHANDLER, g_param_spec_object ("callhandler", "callhandler", "callhandler", FSO_GSM_TYPE_CALL_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_SMSHANDLER, g_param_spec_object ("smshandler", "smshandler", "smshandler", FSO_GSM_TYPE_SMS_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_PBHANDLER, g_param_spec_object ("pbhandler", "pbhandler", "pbhandler", FSO_GSM_TYPE_PHONEBOOK_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_WATCHDOG, g_param_spec_object ("watchdog", "watchdog", "watchdog", FSO_GSM_TYPE_WATCH_DOG, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_ABSTRACT_MODEM_PDPHANDLER, g_param_spec_object ("pdphandler", "pdphandler", "pdphandler", FSO_GSM_TYPE_IPDP_HANDLER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void fso_gsm_abstract_modem_fso_gsm_modem_interface_init (FsoGsmModemIface * iface) {
	fso_gsm_abstract_modem_fso_gsm_modem_parent_iface = g_type_interface_peek_parent (iface);
	iface->registerAtCommandSequence = (void (*)(FsoGsmModem*, const gchar*, const gchar*, FsoGsmAtCommandSequence*)) fso_gsm_abstract_modem_real_registerAtCommandSequence;
	iface->open = (gboolean (*)(FsoGsmModem*)) fso_gsm_abstract_modem_open;
	iface->open_finish = fso_gsm_abstract_modem_open_finish;
	iface->close = (void (*)(FsoGsmModem*)) fso_gsm_abstract_modem_close;
	iface->close_finish = fso_gsm_abstract_modem_close_finish;
	iface->suspend = (gboolean (*)(FsoGsmModem*)) fso_gsm_abstract_modem_suspend;
	iface->suspend_finish = fso_gsm_abstract_modem_suspend_finish;
	iface->resume = (gboolean (*)(FsoGsmModem*)) fso_gsm_abstract_modem_resume;
	iface->resume_finish = fso_gsm_abstract_modem_resume_finish;
	iface->injectResponse = (void (*)(FsoGsmModem*, const gchar*, const gchar*, GError**)) fso_gsm_abstract_modem_injectResponse;
	iface->setFunctionality = (void (*)(FsoGsmModem*, const gchar*, gboolean, const gchar*, GError**)) fso_gsm_abstract_modem_setFunctionality;
	iface->setFunctionality_finish = fso_gsm_abstract_modem_setFunctionality_finish;
	iface->theDevice = (gpointer (*)(FsoGsmModem*, GType, GBoxedCopyFunc, GDestroyNotify)) fso_gsm_abstract_modem_real_theDevice;
	iface->status = (FsoGsmModemStatus (*)(FsoGsmModem*)) fso_gsm_abstract_modem_real_status;
	iface->network_status = (FsoGsmModemNetworkStatus (*)(FsoGsmModem*)) fso_gsm_abstract_modem_real_network_status;
	iface->data = (FsoGsmModemData* (*)(FsoGsmModem*)) fso_gsm_abstract_modem_real_data;
	iface->channel = (FsoGsmChannel* (*)(FsoGsmModem*, const gchar*)) fso_gsm_abstract_modem_channel;
	iface->createMediator = (gpointer (*)(FsoGsmModem*, GType, GBoxedCopyFunc, GDestroyNotify, GError**)) fso_gsm_abstract_modem_real_createMediator;
	iface->createAtCommand = (gpointer (*)(FsoGsmModem*, GType, GBoxedCopyFunc, GDestroyNotify, const gchar*)) fso_gsm_abstract_modem_real_createAtCommand;
	iface->allocateDataPort = (gchar* (*)(FsoGsmModem*)) fso_gsm_abstract_modem_allocateDataPort;
	iface->releaseDataPort = (void (*)(FsoGsmModem*)) fso_gsm_abstract_modem_releaseDataPort;
	iface->processAtCommandAsync = (gchar** (*)(FsoGsmModem*, FsoGsmAtCommand*, const gchar*, gint, int*)) fso_gsm_abstract_modem_real_processAtCommandAsync;
	iface->processAtCommandAsync_finish = fso_gsm_abstract_modem_real_processAtCommandAsync_finish;
	iface->sendAtCommand = (void (*)(FsoGsmModem*, FsoGsmAtCommand*, const gchar*, gint)) fso_gsm_abstract_modem_real_sendAtCommand;
	iface->processAtPduCommandAsync = (gchar** (*)(FsoGsmModem*, FsoGsmAtCommand*, const gchar*, gint, int*)) fso_gsm_abstract_modem_real_processAtPduCommandAsync;
	iface->processAtPduCommandAsync_finish = fso_gsm_abstract_modem_real_processAtPduCommandAsync_finish;
	iface->registerChannel = (void (*)(FsoGsmModem*, const gchar*, FsoGsmChannel*)) fso_gsm_abstract_modem_real_registerChannel;
	iface->advanceToState = (void (*)(FsoGsmModem*, FsoGsmModemStatus, gboolean)) fso_gsm_abstract_modem_real_advanceToState;
	iface->advanceNetworkState = (void (*)(FsoGsmModem*, FsoGsmModemNetworkStatus)) fso_gsm_abstract_modem_real_advanceNetworkState;
	iface->atCommandSequence = (FsoGsmAtCommandSequence* (*)(FsoGsmModem*, const gchar*, const gchar*)) fso_gsm_abstract_modem_real_atCommandSequence;
	iface->externalStatus = (FreeSmartphoneGSMDeviceStatus (*)(FsoGsmModem*)) fso_gsm_abstract_modem_real_externalStatus;
	iface->isAlive = (gboolean (*)(FsoGsmModem*)) fso_gsm_abstract_modem_real_isAlive;
	iface->get_parent = fso_gsm_abstract_modem_real_get_parent;
	iface->set_parent = fso_gsm_abstract_modem_real_set_parent;
	iface->get_callhandler = fso_gsm_abstract_modem_real_get_callhandler;
	iface->set_callhandler = fso_gsm_abstract_modem_real_set_callhandler;
	iface->get_smshandler = fso_gsm_abstract_modem_real_get_smshandler;
	iface->set_smshandler = fso_gsm_abstract_modem_real_set_smshandler;
	iface->get_pbhandler = fso_gsm_abstract_modem_real_get_pbhandler;
	iface->set_pbhandler = fso_gsm_abstract_modem_real_set_pbhandler;
	iface->get_watchdog = fso_gsm_abstract_modem_real_get_watchdog;
	iface->set_watchdog = fso_gsm_abstract_modem_real_set_watchdog;
	iface->get_pdphandler = fso_gsm_abstract_modem_real_get_pdphandler;
	iface->set_pdphandler = fso_gsm_abstract_modem_real_set_pdphandler;
}


static void fso_gsm_abstract_modem_instance_init (FsoGsmAbstractModem * self) {
	self->priv = FSO_GSM_ABSTRACT_MODEM_GET_PRIVATE (self);
}


static void fso_gsm_abstract_modem_finalize (GObject* obj) {
	FsoGsmAbstractModem * self;
	FsoFrameworkLogger* _tmp0_;
	self = FSO_GSM_ABSTRACT_MODEM (obj);
	_tmp0_ = ((FsoFrameworkAbstractObject*) self)->logger;
	fso_framework_logger_debug (_tmp0_, "Destroyed");
	_fso_framework_transport_spec_unref0 (self->priv->_modem_transport_spec);
	_fso_framework_transport_spec_unref0 (self->priv->_data_transport_spec);
	_g_object_unref0 (self->modem_data);
	_g_object_unref0 (self->channels);
	_g_object_unref0 (self->commands);
	_g_object_unref0 (self->mediators);
	_g_object_unref0 (self->urc);
	_g_object_unref0 (self->priv->_parent);
	_g_object_unref0 (self->priv->_callhandler);
	_g_object_unref0 (self->priv->_smshandler);
	_g_object_unref0 (self->priv->_pbhandler);
	_g_object_unref0 (self->priv->_watchdog);
	_g_object_unref0 (self->priv->_pdphandler);
	_g_object_unref0 (self->lowlevel);
	G_OBJECT_CLASS (fso_gsm_abstract_modem_parent_class)->finalize (obj);
}


/**
 * @class FsoGsm.AbstractModem
 **/
GType fso_gsm_abstract_modem_get_type (void) {
	static volatile gsize fso_gsm_abstract_modem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_abstract_modem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAbstractModemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_abstract_modem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmAbstractModem), 0, (GInstanceInitFunc) fso_gsm_abstract_modem_instance_init, NULL };
		static const GInterfaceInfo fso_gsm_modem_info = { (GInterfaceInitFunc) fso_gsm_abstract_modem_fso_gsm_modem_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType fso_gsm_abstract_modem_type_id;
		fso_gsm_abstract_modem_type_id = g_type_register_static (FSO_FRAMEWORK_TYPE_ABSTRACT_OBJECT, "FsoGsmAbstractModem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (fso_gsm_abstract_modem_type_id, FSO_GSM_TYPE_MODEM, &fso_gsm_modem_info);
		g_once_init_leave (&fso_gsm_abstract_modem_type_id__volatile, fso_gsm_abstract_modem_type_id);
	}
	return fso_gsm_abstract_modem_type_id__volatile;
}


static void _vala_fso_gsm_abstract_modem_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FsoGsmAbstractModem * self;
	self = FSO_GSM_ABSTRACT_MODEM (object);
	switch (property_id) {
		case FSO_GSM_ABSTRACT_MODEM_MODEM_TRANSPORT_SPEC:
		fso_framework_value_set_transport_spec (value, fso_gsm_abstract_modem_get_modem_transport_spec (self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_DATA_TRANSPORT_SPEC:
		fso_framework_value_set_transport_spec (value, fso_gsm_abstract_modem_get_data_transport_spec (self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PARENT:
		g_value_set_object (value, fso_gsm_modem_get_parent ((FsoGsmModem*) self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_CALLHANDLER:
		g_value_set_object (value, fso_gsm_modem_get_callhandler ((FsoGsmModem*) self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_SMSHANDLER:
		g_value_set_object (value, fso_gsm_modem_get_smshandler ((FsoGsmModem*) self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PBHANDLER:
		g_value_set_object (value, fso_gsm_modem_get_pbhandler ((FsoGsmModem*) self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_WATCHDOG:
		g_value_set_object (value, fso_gsm_modem_get_watchdog ((FsoGsmModem*) self));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PDPHANDLER:
		g_value_set_object (value, fso_gsm_modem_get_pdphandler ((FsoGsmModem*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_fso_gsm_abstract_modem_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FsoGsmAbstractModem * self;
	self = FSO_GSM_ABSTRACT_MODEM (object);
	switch (property_id) {
		case FSO_GSM_ABSTRACT_MODEM_MODEM_TRANSPORT_SPEC:
		fso_gsm_abstract_modem_set_modem_transport_spec (self, fso_framework_value_get_transport_spec (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_DATA_TRANSPORT_SPEC:
		fso_gsm_abstract_modem_set_data_transport_spec (self, fso_framework_value_get_transport_spec (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PARENT:
		fso_gsm_modem_set_parent ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_CALLHANDLER:
		fso_gsm_modem_set_callhandler ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_SMSHANDLER:
		fso_gsm_modem_set_smshandler ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PBHANDLER:
		fso_gsm_modem_set_pbhandler ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_WATCHDOG:
		fso_gsm_modem_set_watchdog ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		case FSO_GSM_ABSTRACT_MODEM_PDPHANDLER:
		fso_gsm_modem_set_pdphandler ((FsoGsmModem*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


FsoGsmAbstractGsmModem* fso_gsm_abstract_gsm_modem_construct (GType object_type) {
	FsoGsmAbstractGsmModem * self = NULL;
	self = (FsoGsmAbstractGsmModem*) fso_gsm_abstract_modem_construct (object_type);
	return self;
}


static void fso_gsm_abstract_gsm_modem_class_init (FsoGsmAbstractGsmModemClass * klass) {
	fso_gsm_abstract_gsm_modem_parent_class = g_type_class_peek_parent (klass);
}


static void fso_gsm_abstract_gsm_modem_instance_init (FsoGsmAbstractGsmModem * self) {
}


GType fso_gsm_abstract_gsm_modem_get_type (void) {
	static volatile gsize fso_gsm_abstract_gsm_modem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_abstract_gsm_modem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAbstractGsmModemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_abstract_gsm_modem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmAbstractGsmModem), 0, (GInstanceInitFunc) fso_gsm_abstract_gsm_modem_instance_init, NULL };
		GType fso_gsm_abstract_gsm_modem_type_id;
		fso_gsm_abstract_gsm_modem_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_MODEM, "FsoGsmAbstractGsmModem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&fso_gsm_abstract_gsm_modem_type_id__volatile, fso_gsm_abstract_gsm_modem_type_id);
	}
	return fso_gsm_abstract_gsm_modem_type_id__volatile;
}


FsoGsmAbstractCdmaModem* fso_gsm_abstract_cdma_modem_construct (GType object_type) {
	FsoGsmAbstractCdmaModem * self = NULL;
	self = (FsoGsmAbstractCdmaModem*) fso_gsm_abstract_modem_construct (object_type);
	return self;
}


static void fso_gsm_abstract_cdma_modem_class_init (FsoGsmAbstractCdmaModemClass * klass) {
	fso_gsm_abstract_cdma_modem_parent_class = g_type_class_peek_parent (klass);
}


static void fso_gsm_abstract_cdma_modem_instance_init (FsoGsmAbstractCdmaModem * self) {
}


GType fso_gsm_abstract_cdma_modem_get_type (void) {
	static volatile gsize fso_gsm_abstract_cdma_modem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_abstract_cdma_modem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAbstractCdmaModemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_abstract_cdma_modem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmAbstractCdmaModem), 0, (GInstanceInitFunc) fso_gsm_abstract_cdma_modem_instance_init, NULL };
		GType fso_gsm_abstract_cdma_modem_type_id;
		fso_gsm_abstract_cdma_modem_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_MODEM, "FsoGsmAbstractCdmaModem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&fso_gsm_abstract_cdma_modem_type_id__volatile, fso_gsm_abstract_cdma_modem_type_id);
	}
	return fso_gsm_abstract_cdma_modem_type_id__volatile;
}


static gchar* fso_gsm_null_modem_real_repr (FsoFrameworkAbstractObject* base) {
	FsoGsmNullModem * self;
	gchar* result = NULL;
	gchar* _tmp0_;
	self = (FsoGsmNullModem*) base;
	_tmp0_ = g_strdup ("<>");
	result = _tmp0_;
	return result;
}


static FsoGsmChannel* fso_gsm_null_modem_real_channelForCommand (FsoGsmAbstractModem* base, FsoGsmAtCommand* command, const gchar* query) {
	FsoGsmNullModem * self;
	FsoGsmChannel* result = NULL;
	FsoGsmChannel* _tmp0_;
	self = (FsoGsmNullModem*) base;
	g_return_val_if_fail (command != NULL, NULL);
	g_return_val_if_fail (query != NULL, NULL);
	_tmp0_ = _g_object_ref0 (FSO_GSM_CHANNEL (NULL));
	result = _tmp0_;
	return result;
}


FsoGsmNullModem* fso_gsm_null_modem_construct (GType object_type) {
	FsoGsmNullModem * self = NULL;
	self = (FsoGsmNullModem*) fso_gsm_abstract_modem_construct (object_type);
	return self;
}


FsoGsmNullModem* fso_gsm_null_modem_new (void) {
	return fso_gsm_null_modem_construct (FSO_GSM_TYPE_NULL_MODEM);
}


static void fso_gsm_null_modem_class_init (FsoGsmNullModemClass * klass) {
	fso_gsm_null_modem_parent_class = g_type_class_peek_parent (klass);
	FSO_FRAMEWORK_ABSTRACT_OBJECT_CLASS (klass)->repr = fso_gsm_null_modem_real_repr;
	FSO_GSM_ABSTRACT_MODEM_CLASS (klass)->channelForCommand = fso_gsm_null_modem_real_channelForCommand;
}


static void fso_gsm_null_modem_instance_init (FsoGsmNullModem * self) {
}


/**
 * Dummy implementation of a modem. Should be only used for testing purpose.
 **/
GType fso_gsm_null_modem_get_type (void) {
	static volatile gsize fso_gsm_null_modem_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_null_modem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmNullModemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_null_modem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmNullModem), 0, (GInstanceInitFunc) fso_gsm_null_modem_instance_init, NULL };
		GType fso_gsm_null_modem_type_id;
		fso_gsm_null_modem_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_MODEM, "FsoGsmNullModem", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_null_modem_type_id__volatile, fso_gsm_null_modem_type_id);
	}
	return fso_gsm_null_modem_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



