/* atchannel.c generated by valac 0.14.2, the Vala compiler
 * generated from atchannel.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 <fsotransport.h>
#include <gio/gio.h>
#include <fsobasics.h>
#include <freesmartphone.h>
#include <gee.h>
#include <smsutil.h>
#include <conversions.h>
#include <stdlib.h>
#include <string.h>


#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;
typedef struct _FsoGsmAtCommandQueuePrivate FsoGsmAtCommandQueuePrivate;

#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_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 _FsoGsmAtChannelPrivate FsoGsmAtChannelPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#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_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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _fso_gsm_at_command_sequence_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_at_command_sequence_unref (var), NULL)))
typedef struct _FsoGsmModemDataPrivate FsoGsmModemDataPrivate;

#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;

#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;

#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 _FsoGsmAtChannelInitializeData FsoGsmAtChannelInitializeData;
typedef struct _FsoGsmAtChannelShutdownData FsoGsmAtChannelShutdownData;
typedef struct _fso_gsm_at_channel_simIsReadyData fso_gsm_at_channel_simIsReadyData;
typedef struct _fso_gsm_at_channel_simHasRegisteredData fso_gsm_at_channel_simHasRegisteredData;

#define FSO_GSM_TYPE_ABSTRACT_AT_COMMAND (fso_gsm_abstract_at_command_get_type ())
#define FSO_GSM_ABSTRACT_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, FsoGsmAbstractAtCommand))
#define FSO_GSM_ABSTRACT_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, FsoGsmAbstractAtCommandClass))
#define FSO_GSM_IS_ABSTRACT_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_AT_COMMAND))
#define FSO_GSM_IS_ABSTRACT_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_AT_COMMAND))
#define FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, FsoGsmAbstractAtCommandClass))

typedef struct _FsoGsmAbstractAtCommand FsoGsmAbstractAtCommand;
typedef struct _FsoGsmAbstractAtCommandClass FsoGsmAbstractAtCommandClass;

#define FSO_GSM_TYPE_SIMPLE_AT_COMMAND (fso_gsm_simple_at_command_get_type ())
#define FSO_GSM_SIMPLE_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_SIMPLE_AT_COMMAND, FsoGsmSimpleAtCommand))
#define FSO_GSM_SIMPLE_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_SIMPLE_AT_COMMAND, FsoGsmSimpleAtCommandClass))
#define FSO_GSM_IS_SIMPLE_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_SIMPLE_AT_COMMAND))
#define FSO_GSM_IS_SIMPLE_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_SIMPLE_AT_COMMAND))
#define FSO_GSM_SIMPLE_AT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_SIMPLE_AT_COMMAND, FsoGsmSimpleAtCommandClass))

typedef struct _FsoGsmSimpleAtCommand FsoGsmSimpleAtCommand;
typedef struct _FsoGsmSimpleAtCommandClass FsoGsmSimpleAtCommandClass;

#define FSO_GSM_TYPE_PLUS_CSCS (fso_gsm_plus_cscs_get_type ())
#define FSO_GSM_PLUS_CSCS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PLUS_CSCS, FsoGsmPlusCSCS))
#define FSO_GSM_PLUS_CSCS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PLUS_CSCS, FsoGsmPlusCSCSClass))
#define FSO_GSM_IS_PLUS_CSCS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PLUS_CSCS))
#define FSO_GSM_IS_PLUS_CSCS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PLUS_CSCS))
#define FSO_GSM_PLUS_CSCS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PLUS_CSCS, FsoGsmPlusCSCSClass))

typedef struct _FsoGsmPlusCSCS FsoGsmPlusCSCS;
typedef struct _FsoGsmPlusCSCSClass FsoGsmPlusCSCSClass;
typedef struct _fso_gsm_at_channel_configureCharsetData fso_gsm_at_channel_configureCharsetData;

#define FSO_GSM_TYPE_PLUS_CREG (fso_gsm_plus_creg_get_type ())
#define FSO_GSM_PLUS_CREG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PLUS_CREG, FsoGsmPlusCREG))
#define FSO_GSM_PLUS_CREG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PLUS_CREG, FsoGsmPlusCREGClass))
#define FSO_GSM_IS_PLUS_CREG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PLUS_CREG))
#define FSO_GSM_IS_PLUS_CREG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PLUS_CREG))
#define FSO_GSM_PLUS_CREG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PLUS_CREG, FsoGsmPlusCREGClass))

typedef struct _FsoGsmPlusCREG FsoGsmPlusCREG;
typedef struct _FsoGsmPlusCREGClass FsoGsmPlusCREGClass;

#define FSO_GSM_PLUS_CREG_TYPE_MODE (fso_gsm_plus_creg_mode_get_type ())
typedef struct _fso_gsm_at_channel_setupNetworkRegistrationReportData fso_gsm_at_channel_setupNetworkRegistrationReportData;
typedef struct _FsoGsmAtChannelSuspendData FsoGsmAtChannelSuspendData;
typedef struct _FsoGsmAtChannelResumeData FsoGsmAtChannelResumeData;

struct _FsoGsmAtCommandQueue {
	FsoFrameworkAbstractCommandQueue parent_instance;
	FsoGsmAtCommandQueuePrivate * priv;
	gchar* buffer;
	FsoFrameworkParser* parser;
};

struct _FsoGsmAtCommandQueueClass {
	FsoFrameworkAbstractCommandQueueClass parent_class;
};

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_);
};

struct _FsoGsmAtChannel {
	FsoGsmAtCommandQueue parent_instance;
	FsoGsmAtChannelPrivate * priv;
	gchar* name;
};

struct _FsoGsmAtChannelClass {
	FsoGsmAtCommandQueueClass parent_class;
};

struct _FsoGsmAtChannelPrivate {
	gboolean isInitialized;
	gboolean isMainChannel;
};

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 _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 _FsoGsmAtChannelInitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	FsoGsmModem* _tmp0_;
	FsoFrameworkLogger* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	FsoGsmModem* _tmp8_;
	FsoGsmAtCommandSequence* _tmp9_;
	FsoGsmAtCommandSequence* seq1;
	FsoGsmAtCommandSequence* _tmp10_;
	gboolean _tmp11_;
	FsoGsmModem* _tmp12_;
	FsoGsmModemStatus _tmp13_;
	FsoGsmModem* _tmp14_;
	FsoGsmModemStatus _tmp15_;
	FsoGsmModem* _tmp16_;
	FsoFrameworkLogger* _tmp17_;
	FsoGsmModem* _tmp18_;
	FsoGsmAtCommandSequence* _tmp19_;
	FsoGsmAtCommandSequence* seq2;
	FsoGsmAtCommandSequence* _tmp20_;
	FsoGsmModem* _tmp21_;
	const gchar* _tmp22_;
	FsoGsmAtCommandSequence* _tmp23_;
	FsoGsmAtCommandSequence* seq3;
	FsoGsmAtCommandSequence* _tmp24_;
	FsoGsmModem* _tmp25_;
	FsoGsmModemData* _tmp26_;
	FsoGsmModemData* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar** _tmp34_;
	gchar** _tmp35_;
	gint _tmp35__length1;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* charset;
	const gchar* _tmp38_;
	FsoGsmModem* _tmp39_;
	FsoFrameworkLogger* _tmp40_;
	FsoGsmModem* _tmp41_;
	FsoFrameworkLogger* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	FsoGsmModem* _tmp47_;
	FsoGsmModemData* _tmp48_;
	FsoGsmModemData* _tmp49_;
	const gchar* _tmp50_;
	gchar* _tmp51_;
	gboolean _tmp52_;
};

struct _FsoGsmAtChannelShutdownData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	FsoGsmModem* _tmp0_;
	FsoFrameworkLogger* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	FsoGsmModem* _tmp9_;
	FsoGsmAtCommandSequence* _tmp10_;
	FsoGsmAtCommandSequence* seq;
	FsoGsmAtCommandSequence* _tmp11_;
	FsoGsmModem* _tmp12_;
	FsoFrameworkLogger* _tmp13_;
};

struct _fso_gsm_at_channel_simIsReadyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	FsoGsmModem* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmAtCommandSequence* _tmp2_;
	FsoGsmAtCommandSequence* seq;
};

struct _fso_gsm_at_channel_simHasRegisteredData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	FsoGsmModem* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmAtCommandSequence* _tmp2_;
	FsoGsmAtCommandSequence* seq;
};

struct _fso_gsm_at_channel_configureCharsetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	gchar** charsets;
	gint charsets_length1;
	gchar* result;
	FsoGsmModem* _tmp0_;
	FsoFrameworkLogger* _tmp1_;
	gint i;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	FsoGsmModem* _tmp7_;
	gpointer _tmp8_;
	FsoGsmPlusCSCS* cmd;
	FsoGsmPlusCSCS* _tmp9_;
	FsoGsmPlusCSCS* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gint _tmp16_;
	gchar** _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	FsoGsmPlusCSCS* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length1;
	FsoGsmConstantsAtResponse _tmp21_;
	gchar** _tmp22_;
	gint _tmp22__length1;
	gint _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
};

typedef enum  {
	FSO_GSM_PLUS_CREG_MODE_DISABLE = 0,
	FSO_GSM_PLUS_CREG_MODE_ENABLE_WITH_NETORK_REGISTRATION = 1,
	FSO_GSM_PLUS_CREG_MODE_ENABLE_WITH_NETORK_REGISTRATION_AND_LOCATION = 2
} FsoGsmPlusCREGMode;

struct _fso_gsm_at_channel_setupNetworkRegistrationReportData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	gchar** _tmp0_;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	FsoGsmModem* _tmp1_;
	gpointer _tmp2_;
	FsoGsmPlusCREG* cmd;
	FsoGsmPlusCREG* _tmp3_;
	FsoGsmPlusCREG* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gint _tmp7_;
	gchar** _tmp8_;
	FsoGsmPlusCREG* _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	FsoGsmConstantsAtResponse _tmp11_;
	FsoGsmPlusCREG* _tmp12_;
	FsoGsmPlusCREG* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gint _tmp16_;
	gchar** _tmp17_;
	FsoGsmPlusCREG* _tmp18_;
	gchar** _tmp19_;
	gint _tmp19__length1;
	FsoGsmConstantsAtResponse _tmp20_;
	FsoGsmModem* _tmp21_;
	FsoFrameworkLogger* _tmp22_;
};

struct _FsoGsmAtChannelSuspendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	gboolean result;
	FsoGsmModem* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmAtCommandSequence* _tmp2_;
	FsoGsmAtCommandSequence* seq;
};

struct _FsoGsmAtChannelResumeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmAtChannel* self;
	gboolean result;
	FsoGsmModem* _tmp0_;
	const gchar* _tmp1_;
	FsoGsmAtCommandSequence* _tmp2_;
	FsoGsmAtCommandSequence* seq;
};


static gpointer fso_gsm_at_channel_parent_class = NULL;
static gboolean fso_gsm_at_channel_isMainInitialized;
static gboolean fso_gsm_at_channel_isMainInitialized = FALSE;
extern FsoGsmModem* fso_gsm_theModem;
static FsoGsmChannelIface* fso_gsm_at_channel_fso_gsm_channel_parent_iface = NULL;

GType fso_gsm_at_command_queue_get_type (void) G_GNUC_CONST;
GType fso_gsm_channel_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_channel_get_type (void) G_GNUC_CONST;
#define FSO_GSM_AT_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_GSM_TYPE_AT_CHANNEL, FsoGsmAtChannelPrivate))
enum  {
	FSO_GSM_AT_CHANNEL_DUMMY_PROPERTY
};
FsoGsmAtChannel* fso_gsm_at_channel_new (const gchar* name, FsoFrameworkTransport* transport, FsoFrameworkParser* parser);
FsoGsmAtChannel* fso_gsm_at_channel_construct (GType object_type, const gchar* name, FsoFrameworkTransport* transport, FsoFrameworkParser* parser);
FsoGsmAtCommandQueue* fso_gsm_at_command_queue_new (FsoFrameworkTransport* transport, FsoFrameworkParser* parser);
FsoGsmAtCommandQueue* fso_gsm_at_command_queue_construct (GType object_type, FsoFrameworkTransport* transport, FsoFrameworkParser* parser);
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;
void fso_gsm_modem_registerChannel (FsoGsmModem* self, const gchar* name, FsoGsmChannel* channel);
void fso_gsm_at_channel_onModemStatusChanged (FsoGsmAtChannel* self, FsoGsmModem* modem, FsoGsmModemStatus status);
static void _fso_gsm_at_channel_onModemStatusChanged_fso_gsm_modem_signal_status_changed (FsoGsmModem* _sender, FsoGsmModemStatus status, gpointer self);
static void fso_gsm_at_channel_initialize (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_at_channel_initialize_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
static void fso_gsm_at_channel_simIsReady (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_at_channel_simIsReady_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
static void fso_gsm_at_channel_simHasRegistered (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_at_channel_simHasRegistered_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
static void fso_gsm_at_channel_shutdown (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_at_channel_shutdown_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
static void fso_gsm_at_channel_initialize_data_free (gpointer _data);
static gboolean fso_gsm_at_channel_initialize_co (FsoGsmAtChannelInitializeData* _data_);
FsoGsmAtCommandSequence* fso_gsm_modem_atCommandSequence (FsoGsmModem* self, const gchar* channel, const gchar* purpose);
void fso_gsm_at_command_sequence_performOnChannel (FsoGsmAtCommandSequence* self, FsoGsmAtChannel* channel, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_at_command_sequence_performOnChannel_finish (FsoGsmAtCommandSequence* self, GAsyncResult* _res_);
static void fso_gsm_at_channel_initialize_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
FsoGsmModemStatus fso_gsm_modem_status (FsoGsmModem* self);
static gboolean _fso_gsm_at_channel_initialize_co_gsource_func (gpointer self);
static void fso_gsm_at_channel_configureCharset (FsoGsmAtChannel* self, gchar** charsets, int charsets_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* fso_gsm_at_channel_configureCharset_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
FsoGsmModemData* fso_gsm_modem_data (FsoGsmModem* self);
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;
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;
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;
static void fso_gsm_at_channel_setupNetworkRegistrationReport (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void fso_gsm_at_channel_setupNetworkRegistrationReport_finish (FsoGsmAtChannel* self, GAsyncResult* _res_);
void fso_gsm_gatherSimStatusAndUpdate (GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_gatherSimStatusAndUpdate_finish (GAsyncResult* _res_, GError** error);
static void fso_gsm_at_channel_shutdown_data_free (gpointer _data);
static gboolean fso_gsm_at_channel_shutdown_co (FsoGsmAtChannelShutdownData* _data_);
static void fso_gsm_at_channel_shutdown_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_simIsReady_data_free (gpointer _data);
static gboolean fso_gsm_at_channel_simIsReady_co (fso_gsm_at_channel_simIsReadyData* _data_);
static void fso_gsm_at_channel_simIsReady_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_simHasRegistered_data_free (gpointer _data);
static gboolean fso_gsm_at_channel_simHasRegistered_co (fso_gsm_at_channel_simHasRegisteredData* _data_);
static void fso_gsm_at_channel_simHasRegistered_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_configureCharset_data_free (gpointer _data);
static gchar** _vala_array_dup1 (gchar** self, int length);
static gboolean fso_gsm_at_channel_configureCharset_co (fso_gsm_at_channel_configureCharsetData* _data_);
gpointer fso_gsm_modem_createAtCommand (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command);
GType fso_gsm_abstract_at_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_simple_at_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_plus_cscs_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);
gchar* fso_gsm_simple_at_command_issue (FsoGsmSimpleAtCommand* self, gconstpointer val);
static void fso_gsm_at_channel_configureCharset_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateOk (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static void fso_gsm_at_channel_setupNetworkRegistrationReport_data_free (gpointer _data);
static gboolean fso_gsm_at_channel_setupNetworkRegistrationReport_co (fso_gsm_at_channel_setupNetworkRegistrationReportData* _data_);
GType fso_gsm_plus_creg_get_type (void) G_GNUC_CONST;
GType fso_gsm_plus_creg_mode_get_type (void) G_GNUC_CONST;
gchar* fso_gsm_plus_creg_issue (FsoGsmPlusCREG* self, FsoGsmPlusCREGMode mode);
static void fso_gsm_at_channel_setupNetworkRegistrationReport_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_real_injectResponse (FsoGsmChannel* base, const gchar* response);
static void fso_gsm_at_channel_real_suspend_data_free (gpointer _data);
static void fso_gsm_at_channel_real_suspend (FsoGsmChannel* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_at_channel_real_suspend_co (FsoGsmAtChannelSuspendData* _data_);
static void fso_gsm_at_channel_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_real_resume_data_free (gpointer _data);
static void fso_gsm_at_channel_real_resume (FsoGsmChannel* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_at_channel_real_resume_co (FsoGsmAtChannelResumeData* _data_);
static void fso_gsm_at_channel_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_at_channel_finalize (GObject* obj);
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 void _fso_gsm_at_channel_onModemStatusChanged_fso_gsm_modem_signal_status_changed (FsoGsmModem* _sender, FsoGsmModemStatus status, gpointer self) {
	fso_gsm_at_channel_onModemStatusChanged (self, _sender, status);
}


FsoGsmAtChannel* fso_gsm_at_channel_construct (GType object_type, const gchar* name, FsoFrameworkTransport* transport, FsoFrameworkParser* parser) {
	FsoGsmAtChannel * self = NULL;
	FsoFrameworkTransport* _tmp0_;
	FsoFrameworkParser* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_val_if_fail (transport != NULL, NULL);
	g_return_val_if_fail (parser != NULL, NULL);
	_tmp0_ = transport;
	_tmp1_ = parser;
	self = (FsoGsmAtChannel*) fso_gsm_at_command_queue_construct (object_type, _tmp0_, _tmp1_);
	_tmp2_ = name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->name);
	self->name = _tmp3_;
	_tmp4_ = name;
	if (_tmp4_ != NULL) {
		FsoGsmModem* _tmp5_;
		const gchar* _tmp6_;
		FsoGsmModem* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = fso_gsm_theModem;
		_tmp6_ = name;
		fso_gsm_modem_registerChannel (_tmp5_, _tmp6_, (FsoGsmChannel*) self);
		_tmp7_ = fso_gsm_theModem;
		g_signal_connect_object (_tmp7_, "signal-status-changed", (GCallback) _fso_gsm_at_channel_onModemStatusChanged_fso_gsm_modem_signal_status_changed, self, 0);
		_tmp8_ = name;
		self->priv->isMainChannel = g_strcmp0 (_tmp8_, "main") == 0;
	}
	return self;
}


FsoGsmAtChannel* fso_gsm_at_channel_new (const gchar* name, FsoFrameworkTransport* transport, FsoFrameworkParser* parser) {
	return fso_gsm_at_channel_construct (FSO_GSM_TYPE_AT_CHANNEL, name, transport, parser);
}


void fso_gsm_at_channel_onModemStatusChanged (FsoGsmAtChannel* self, FsoGsmModem* modem, FsoGsmModemStatus status) {
	FsoGsmModemStatus _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (modem != NULL);
	_tmp0_ = status;
	switch (_tmp0_) {
		case FSO_GSM_MODEM_STATUS_INITIALIZING:
		{
			fso_gsm_at_channel_initialize (self, NULL, NULL);
			break;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY:
		{
			fso_gsm_at_channel_simIsReady (self, NULL, NULL);
			break;
		}
		case FSO_GSM_MODEM_STATUS_ALIVE_REGISTERED:
		{
			fso_gsm_at_channel_simHasRegistered (self, NULL, NULL);
			break;
		}
		case FSO_GSM_MODEM_STATUS_CLOSING:
		{
			fso_gsm_at_channel_shutdown (self, NULL, NULL);
			break;
		}
		default:
		{
			break;
		}
	}
}


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


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


static void fso_gsm_at_channel_initialize (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAtChannelInitializeData* _data_;
	FsoGsmAtChannel* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAtChannelInitializeData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_initialize);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_initialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_initialize_co (_data_);
}


static void fso_gsm_at_channel_initialize_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	FsoGsmAtChannelInitializeData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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_at_channel_initialize_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAtChannelInitializeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_initialize_co (_data_);
}


static gboolean _fso_gsm_at_channel_initialize_co_gsource_func (gpointer self) {
	gboolean result;
	result = fso_gsm_at_channel_initialize_co (self);
	return result;
}


static gboolean fso_gsm_at_channel_initialize_co (FsoGsmAtChannelInitializeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->_tmp0_)->logger;
	_data_->_tmp2_ = _data_->self->name;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strconcat ("Initializing channel ", _data_->_tmp3_, " ...", NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = FALSE;
	_data_->_tmp6_ = fso_framework_logger_debug (_data_->_tmp1_, _data_->_tmp5_);
	g_assert (_data_->_tmp6_);
	_g_free0 (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->self->priv->isMainChannel;
	if (_data_->_tmp7_) {
		_data_->_tmp8_ = fso_gsm_theModem;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = fso_gsm_modem_atCommandSequence (_data_->_tmp8_, "MODEM", "init");
		_data_->seq1 = _data_->_tmp9_;
		_data_->_tmp10_ = _data_->seq1;
		_data_->_state_ = 1;
		fso_gsm_at_command_sequence_performOnChannel (_data_->_tmp10_, _data_->self, fso_gsm_at_channel_initialize_ready, _data_);
		return FALSE;
		_state_1:
		fso_gsm_at_command_sequence_performOnChannel_finish (_data_->_tmp10_, _data_->_res_);
		fso_gsm_at_channel_isMainInitialized = TRUE;
		_fso_gsm_at_command_sequence_unref0 (_data_->seq1);
	}
	while (TRUE) {
		_data_->_tmp11_ = fso_gsm_at_channel_isMainInitialized;
		if (!(!_data_->_tmp11_)) {
			break;
		}
		_data_->_tmp12_ = fso_gsm_theModem;
		_data_->_tmp13_ = 0;
		_data_->_tmp13_ = fso_gsm_modem_status (_data_->_tmp12_);
		if (_data_->_tmp13_ == FSO_GSM_MODEM_STATUS_CLOSING) {
			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 {
			_data_->_tmp14_ = fso_gsm_theModem;
			_data_->_tmp15_ = 0;
			_data_->_tmp15_ = fso_gsm_modem_status (_data_->_tmp14_);
			if (_data_->_tmp15_ == FSO_GSM_MODEM_STATUS_ALIVE_SIM_READY) {
				fso_gsm_at_channel_isMainInitialized = TRUE;
				break;
			}
		}
		_data_->_tmp16_ = fso_gsm_theModem;
		_data_->_tmp17_ = ((FsoFrameworkAbstractObject*) _data_->_tmp16_)->logger;
		fso_framework_logger_debug (_data_->_tmp17_, "Main channel not initialized yet... waiting");
		g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, _fso_gsm_at_channel_initialize_co_gsource_func, _data_, NULL);
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	_data_->_tmp18_ = fso_gsm_theModem;
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = fso_gsm_modem_atCommandSequence (_data_->_tmp18_, "CHANNEL", "init");
	_data_->seq2 = _data_->_tmp19_;
	_data_->_tmp20_ = _data_->seq2;
	_data_->_state_ = 3;
	fso_gsm_at_command_sequence_performOnChannel (_data_->_tmp20_, _data_->self, fso_gsm_at_channel_initialize_ready, _data_);
	return FALSE;
	_state_3:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->_tmp20_, _data_->_res_);
	_data_->_tmp21_ = fso_gsm_theModem;
	_data_->_tmp22_ = _data_->self->name;
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = fso_gsm_modem_atCommandSequence (_data_->_tmp21_, _data_->_tmp22_, "init");
	_data_->seq3 = _data_->_tmp23_;
	_data_->_tmp24_ = _data_->seq3;
	_data_->_state_ = 4;
	fso_gsm_at_command_sequence_performOnChannel (_data_->_tmp24_, _data_->self, fso_gsm_at_channel_initialize_ready, _data_);
	return FALSE;
	_state_4:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->_tmp24_, _data_->_res_);
	_data_->_tmp25_ = fso_gsm_theModem;
	_data_->_tmp26_ = NULL;
	_data_->_tmp26_ = fso_gsm_modem_data (_data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = _data_->_tmp27_->charset;
	_data_->_tmp29_ = g_strdup (_data_->_tmp28_);
	_data_->_tmp30_ = g_strdup ("UTF8");
	_data_->_tmp31_ = g_strdup ("UCS2");
	_data_->_tmp32_ = g_strdup ("HEX");
	_data_->_tmp33_ = g_strdup ("IRA");
	_data_->_tmp34_ = NULL;
	_data_->_tmp34_ = g_new0 (gchar*, 5 + 1);
	_data_->_tmp34_[0] = _data_->_tmp29_;
	_data_->_tmp34_[1] = _data_->_tmp30_;
	_data_->_tmp34_[2] = _data_->_tmp31_;
	_data_->_tmp34_[3] = _data_->_tmp32_;
	_data_->_tmp34_[4] = _data_->_tmp33_;
	_data_->_tmp35_ = _data_->_tmp34_;
	_data_->_tmp35__length1 = 5;
	_data_->_state_ = 5;
	fso_gsm_at_channel_configureCharset (_data_->self, _data_->_tmp35_, 5, fso_gsm_at_channel_initialize_ready, _data_);
	return FALSE;
	_state_5:
	_data_->_tmp36_ = NULL;
	_data_->_tmp36_ = fso_gsm_at_channel_configureCharset_finish (_data_->self, _data_->_res_);
	_data_->_tmp37_ = _data_->_tmp36_;
	_data_->_tmp35_ = (_vala_array_free (_data_->_tmp35_, _data_->_tmp35__length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->_tmp27_);
	_data_->charset = _data_->_tmp37_;
	_data_->_tmp38_ = _data_->charset;
	if (g_strcmp0 (_data_->_tmp38_, "unknown") == 0) {
		_data_->_tmp39_ = fso_gsm_theModem;
		_data_->_tmp40_ = ((FsoFrameworkAbstractObject*) _data_->_tmp39_)->logger;
		fso_framework_logger_warning (_data_->_tmp40_, "Modem does not support the charset command or any of UTF8, UCS2, HEX, " \
"IRA");
	} else {
		_data_->_tmp41_ = fso_gsm_theModem;
		_data_->_tmp42_ = ((FsoFrameworkAbstractObject*) _data_->_tmp41_)->logger;
		_data_->_tmp43_ = _data_->charset;
		_data_->_tmp44_ = NULL;
		_data_->_tmp44_ = string_to_string (_data_->_tmp43_);
		_data_->_tmp45_ = NULL;
		_data_->_tmp45_ = g_strconcat ("Channel successfully configured for charset '", _data_->_tmp44_, "'", NULL);
		_data_->_tmp46_ = _data_->_tmp45_;
		fso_framework_logger_info (_data_->_tmp42_, _data_->_tmp46_);
		_g_free0 (_data_->_tmp46_);
	}
	_data_->_tmp47_ = fso_gsm_theModem;
	_data_->_tmp48_ = NULL;
	_data_->_tmp48_ = fso_gsm_modem_data (_data_->_tmp47_);
	_data_->_tmp49_ = _data_->_tmp48_;
	_data_->_tmp50_ = _data_->charset;
	_data_->_tmp51_ = g_strdup (_data_->_tmp50_);
	_g_free0 (_data_->_tmp49_->charset);
	_data_->_tmp49_->charset = _data_->_tmp51_;
	_g_object_unref0 (_data_->_tmp49_);
	_data_->_tmp52_ = _data_->self->priv->isMainChannel;
	if (_data_->_tmp52_) {
		fso_gsm_at_channel_setupNetworkRegistrationReport (_data_->self, NULL, NULL);
		fso_gsm_gatherSimStatusAndUpdate (NULL, NULL);
	}
	_data_->self->priv->isInitialized = TRUE;
	_g_free0 (_data_->charset);
	_fso_gsm_at_command_sequence_unref0 (_data_->seq3);
	_fso_gsm_at_command_sequence_unref0 (_data_->seq2);
	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_at_channel_shutdown_data_free (gpointer _data) {
	FsoGsmAtChannelShutdownData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoGsmAtChannelShutdownData, _data_);
}


static void fso_gsm_at_channel_shutdown (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAtChannelShutdownData* _data_;
	FsoGsmAtChannel* _tmp0_;
	_data_ = g_slice_new0 (FsoGsmAtChannelShutdownData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_shutdown);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_shutdown_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_shutdown_co (_data_);
}


static void fso_gsm_at_channel_shutdown_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	FsoGsmAtChannelShutdownData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_at_channel_shutdown_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAtChannelShutdownData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_shutdown_co (_data_);
}


static gboolean fso_gsm_at_channel_shutdown_co (FsoGsmAtChannelShutdownData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->_tmp0_)->logger;
	_data_->_tmp2_ = _data_->self->name;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strconcat ("Shutting down channel ", _data_->_tmp3_, " ...", NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = FALSE;
	_data_->_tmp6_ = fso_framework_logger_debug (_data_->_tmp1_, _data_->_tmp5_);
	g_assert (_data_->_tmp6_);
	_g_free0 (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->self->priv->isMainChannel;
	if (_data_->_tmp7_) {
		_data_->_tmp8_ = _data_->self->priv->isInitialized;
		if (_data_->_tmp8_) {
			_data_->_tmp9_ = fso_gsm_theModem;
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = fso_gsm_modem_atCommandSequence (_data_->_tmp9_, "MODEM", "shutdown");
			_data_->seq = _data_->_tmp10_;
			_data_->_tmp11_ = _data_->seq;
			_data_->_state_ = 1;
			fso_gsm_at_command_sequence_performOnChannel (_data_->_tmp11_, _data_->self, fso_gsm_at_channel_shutdown_ready, _data_);
			return FALSE;
			_state_1:
			fso_gsm_at_command_sequence_performOnChannel_finish (_data_->_tmp11_, _data_->_res_);
			_fso_gsm_at_command_sequence_unref0 (_data_->seq);
		} else {
			_data_->_tmp12_ = fso_gsm_theModem;
			_data_->_tmp13_ = ((FsoFrameworkAbstractObject*) _data_->_tmp12_)->logger;
			fso_framework_logger_info (_data_->_tmp13_, "Not sending shutdown commands, since modem hasn't been initialized yet");
		}
	}
	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_at_channel_simIsReady_data_free (gpointer _data) {
	fso_gsm_at_channel_simIsReadyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_at_channel_simIsReadyData, _data_);
}


static void fso_gsm_at_channel_simIsReady (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_at_channel_simIsReadyData* _data_;
	FsoGsmAtChannel* _tmp0_;
	_data_ = g_slice_new0 (fso_gsm_at_channel_simIsReadyData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_simIsReady);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_simIsReady_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_simIsReady_co (_data_);
}


static void fso_gsm_at_channel_simIsReady_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	fso_gsm_at_channel_simIsReadyData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_at_channel_simIsReady_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_at_channel_simIsReadyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_simIsReady_co (_data_);
}


static gboolean fso_gsm_at_channel_simIsReady_co (fso_gsm_at_channel_simIsReadyData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = _data_->self->name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_modem_atCommandSequence (_data_->_tmp0_, _data_->_tmp1_, "unlocked");
	_data_->seq = _data_->_tmp2_;
	_data_->_state_ = 1;
	fso_gsm_at_command_sequence_performOnChannel (_data_->seq, _data_->self, fso_gsm_at_channel_simIsReady_ready, _data_);
	return FALSE;
	_state_1:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->seq, _data_->_res_);
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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_at_channel_simHasRegistered_data_free (gpointer _data) {
	fso_gsm_at_channel_simHasRegisteredData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_at_channel_simHasRegisteredData, _data_);
}


static void fso_gsm_at_channel_simHasRegistered (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_at_channel_simHasRegisteredData* _data_;
	FsoGsmAtChannel* _tmp0_;
	_data_ = g_slice_new0 (fso_gsm_at_channel_simHasRegisteredData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_simHasRegistered);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_simHasRegistered_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_simHasRegistered_co (_data_);
}


static void fso_gsm_at_channel_simHasRegistered_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	fso_gsm_at_channel_simHasRegisteredData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_at_channel_simHasRegistered_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_at_channel_simHasRegisteredData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_simHasRegistered_co (_data_);
}


static gboolean fso_gsm_at_channel_simHasRegistered_co (fso_gsm_at_channel_simHasRegisteredData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = _data_->self->name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_modem_atCommandSequence (_data_->_tmp0_, _data_->_tmp1_, "registered");
	_data_->seq = _data_->_tmp2_;
	_data_->_state_ = 1;
	fso_gsm_at_command_sequence_performOnChannel (_data_->seq, _data_->self, fso_gsm_at_channel_simHasRegistered_ready, _data_);
	return FALSE;
	_state_1:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->seq, _data_->_res_);
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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_at_channel_configureCharset_data_free (gpointer _data) {
	fso_gsm_at_channel_configureCharsetData* _data_;
	_data_ = _data;
	_data_->charsets = (_vala_array_free (_data_->charsets, _data_->charsets_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_at_channel_configureCharsetData, _data_);
}


static gchar** _vala_array_dup1 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void fso_gsm_at_channel_configureCharset (FsoGsmAtChannel* self, gchar** charsets, int charsets_length1, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_at_channel_configureCharsetData* _data_;
	FsoGsmAtChannel* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gchar** _tmp2_;
	gint _tmp2__length1;
	_data_ = g_slice_new0 (fso_gsm_at_channel_configureCharsetData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_configureCharset);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_configureCharset_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = charsets;
	_tmp1__length1 = charsets_length1;
	_tmp2_ = (_tmp1_ != NULL) ? _vala_array_dup1 (_tmp1_, _tmp1__length1) : ((gpointer) _tmp1_);
	_tmp2__length1 = _tmp1__length1;
	_data_->charsets = _tmp2_;
	_data_->charsets_length1 = _tmp2__length1;
	fso_gsm_at_channel_configureCharset_co (_data_);
}


static gchar* fso_gsm_at_channel_configureCharset_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	gchar* result;
	fso_gsm_at_channel_configureCharsetData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void fso_gsm_at_channel_configureCharset_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_at_channel_configureCharsetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_configureCharset_co (_data_);
}


static gboolean fso_gsm_at_channel_configureCharset_co (fso_gsm_at_channel_configureCharsetData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = ((FsoFrameworkAbstractObject*) _data_->_tmp0_)->logger;
	fso_framework_logger_info (_data_->_tmp1_, "Configuring modem charset...");
	{
		_data_->i = 0;
		{
			_data_->_tmp2_ = TRUE;
			while (TRUE) {
				_data_->_tmp3_ = _data_->_tmp2_;
				if (!_data_->_tmp3_) {
					_data_->_tmp4_ = _data_->i;
					_data_->i = _data_->_tmp4_ + 1;
				}
				_data_->_tmp2_ = FALSE;
				_data_->_tmp5_ = _data_->i;
				_data_->_tmp6_ = _data_->charsets;
				_data_->_tmp6__length1 = _data_->charsets_length1;
				if (!(_data_->_tmp5_ < _data_->_tmp6__length1)) {
					break;
				}
				_data_->_tmp7_ = fso_gsm_theModem;
				_data_->_tmp8_ = NULL;
				_data_->_tmp8_ = fso_gsm_modem_createAtCommand (_data_->_tmp7_, FSO_GSM_TYPE_PLUS_CSCS, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CSCS");
				_data_->cmd = (FsoGsmPlusCSCS*) _data_->_tmp8_;
				_data_->_tmp9_ = _data_->cmd;
				_data_->_tmp10_ = _data_->cmd;
				_data_->_tmp11_ = _data_->charsets;
				_data_->_tmp11__length1 = _data_->charsets_length1;
				_data_->_tmp12_ = _data_->i;
				_data_->_tmp13_ = _data_->_tmp11_[_data_->_tmp12_];
				_data_->_tmp14_ = NULL;
				_data_->_tmp14_ = fso_gsm_simple_at_command_issue ((FsoGsmSimpleAtCommand*) _data_->_tmp10_, _data_->_tmp13_);
				_data_->_tmp15_ = _data_->_tmp14_;
				_data_->_tmp16_ = 0;
				_data_->_state_ = 1;
				fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->self, (FsoGsmAtCommandQueueCommand*) _data_->_tmp9_, _data_->_tmp15_, 0, 0, fso_gsm_at_channel_configureCharset_ready, _data_);
				return FALSE;
				_state_1:
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->self, _data_->_res_, &_data_->_tmp16_);
				_data_->_tmp18_ = _data_->_tmp17_;
				_data_->_tmp18__length1 = _data_->_tmp16_;
				_g_free0 (_data_->_tmp15_);
				_data_->response = _data_->_tmp18_;
				_data_->response_length1 = _data_->_tmp18__length1;
				_data_->_response_size_ = _data_->response_length1;
				_data_->_tmp19_ = _data_->cmd;
				_data_->_tmp20_ = _data_->response;
				_data_->_tmp20__length1 = _data_->response_length1;
				_data_->_tmp21_ = 0;
				_data_->_tmp21_ = fso_gsm_abstract_at_command_validateOk ((FsoGsmAbstractAtCommand*) _data_->_tmp19_, _data_->_tmp20_, _data_->_tmp20__length1);
				if (_data_->_tmp21_ == FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
					_data_->_tmp22_ = _data_->charsets;
					_data_->_tmp22__length1 = _data_->charsets_length1;
					_data_->_tmp23_ = _data_->i;
					_data_->_tmp24_ = _data_->_tmp22_[_data_->_tmp23_];
					_data_->_tmp25_ = g_strdup (_data_->_tmp24_);
					_data_->result = _data_->_tmp25_;
					_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->cmd);
					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_->cmd);
			}
		}
	}
	_data_->_tmp26_ = g_strdup ("unknown");
	_data_->result = _data_->_tmp26_;
	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;
	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_at_channel_setupNetworkRegistrationReport_data_free (gpointer _data) {
	fso_gsm_at_channel_setupNetworkRegistrationReportData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (fso_gsm_at_channel_setupNetworkRegistrationReportData, _data_);
}


static void fso_gsm_at_channel_setupNetworkRegistrationReport (FsoGsmAtChannel* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_at_channel_setupNetworkRegistrationReportData* _data_;
	FsoGsmAtChannel* _tmp0_;
	_data_ = g_slice_new0 (fso_gsm_at_channel_setupNetworkRegistrationReportData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_setupNetworkRegistrationReport);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_setupNetworkRegistrationReport_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_setupNetworkRegistrationReport_co (_data_);
}


static void fso_gsm_at_channel_setupNetworkRegistrationReport_finish (FsoGsmAtChannel* self, GAsyncResult* _res_) {
	fso_gsm_at_channel_setupNetworkRegistrationReportData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_at_channel_setupNetworkRegistrationReport_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_at_channel_setupNetworkRegistrationReportData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_setupNetworkRegistrationReport_co (_data_);
}


static gboolean fso_gsm_at_channel_setupNetworkRegistrationReport_co (fso_gsm_at_channel_setupNetworkRegistrationReportData* _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_ = NULL;
	_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
	_data_->response = _data_->_tmp0_;
	_data_->response_length1 = 0;
	_data_->_response_size_ = _data_->response_length1;
	_data_->_tmp1_ = fso_gsm_theModem;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_modem_createAtCommand (_data_->_tmp1_, FSO_GSM_TYPE_PLUS_CREG, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CREG");
	_data_->cmd = (FsoGsmPlusCREG*) _data_->_tmp2_;
	_data_->_tmp3_ = _data_->cmd;
	_data_->_tmp4_ = _data_->cmd;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = fso_gsm_plus_creg_issue (_data_->_tmp4_, FSO_GSM_PLUS_CREG_MODE_ENABLE_WITH_NETORK_REGISTRATION_AND_LOCATION);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = 0;
	_data_->_state_ = 1;
	fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->self, (FsoGsmAtCommandQueueCommand*) _data_->_tmp3_, _data_->_tmp6_, 0, 0, fso_gsm_at_channel_setupNetworkRegistrationReport_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->self, _data_->_res_, &_data_->_tmp7_);
	_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
	_data_->response = _data_->_tmp8_;
	_data_->response_length1 = _data_->_tmp7_;
	_data_->_response_size_ = _data_->response_length1;
	_g_free0 (_data_->_tmp6_);
	_data_->_tmp9_ = _data_->cmd;
	_data_->_tmp10_ = _data_->response;
	_data_->_tmp10__length1 = _data_->response_length1;
	_data_->_tmp11_ = 0;
	_data_->_tmp11_ = fso_gsm_abstract_at_command_validateOk ((FsoGsmAbstractAtCommand*) _data_->_tmp9_, _data_->_tmp10_, _data_->_tmp10__length1);
	if (_data_->_tmp11_ == FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
		_g_object_unref0 (_data_->cmd);
		_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
		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_->_tmp12_ = _data_->cmd;
	_data_->_tmp13_ = _data_->cmd;
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = fso_gsm_plus_creg_issue (_data_->_tmp13_, FSO_GSM_PLUS_CREG_MODE_ENABLE_WITH_NETORK_REGISTRATION);
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = 0;
	_data_->_state_ = 2;
	fso_gsm_at_command_queue_enqueueAsync ((FsoGsmAtCommandQueue*) _data_->self, (FsoGsmAtCommandQueueCommand*) _data_->_tmp12_, _data_->_tmp15_, 0, 0, fso_gsm_at_channel_setupNetworkRegistrationReport_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = fso_gsm_at_command_queue_enqueueAsync_finish ((FsoGsmAtCommandQueue*) _data_->self, _data_->_res_, &_data_->_tmp16_);
	_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
	_data_->response = _data_->_tmp17_;
	_data_->response_length1 = _data_->_tmp16_;
	_data_->_response_size_ = _data_->response_length1;
	_g_free0 (_data_->_tmp15_);
	_data_->_tmp18_ = _data_->cmd;
	_data_->_tmp19_ = _data_->response;
	_data_->_tmp19__length1 = _data_->response_length1;
	_data_->_tmp20_ = 0;
	_data_->_tmp20_ = fso_gsm_abstract_at_command_validateOk ((FsoGsmAbstractAtCommand*) _data_->_tmp18_, _data_->_tmp19_, _data_->_tmp19__length1);
	if (_data_->_tmp20_ != FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
		_data_->_tmp21_ = fso_gsm_theModem;
		_data_->_tmp22_ = ((FsoFrameworkAbstractObject*) _data_->_tmp21_)->logger;
		fso_framework_logger_error (_data_->_tmp22_, "Failed to setup network registration reporting; reports will not be av" \
"aible ...");
	}
	_g_object_unref0 (_data_->cmd);
	_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
	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_at_channel_real_injectResponse (FsoGsmChannel* base, const gchar* response) {
	FsoGsmAtChannel * self;
	FsoFrameworkParser* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	self = (FsoGsmAtChannel*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = ((FsoGsmAtCommandQueue*) self)->parser;
	_tmp1_ = response;
	_tmp2_ = response;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	fso_framework_parser_feed (_tmp0_, _tmp1_, (gint) _tmp4_);
}


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


static void fso_gsm_at_channel_real_suspend (FsoGsmChannel* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAtChannel * self;
	FsoGsmAtChannelSuspendData* _data_;
	FsoGsmAtChannel* _tmp0_;
	self = (FsoGsmAtChannel*) base;
	_data_ = g_slice_new0 (FsoGsmAtChannelSuspendData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_real_suspend);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_real_suspend_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_real_suspend_co (_data_);
}


static gboolean fso_gsm_at_channel_real_suspend_finish (FsoGsmChannel* base, GAsyncResult* _res_) {
	gboolean result;
	FsoGsmAtChannelSuspendData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_at_channel_suspend_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAtChannelSuspendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_real_suspend_co (_data_);
}


static gboolean fso_gsm_at_channel_real_suspend_co (FsoGsmAtChannelSuspendData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = _data_->self->name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_modem_atCommandSequence (_data_->_tmp0_, _data_->_tmp1_, "suspend");
	_data_->seq = _data_->_tmp2_;
	_data_->_state_ = 1;
	fso_gsm_at_command_sequence_performOnChannel (_data_->seq, _data_->self, fso_gsm_at_channel_suspend_ready, _data_);
	return FALSE;
	_state_1:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->seq, _data_->_res_);
	_data_->result = TRUE;
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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;
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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_at_channel_real_resume_data_free (gpointer _data) {
	FsoGsmAtChannelResumeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoGsmAtChannelResumeData, _data_);
}


static void fso_gsm_at_channel_real_resume (FsoGsmChannel* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmAtChannel * self;
	FsoGsmAtChannelResumeData* _data_;
	FsoGsmAtChannel* _tmp0_;
	self = (FsoGsmAtChannel*) base;
	_data_ = g_slice_new0 (FsoGsmAtChannelResumeData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_at_channel_real_resume);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_at_channel_real_resume_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_at_channel_real_resume_co (_data_);
}


static gboolean fso_gsm_at_channel_real_resume_finish (FsoGsmChannel* base, GAsyncResult* _res_) {
	gboolean result;
	FsoGsmAtChannelResumeData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_at_channel_resume_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmAtChannelResumeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_at_channel_real_resume_co (_data_);
}


static gboolean fso_gsm_at_channel_real_resume_co (FsoGsmAtChannelResumeData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = _data_->self->name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = fso_gsm_modem_atCommandSequence (_data_->_tmp0_, _data_->_tmp1_, "resume");
	_data_->seq = _data_->_tmp2_;
	_data_->_state_ = 1;
	fso_gsm_at_command_sequence_performOnChannel (_data_->seq, _data_->self, fso_gsm_at_channel_resume_ready, _data_);
	return FALSE;
	_state_1:
	fso_gsm_at_command_sequence_performOnChannel_finish (_data_->seq, _data_->_res_);
	_data_->result = TRUE;
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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;
	_fso_gsm_at_command_sequence_unref0 (_data_->seq);
	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_at_channel_class_init (FsoGsmAtChannelClass * klass) {
	fso_gsm_at_channel_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoGsmAtChannelPrivate));
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_at_channel_finalize;
}


static void fso_gsm_at_channel_fso_gsm_channel_interface_init (FsoGsmChannelIface * iface) {
	fso_gsm_at_channel_fso_gsm_channel_parent_iface = g_type_interface_peek_parent (iface);
	iface->injectResponse = (void (*)(FsoGsmChannel*, const gchar*)) fso_gsm_at_channel_real_injectResponse;
	iface->suspend = (gboolean (*)(FsoGsmChannel*)) fso_gsm_at_channel_real_suspend;
	iface->suspend_finish = fso_gsm_at_channel_real_suspend_finish;
	iface->resume = (gboolean (*)(FsoGsmChannel*)) fso_gsm_at_channel_real_resume;
	iface->resume_finish = fso_gsm_at_channel_real_resume_finish;
}


static void fso_gsm_at_channel_instance_init (FsoGsmAtChannel * self) {
	self->priv = FSO_GSM_AT_CHANNEL_GET_PRIVATE (self);
}


static void fso_gsm_at_channel_finalize (GObject* obj) {
	FsoGsmAtChannel * self;
	self = FSO_GSM_AT_CHANNEL (obj);
	_g_free0 (self->name);
	G_OBJECT_CLASS (fso_gsm_at_channel_parent_class)->finalize (obj);
}


GType fso_gsm_at_channel_get_type (void) {
	static volatile gsize fso_gsm_at_channel_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_at_channel_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAtChannelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_at_channel_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmAtChannel), 0, (GInstanceInitFunc) fso_gsm_at_channel_instance_init, NULL };
		static const GInterfaceInfo fso_gsm_channel_info = { (GInterfaceInitFunc) fso_gsm_at_channel_fso_gsm_channel_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType fso_gsm_at_channel_type_id;
		fso_gsm_at_channel_type_id = g_type_register_static (FSO_GSM_TYPE_AT_COMMAND_QUEUE, "FsoGsmAtChannel", &g_define_type_info, 0);
		g_type_add_interface_static (fso_gsm_at_channel_type_id, FSO_GSM_TYPE_CHANNEL, &fso_gsm_channel_info);
		g_once_init_leave (&fso_gsm_at_channel_type_id__volatile, fso_gsm_at_channel_type_id);
	}
	return fso_gsm_at_channel_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);
}



