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

/*
 * Copyright (C) 2009-2011 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

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

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

#include <glib.h>
#include <glib-object.h>
#include <fsobasics.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <freesmartphone.h>
#include <fsotransport.h>
#include <gee.h>
#include <smsutil.h>
#include <conversions.h>


#define FSO_GSM_TYPE_MEDIATOR (fso_gsm_mediator_get_type ())
#define FSO_GSM_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_MEDIATOR, FsoGsmMediator))
#define FSO_GSM_IS_MEDIATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_MEDIATOR))
#define FSO_GSM_MEDIATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_MEDIATOR, FsoGsmMediatorIface))

typedef struct _FsoGsmMediator FsoGsmMediator;
typedef struct _FsoGsmMediatorIface FsoGsmMediatorIface;

#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_ABSTRACT_CALL_HANDLER (fso_gsm_abstract_call_handler_get_type ())
#define FSO_GSM_ABSTRACT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandler))
#define FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandlerClass))
#define FSO_GSM_IS_ABSTRACT_CALL_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER))
#define FSO_GSM_IS_ABSTRACT_CALL_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER))
#define FSO_GSM_ABSTRACT_CALL_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, FsoGsmAbstractCallHandlerClass))

typedef struct _FsoGsmAbstractCallHandler FsoGsmAbstractCallHandler;
typedef struct _FsoGsmAbstractCallHandlerClass FsoGsmAbstractCallHandlerClass;
typedef struct _FsoGsmAbstractCallHandlerPrivate FsoGsmAbstractCallHandlerPrivate;

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

typedef struct _FsoGsmGenericAtCallHandler FsoGsmGenericAtCallHandler;
typedef struct _FsoGsmGenericAtCallHandlerClass FsoGsmGenericAtCallHandlerClass;
typedef struct _FsoGsmGenericAtCallHandlerPrivate FsoGsmGenericAtCallHandlerPrivate;

#define FSO_GSM_TYPE_CALL (fso_gsm_call_get_type ())
#define FSO_GSM_CALL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CALL, FsoGsmCall))
#define FSO_GSM_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_CALL, FsoGsmCallClass))
#define FSO_GSM_IS_CALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CALL))
#define FSO_GSM_IS_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_CALL))
#define FSO_GSM_CALL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_CALL, FsoGsmCallClass))

typedef struct _FsoGsmCall FsoGsmCall;
typedef struct _FsoGsmCallClass FsoGsmCallClass;
#define _fso_framework_pair_unref0(var) ((var == NULL) ? NULL : (var = (fso_framework_pair_unref (var), NULL)))
typedef struct _FsoGsmCallPrivate FsoGsmCallPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#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_TYPE_CHANNEL (fso_gsm_channel_get_type ())
#define FSO_GSM_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CHANNEL, FsoGsmChannel))
#define FSO_GSM_IS_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CHANNEL))
#define FSO_GSM_CHANNEL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FSO_GSM_TYPE_CHANNEL, FsoGsmChannelIface))

typedef struct _FsoGsmChannel FsoGsmChannel;
typedef struct _FsoGsmChannelIface FsoGsmChannelIface;

#define FSO_GSM_MODEM_TYPE_STATUS (fso_gsm_modem_status_get_type ())

#define FSO_GSM_MODEM_TYPE_NETWORK_STATUS (fso_gsm_modem_network_status_get_type ())

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

typedef struct _FsoGsmAtCommandSequence FsoGsmAtCommandSequence;
typedef struct _FsoGsmAtCommandSequenceClass FsoGsmAtCommandSequenceClass;

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

typedef struct _FsoGsmAtCommandQueueCommand FsoGsmAtCommandQueueCommand;
typedef struct _FsoGsmAtCommandQueueCommandIface FsoGsmAtCommandQueueCommandIface;

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

typedef struct _FsoGsmAtCommand FsoGsmAtCommand;
typedef struct _FsoGsmAtCommandIface FsoGsmAtCommandIface;

#define FSO_GSM_CONSTANTS_TYPE_AT_RESPONSE (fso_gsm_constants_at_response_get_type ())

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

typedef struct _FsoGsmModemData FsoGsmModemData;
typedef struct _FsoGsmModemDataClass FsoGsmModemDataClass;

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

#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_CUSTOM_AT_COMMAND (fso_gsm_custom_at_command_get_type ())
#define FSO_GSM_CUSTOM_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CUSTOM_AT_COMMAND, FsoGsmCustomAtCommand))
#define FSO_GSM_CUSTOM_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_CUSTOM_AT_COMMAND, FsoGsmCustomAtCommandClass))
#define FSO_GSM_IS_CUSTOM_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CUSTOM_AT_COMMAND))
#define FSO_GSM_IS_CUSTOM_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_CUSTOM_AT_COMMAND))
#define FSO_GSM_CUSTOM_AT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_CUSTOM_AT_COMMAND, FsoGsmCustomAtCommandClass))

typedef struct _FsoGsmCustomAtCommand FsoGsmCustomAtCommand;
typedef struct _FsoGsmCustomAtCommandClass FsoGsmCustomAtCommandClass;

#define FSO_GSM_TYPE_V250TER_COMMAND (fso_gsm_v250ter_command_get_type ())
#define FSO_GSM_V250TER_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_V250TER_COMMAND, FsoGsmV250terCommand))
#define FSO_GSM_V250TER_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_V250TER_COMMAND, FsoGsmV250terCommandClass))
#define FSO_GSM_IS_V250TER_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_V250TER_COMMAND))
#define FSO_GSM_IS_V250TER_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_V250TER_COMMAND))
#define FSO_GSM_V250TER_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_V250TER_COMMAND, FsoGsmV250terCommandClass))

typedef struct _FsoGsmV250terCommand FsoGsmV250terCommand;
typedef struct _FsoGsmV250terCommandClass FsoGsmV250terCommandClass;

#define FSO_GSM_TYPE_V250_H (fso_gsm_v250_h_get_type ())
#define FSO_GSM_V250_H(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_V250_H, FsoGsmV250H))
#define FSO_GSM_V250_H_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_V250_H, FsoGsmV250HClass))
#define FSO_GSM_IS_V250_H(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_V250_H))
#define FSO_GSM_IS_V250_H_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_V250_H))
#define FSO_GSM_V250_H_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_V250_H, FsoGsmV250HClass))

typedef struct _FsoGsmV250H FsoGsmV250H;
typedef struct _FsoGsmV250HClass FsoGsmV250HClass;
typedef struct _fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData;
typedef struct _fso_gsm_generic_at_call_handler_rejectIncomingWithIdData fso_gsm_generic_at_call_handler_rejectIncomingWithIdData;

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

typedef struct _FsoGsmAbstractMediator FsoGsmAbstractMediator;
typedef struct _FsoGsmAbstractMediatorClass FsoGsmAbstractMediatorClass;

#define FSO_GSM_TYPE_CALL_LIST_CALLS (fso_gsm_call_list_calls_get_type ())
#define FSO_GSM_CALL_LIST_CALLS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_CALL_LIST_CALLS, FsoGsmCallListCalls))
#define FSO_GSM_CALL_LIST_CALLS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_CALL_LIST_CALLS, FsoGsmCallListCallsClass))
#define FSO_GSM_IS_CALL_LIST_CALLS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_CALL_LIST_CALLS))
#define FSO_GSM_IS_CALL_LIST_CALLS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_CALL_LIST_CALLS))
#define FSO_GSM_CALL_LIST_CALLS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_CALL_LIST_CALLS, FsoGsmCallListCallsClass))

typedef struct _FsoGsmCallListCalls FsoGsmCallListCalls;
typedef struct _FsoGsmCallListCallsClass FsoGsmCallListCallsClass;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define FSO_GSM_TYPE_PLUS_CEER (fso_gsm_plus_ceer_get_type ())
#define FSO_GSM_PLUS_CEER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PLUS_CEER, FsoGsmPlusCEER))
#define FSO_GSM_PLUS_CEER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PLUS_CEER, FsoGsmPlusCEERClass))
#define FSO_GSM_IS_PLUS_CEER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PLUS_CEER))
#define FSO_GSM_IS_PLUS_CEER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PLUS_CEER))
#define FSO_GSM_PLUS_CEER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PLUS_CEER, FsoGsmPlusCEERClass))

typedef struct _FsoGsmPlusCEER FsoGsmPlusCEER;
typedef struct _FsoGsmPlusCEERClass FsoGsmPlusCEERClass;
typedef struct _FsoGsmAbstractAtCommandPrivate FsoGsmAbstractAtCommandPrivate;
typedef struct _FsoGsmPlusCEERPrivate FsoGsmPlusCEERPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _fso_gsm_generic_at_call_handler_syncCallStatusData fso_gsm_generic_at_call_handler_syncCallStatusData;

#define FSO_GSM_TYPE_V250_D (fso_gsm_v250_d_get_type ())
#define FSO_GSM_V250_D(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_V250_D, FsoGsmV250D))
#define FSO_GSM_V250_D_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_V250_D, FsoGsmV250DClass))
#define FSO_GSM_IS_V250_D(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_V250_D))
#define FSO_GSM_IS_V250_D_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_V250_D))
#define FSO_GSM_V250_D_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_V250_D, FsoGsmV250DClass))

typedef struct _FsoGsmV250D FsoGsmV250D;
typedef struct _FsoGsmV250DClass FsoGsmV250DClass;

#define FSO_GSM_TYPE_PLUS_CHLD (fso_gsm_plus_chld_get_type ())
#define FSO_GSM_PLUS_CHLD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_PLUS_CHLD, FsoGsmPlusCHLD))
#define FSO_GSM_PLUS_CHLD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_PLUS_CHLD, FsoGsmPlusCHLDClass))
#define FSO_GSM_IS_PLUS_CHLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_PLUS_CHLD))
#define FSO_GSM_IS_PLUS_CHLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_PLUS_CHLD))
#define FSO_GSM_PLUS_CHLD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_PLUS_CHLD, FsoGsmPlusCHLDClass))

typedef struct _FsoGsmPlusCHLD FsoGsmPlusCHLD;
typedef struct _FsoGsmPlusCHLDClass FsoGsmPlusCHLDClass;

#define FSO_GSM_PLUS_CHLD_TYPE_ACTION (fso_gsm_plus_chld_action_get_type ())
typedef struct _FsoGsmGenericAtCallHandlerActivateData FsoGsmGenericAtCallHandlerActivateData;
typedef struct _FsoGsmGenericAtCallHandlerInitiateData FsoGsmGenericAtCallHandlerInitiateData;
typedef struct _FsoGsmGenericAtCallHandlerHoldData FsoGsmGenericAtCallHandlerHoldData;
typedef struct _FsoGsmGenericAtCallHandlerReleaseData FsoGsmGenericAtCallHandlerReleaseData;
typedef struct _fso_gsm_generic_at_call_handler_releaseAllData fso_gsm_generic_at_call_handler_releaseAllData;
#define _fso_gsm_call_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_call_unref (var), NULL)))

struct _FsoGsmMediatorIface {
	GTypeInterface parent_iface;
};

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 _FsoGsmAbstractCallHandler {
	FsoFrameworkAbstractObject parent_instance;
	FsoGsmAbstractCallHandlerPrivate * priv;
};

struct _FsoGsmAbstractCallHandlerClass {
	FsoFrameworkAbstractObjectClass parent_class;
	void (*handleIncomingCall) (FsoGsmAbstractCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleConnectingCall) (FsoGsmAbstractCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleEndingCall) (FsoGsmAbstractCallHandler* self, FsoGsmCallInfo* call_info);
	void (*addSupplementaryInformation) (FsoGsmAbstractCallHandler* self, const gchar* direction, const gchar* info);
	void (*startTimeoutIfNecessary) (FsoGsmAbstractCallHandler* self);
	void (*activate) (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*activate_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*initiate) (FsoGsmAbstractCallHandler* self, const gchar* number, const gchar* ctype, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gint (*initiate_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*hold) (FsoGsmAbstractCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*hold_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*release) (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*release_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*releaseAll) (FsoGsmAbstractCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*releaseAll_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*cancelOutgoingWithId) (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*cancelOutgoingWithId_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*rejectIncomingWithId) (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*rejectIncomingWithId_finish) (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
};

struct _FsoGsmGenericAtCallHandler {
	FsoGsmAbstractCallHandler parent_instance;
	FsoGsmGenericAtCallHandlerPrivate * priv;
	guint timeout;
	FsoGsmCall** calls;
	gint calls_length1;
	FsoFrameworkPair* supplementary;
};

struct _FsoGsmGenericAtCallHandlerClass {
	FsoGsmAbstractCallHandlerClass parent_class;
};

struct _FsoGsmGenericAtCallHandlerPrivate {
	gboolean inSyncCallStatus;
};

struct _FsoGsmCall {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FsoGsmCallPrivate * priv;
	FreeSmartphoneGSMCallDetail detail;
};

struct _FsoGsmCallClass {
	GTypeClass parent_class;
	void (*finalize) (FsoGsmCall *self);
};

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

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

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

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

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

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

struct _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 _fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gint id;
	FsoFrameworkLogger* _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	FsoGsmModem* _tmp7_;
	FsoGsmModemData* _tmp8_;
	FsoGsmModemData* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* cmd;
	const gchar* _tmp13_;
	FsoGsmCustomAtCommand* _tmp14_;
	FsoGsmCustomAtCommand* c1;
	FsoGsmModem* _tmp15_;
	FsoGsmCustomAtCommand* _tmp16_;
	const gchar* _tmp17_;
	gint _tmp18_;
	gchar** _tmp19_;
	gchar** r1;
	gint r1_length1;
	gint _r1_size_;
	FsoGsmCustomAtCommand* _tmp20_;
	gchar** _tmp21_;
	gint _tmp21__length1;
	FsoGsmModem* _tmp22_;
	gpointer _tmp23_;
	FsoGsmV250H* c2;
	FsoGsmModem* _tmp24_;
	FsoGsmV250H* _tmp25_;
	FsoGsmV250H* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gint _tmp29_;
	gchar** _tmp30_;
	gchar** _tmp31_;
	gint _tmp31__length1;
	gchar** r2;
	gint r2_length1;
	gint _r2_size_;
	FsoGsmV250H* _tmp32_;
	gchar** _tmp33_;
	gint _tmp33__length1;
	GError * _inner_error_;
};

struct _fso_gsm_generic_at_call_handler_rejectIncomingWithIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gint id;
	FsoFrameworkLogger* _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gboolean _tmp6_;
	FsoGsmModem* _tmp7_;
	FsoGsmModemData* _tmp8_;
	FsoGsmModemData* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* cmd;
	const gchar* _tmp13_;
	FsoGsmCustomAtCommand* _tmp14_;
	FsoGsmCustomAtCommand* c1;
	FsoGsmModem* _tmp15_;
	FsoGsmCustomAtCommand* _tmp16_;
	const gchar* _tmp17_;
	gint _tmp18_;
	gchar** _tmp19_;
	gchar** r1;
	gint r1_length1;
	gint _r1_size_;
	FsoGsmCustomAtCommand* _tmp20_;
	gchar** _tmp21_;
	gint _tmp21__length1;
	FsoGsmModem* _tmp22_;
	gpointer _tmp23_;
	FsoGsmV250H* c2;
	FsoGsmModem* _tmp24_;
	FsoGsmV250H* _tmp25_;
	FsoGsmV250H* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gint _tmp29_;
	gchar** _tmp30_;
	gchar** _tmp31_;
	gint _tmp31__length1;
	gchar** r2;
	gint r2_length1;
	gint _r2_size_;
	FsoGsmV250H* _tmp32_;
	gchar** _tmp33_;
	gint _tmp33__length1;
	GError * _inner_error_;
};

struct _FsoGsmAbstractAtCommand {
	GObject parent_instance;
	FsoGsmAbstractAtCommandPrivate * priv;
	GRegex* re;
	GRegex* tere;
	GMatchInfo* mi;
	gchar** prefix;
	gint prefix_length1;
	gint length;
};

struct _FsoGsmAbstractAtCommandClass {
	GObjectClass parent_class;
	void (*parse) (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
	void (*parseTest) (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
	void (*parseMulti) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1, GError** error);
	FsoGsmConstantsAtResponse (*validateOk) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validate) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateTest) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateMulti) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
	FsoGsmConstantsAtResponse (*validateUrc) (FsoGsmAbstractAtCommand* self, const gchar* response);
	FsoGsmConstantsAtResponse (*validateUrcPdu) (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
	guint (*get_timeout) (FsoGsmAbstractAtCommand* self);
	guint (*get_retry) (FsoGsmAbstractAtCommand* self);
	gchar* (*get_prefix) (FsoGsmAbstractAtCommand* self);
	gchar* (*get_postfix) (FsoGsmAbstractAtCommand* self);
};

struct _FsoGsmPlusCEER {
	FsoGsmAbstractAtCommand parent_instance;
	FsoGsmPlusCEERPrivate * priv;
	gchar* reason;
};

struct _FsoGsmPlusCEERClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _fso_gsm_generic_at_call_handler_syncCallStatusData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	FsoFrameworkLogger* _tmp0_;
	gboolean _tmp1_;
	FsoGsmModem* _tmp2_;
	gpointer _tmp3_;
	FsoGsmCallListCalls* m;
	FsoGsmCallListCalls* _tmp4_;
	gint length;
	FsoGsmCallListCalls* _tmp5_;
	FreeSmartphoneGSMCallDetail* _tmp6_;
	gint _tmp6__length1;
	FreeSmartphoneGSMCallDetail* _tmp7_;
	gint _tmp7__length1;
	FreeSmartphoneGSMCallDetail* c_collection;
	gint c_collection_length1;
	gint _c_collection_size_;
	gint c_it;
	FreeSmartphoneGSMCallDetail _tmp8_;
	FreeSmartphoneGSMCallDetail c;
	gint _tmp9_;
	FsoFrameworkLogger* _tmp10_;
	gint _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gboolean _tmp16_;
	gint _tmp17_;
	FsoFrameworkLogger* _tmp18_;
	gboolean _tmp19_;
	guint _tmp20_;
	FsoFrameworkPair* _tmp21_;
	FsoGsmCallListCalls* _tmp22_;
	FreeSmartphoneGSMCallDetail* _tmp23_;
	gint _tmp23__length1;
	FreeSmartphoneGSMCallDetail* _tmp24_;
	gint _tmp24__length1;
	FreeSmartphoneGSMCallDetail* ca_collection;
	gint ca_collection_length1;
	gint _ca_collection_size_;
	gint ca_it;
	FreeSmartphoneGSMCallDetail _tmp25_;
	FreeSmartphoneGSMCallDetail ca;
	FreeSmartphoneGSMCallDetail _tmp26_;
	GHashTable* _tmp27_;
	gconstpointer _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* direction;
	const gchar* _tmp31_;
	FsoFrameworkPair* _tmp32_;
	gconstpointer _tmp33_;
	FreeSmartphoneGSMCallDetail _tmp34_;
	GHashTable* _tmp35_;
	gchar* _tmp36_;
	FsoFrameworkPair* _tmp37_;
	gconstpointer _tmp38_;
	GVariant* _tmp39_;
	gboolean* _tmp40_;
	gboolean* visited;
	gint visited_length1;
	gint _visited_size_;
	FsoGsmCallListCalls* _tmp41_;
	FreeSmartphoneGSMCallDetail* _tmp42_;
	gint _tmp42__length1;
	FreeSmartphoneGSMCallDetail* _tmp43_;
	gint _tmp43__length1;
	FreeSmartphoneGSMCallDetail* call_collection;
	gint call_collection_length1;
	gint _call_collection_size_;
	gint call_it;
	FreeSmartphoneGSMCallDetail _tmp44_;
	FreeSmartphoneGSMCallDetail call;
	FsoGsmCall** _tmp45_;
	gint _tmp45__length1;
	FreeSmartphoneGSMCallDetail _tmp46_;
	gint _tmp47_;
	FsoGsmCall* _tmp48_;
	FreeSmartphoneGSMCallDetail _tmp49_;
	gboolean* _tmp50_;
	gint _tmp50__length1;
	FreeSmartphoneGSMCallDetail _tmp51_;
	gint _tmp52_;
	gboolean _tmp53_;
	gint i;
	gboolean _tmp54_;
	gboolean _tmp55_;
	gint _tmp56_;
	gint _tmp57_;
	gboolean _tmp58_;
	gboolean* _tmp59_;
	gint _tmp59__length1;
	gint _tmp60_;
	gboolean _tmp61_;
	FsoGsmCall** _tmp62_;
	gint _tmp62__length1;
	gint _tmp63_;
	FsoGsmCall* _tmp64_;
	FreeSmartphoneGSMCallDetail _tmp65_;
	FreeSmartphoneGSMCallStatus _tmp66_;
	gboolean _tmp67_;
	gint _tmp68_;
	GHashFunc _tmp69_;
	GEqualFunc _tmp70_;
	GHashTable* _tmp71_;
	GHashTable* _tmp72_;
	FreeSmartphoneGSMCallDetail detail;
	FsoGsmModem* _tmp73_;
	gpointer _tmp74_;
	FsoGsmPlusCEER* ceer;
	FsoGsmModem* _tmp75_;
	FsoGsmPlusCEER* _tmp76_;
	FsoGsmPlusCEER* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	gint _tmp80_;
	gchar** _tmp81_;
	gchar** _tmp82_;
	gint _tmp82__length1;
	gchar** _result_;
	gint _result__length1;
	gint __result__size_;
	FsoGsmPlusCEER* _tmp83_;
	gchar** _tmp84_;
	gint _tmp84__length1;
	FsoGsmConstantsAtResponse _tmp85_;
	FreeSmartphoneGSMCallDetail _tmp86_;
	GHashTable* _tmp87_;
	gchar* _tmp88_;
	FsoGsmPlusCEER* _tmp89_;
	const gchar* _tmp90_;
	GVariant* _tmp91_;
	FsoGsmCall** _tmp92_;
	gint _tmp92__length1;
	gint _tmp93_;
	FsoGsmCall* _tmp94_;
	FreeSmartphoneGSMCallDetail _tmp95_;
	GError* e;
	FsoFrameworkLogger* _tmp96_;
	GError* _tmp97_;
	const gchar* _tmp98_;
	const gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	GError * _inner_error_;
};

typedef enum  {
	FSO_GSM_PLUS_CHLD_ACTION_DROP_ALL_OR_SEND_BUSY = 0,
	FSO_GSM_PLUS_CHLD_ACTION_DROP_ALL_AND_ACCEPT_WAITING_OR_HELD = 1,
	FSO_GSM_PLUS_CHLD_ACTION_DROP_SPECIFIC_AND_ACCEPT_WAITING_OR_HELD = 1,
	FSO_GSM_PLUS_CHLD_ACTION_HOLD_ALL_AND_ACCEPT_WAITING_OR_HELD = 2,
	FSO_GSM_PLUS_CHLD_ACTION_HOLD_SPECIFIC_AND_ACCEPT_WAITING_OR_HELD = 2,
	FSO_GSM_PLUS_CHLD_ACTION_ACTIVATE_HELD = 3,
	FSO_GSM_PLUS_CHLD_ACTION_DROP_SELF_AND_CONNECT_ACTIVE = 4
} FsoGsmPlusCHLDAction;

struct _FsoGsmGenericAtCallHandlerActivateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gint id;
	gboolean _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GError* _tmp6_;
	GError* _tmp7_;
	gboolean _tmp8_;
	FsoGsmCall** _tmp9_;
	gint _tmp9__length1;
	gint _tmp10_;
	FsoGsmCall* _tmp11_;
	FreeSmartphoneGSMCallDetail _tmp12_;
	FreeSmartphoneGSMCallStatus _tmp13_;
	FsoGsmCall** _tmp14_;
	gint _tmp14__length1;
	gint _tmp15_;
	FsoGsmCall* _tmp16_;
	FreeSmartphoneGSMCallDetail _tmp17_;
	FreeSmartphoneGSMCallStatus _tmp18_;
	gboolean _tmp19_;
	GError* _tmp20_;
	gint _tmp21_;
	FsoGsmModem* _tmp22_;
	gpointer _tmp23_;
	FsoGsmV250D* cmd;
	FsoGsmModem* _tmp24_;
	FsoGsmV250D* _tmp25_;
	FsoGsmV250D* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gint _tmp29_;
	gchar** _tmp30_;
	gchar** _tmp31_;
	gint _tmp31__length1;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	FsoGsmV250D* _tmp32_;
	gchar** _tmp33_;
	gint _tmp33__length1;
	FsoGsmModem* _tmp34_;
	gpointer _tmp35_;
	FsoGsmPlusCHLD* cmd2;
	FsoGsmModem* _tmp36_;
	FsoGsmPlusCHLD* _tmp37_;
	FsoGsmPlusCHLD* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gint _tmp41_;
	gchar** _tmp42_;
	gchar** _tmp43_;
	gint _tmp43__length1;
	gchar** response2;
	gint response2_length1;
	gint _response2_size_;
	FsoGsmPlusCHLD* _tmp44_;
	gchar** _tmp45_;
	gint _tmp45__length1;
	GError * _inner_error_;
};

struct _FsoGsmGenericAtCallHandlerInitiateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gchar* number;
	gchar* ctype;
	gint result;
	gint _tmp0_;
	gint num;
	gint _tmp1_;
	GError* _tmp2_;
	FsoGsmModem* _tmp3_;
	gpointer _tmp4_;
	FsoGsmV250D* cmd;
	FsoGsmModem* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gint _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	GError * _inner_error_;
};

struct _FsoGsmGenericAtCallHandlerHoldData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gint _tmp0_;
	GError* _tmp1_;
	gint _tmp2_;
	GError* _tmp3_;
	FsoGsmModem* _tmp4_;
	gpointer _tmp5_;
	FsoGsmPlusCHLD* cmd;
	FsoGsmModem* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gint _tmp9_;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	GError * _inner_error_;
};

struct _FsoGsmGenericAtCallHandlerReleaseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	gint id;
	gboolean _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GError* _tmp6_;
	GError* _tmp7_;
	FsoGsmCall** _tmp8_;
	gint _tmp8__length1;
	gint _tmp9_;
	FsoGsmCall* _tmp10_;
	FreeSmartphoneGSMCallDetail _tmp11_;
	FreeSmartphoneGSMCallStatus _tmp12_;
	GError* _tmp13_;
	FsoGsmCall** _tmp14_;
	gint _tmp14__length1;
	gint _tmp15_;
	FsoGsmCall* _tmp16_;
	FreeSmartphoneGSMCallDetail _tmp17_;
	FreeSmartphoneGSMCallStatus _tmp18_;
	gint _tmp19_;
	gboolean _tmp20_;
	gint _tmp21_;
	FsoGsmCall** _tmp22_;
	gint _tmp22__length1;
	gint _tmp23_;
	FsoGsmCall* _tmp24_;
	FreeSmartphoneGSMCallDetail _tmp25_;
	FreeSmartphoneGSMCallStatus _tmp26_;
	gboolean _tmp27_;
	gint _tmp28_;
	FsoGsmModem* _tmp29_;
	gpointer _tmp30_;
	FsoGsmPlusCHLD* cmd;
	FsoGsmModem* _tmp31_;
	FsoGsmPlusCHLD* _tmp32_;
	FsoGsmPlusCHLD* _tmp33_;
	gint _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gint _tmp37_;
	gchar** _tmp38_;
	gchar** _tmp39_;
	gint _tmp39__length1;
	gchar** response;
	gint response_length1;
	gint _response_size_;
	FsoGsmPlusCHLD* _tmp40_;
	gchar** _tmp41_;
	gint _tmp41__length1;
	GError * _inner_error_;
};

struct _fso_gsm_generic_at_call_handler_releaseAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FsoGsmGenericAtCallHandler* self;
	FsoGsmModem* _tmp0_;
	gpointer _tmp1_;
	FsoGsmV250H* cmd;
	FsoGsmModem* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gint _tmp5_;
	gchar** _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
};


static gpointer fso_gsm_generic_at_call_handler_parent_class = NULL;
extern FsoGsmModem* fso_gsm_theModem;

#define CALL_STATUS_REFRESH_TIMEOUT 3
GType fso_gsm_mediator_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;
GType fso_gsm_abstract_call_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_generic_at_call_handler_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_call_ref (gpointer instance);
void fso_gsm_call_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_call (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_call (GValue* value, gpointer v_object);
void fso_gsm_value_take_call (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_call (const GValue* value);
GType fso_gsm_call_get_type (void) G_GNUC_CONST;
#define FSO_GSM_GENERIC_AT_CALL_HANDLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER, FsoGsmGenericAtCallHandlerPrivate))
enum  {
	FSO_GSM_GENERIC_AT_CALL_HANDLER_DUMMY_PROPERTY
};
static gint fso_gsm_generic_at_call_handler_numberOfBusyCalls (FsoGsmGenericAtCallHandler* self);
#define FSO_GSM_CONSTANTS_CALL_INDEX_MIN 1
#define FSO_GSM_CONSTANTS_CALL_INDEX_MAX ((guint) 7)
static gint fso_gsm_generic_at_call_handler_numberOfCallsWithStatus (FsoGsmGenericAtCallHandler* self, FreeSmartphoneGSMCallStatus status);
static gint fso_gsm_generic_at_call_handler_lowestOfCallsWithStatus (FsoGsmGenericAtCallHandler* self, FreeSmartphoneGSMCallStatus status);
static gchar* fso_gsm_generic_at_call_handler_real_repr (FsoFrameworkAbstractObject* base);
static void fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_co (fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData* _data_);
GType fso_gsm_channel_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_status_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_network_status_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_at_command_sequence_ref (gpointer instance);
void fso_gsm_at_command_sequence_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_at_command_sequence (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_at_command_sequence (GValue* value, gpointer v_object);
void fso_gsm_value_take_at_command_sequence (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_at_command_sequence (const GValue* value);
GType fso_gsm_at_command_sequence_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_command_queue_command_get_type (void) G_GNUC_CONST;
GQuark fso_gsm_at_command_error_quark (void);
GType fso_gsm_constants_at_response_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_data_get_type (void) G_GNUC_CONST;
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;
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;
FsoGsmCustomAtCommand* fso_gsm_custom_at_command_new (const gchar* name, gboolean prefixoptional);
FsoGsmCustomAtCommand* fso_gsm_custom_at_command_construct (GType object_type, const gchar* name, gboolean prefixoptional);
GType fso_gsm_abstract_at_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_custom_at_command_get_type (void) G_GNUC_CONST;
void fso_gsm_modem_processAtCommandAsync (FsoGsmModem* self, FsoGsmAtCommand* command, const gchar* request, gint retries, GAsyncReadyCallback _callback_, gpointer _user_data_);
gchar** fso_gsm_modem_processAtCommandAsync_finish (FsoGsmModem* self, GAsyncResult* _res_, int* result_length1);
#define FSO_GSM_MODEM_DEFAULT_RETRIES 3
static void fso_gsm_generic_at_call_handler_cancelOutgoingWithId_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_checkResponseOk (FsoGsmAtCommand* command, gchar** response, int response_length1, GError** error);
gpointer fso_gsm_modem_createAtCommand (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* command);
GType fso_gsm_v250ter_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_v250_h_get_type (void) G_GNUC_CONST;
gchar* fso_gsm_v250ter_command_execute (FsoGsmV250terCommand* self);
static void fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_rejectIncomingWithId (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_co (fso_gsm_generic_at_call_handler_rejectIncomingWithIdData* _data_);
static void fso_gsm_generic_at_call_handler_rejectIncomingWithId_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_generic_at_call_handler_real_startTimeoutIfNecessary (FsoGsmAbstractCallHandler* base);
gboolean fso_gsm_generic_at_call_handler_onTimeout (FsoGsmGenericAtCallHandler* self);
static gboolean _fso_gsm_generic_at_call_handler_onTimeout_gsource_func (gpointer self);
void fso_gsm_generic_at_call_handler_syncCallStatus (FsoGsmGenericAtCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_generic_at_call_handler_syncCallStatus_finish (FsoGsmGenericAtCallHandler* self, GAsyncResult* _res_);
static void fso_gsm_generic_at_call_handler_real_addSupplementaryInformation (FsoGsmAbstractCallHandler* base, const gchar* direction, const gchar* info);
static void fso_gsm_generic_at_call_handler_syncCallStatus_data_free (gpointer _data);
static gboolean fso_gsm_generic_at_call_handler_syncCallStatus_co (fso_gsm_generic_at_call_handler_syncCallStatusData* _data_);
gpointer fso_gsm_modem_createMediator (FsoGsmModem* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GError** error);
GType fso_gsm_abstract_mediator_get_type (void) G_GNUC_CONST;
GType fso_gsm_call_list_calls_get_type (void) G_GNUC_CONST;
void fso_gsm_call_list_calls_run (FsoGsmCallListCalls* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_call_list_calls_run_finish (FsoGsmCallListCalls* self, GAsyncResult* _res_, GError** error);
static void fso_gsm_generic_at_call_handler_syncCallStatus_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
FreeSmartphoneGSMCallDetail* fso_gsm_call_list_calls_get_calls (FsoGsmCallListCalls* self, int* result_length1);
static GVariant* _variant_new1 (const gchar* value);
gboolean fso_gsm_call_update (FsoGsmCall* self, FreeSmartphoneGSMCallDetail* detail);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
GType fso_gsm_plus_ceer_get_type (void) G_GNUC_CONST;
gchar* fso_gsm_plus_ceer_execute (FsoGsmPlusCEER* self);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validate (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static GVariant* _variant_new2 (const gchar* value);
static void fso_gsm_generic_at_call_handler_real_activate_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_activate (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_activate_co (FsoGsmGenericAtCallHandlerActivateData* _data_);
GType fso_gsm_v250_d_get_type (void) G_GNUC_CONST;
static void fso_gsm_generic_at_call_handler_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType fso_gsm_plus_chld_get_type (void) G_GNUC_CONST;
GType fso_gsm_plus_chld_action_get_type (void) G_GNUC_CONST;
gchar* fso_gsm_plus_chld_issue (FsoGsmPlusCHLD* self, FsoGsmPlusCHLDAction action, gint cid);
static void fso_gsm_generic_at_call_handler_real_initiate_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_initiate (FsoGsmAbstractCallHandler* base, const gchar* number, const gchar* ctype, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_initiate_co (FsoGsmGenericAtCallHandlerInitiateData* _data_);
gchar* fso_gsm_v250_d_issue (FsoGsmV250D* self, const gchar* number, gboolean voice);
static void fso_gsm_generic_at_call_handler_initiate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_abstract_call_handler_startTimeoutIfNecessary (FsoGsmAbstractCallHandler* self);
static void fso_gsm_generic_at_call_handler_real_hold_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_hold (FsoGsmAbstractCallHandler* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_hold_co (FsoGsmGenericAtCallHandlerHoldData* _data_);
static void fso_gsm_generic_at_call_handler_hold_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void fso_gsm_generic_at_call_handler_real_release_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_release (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_release_co (FsoGsmGenericAtCallHandlerReleaseData* _data_);
void fso_gsm_abstract_call_handler_cancelOutgoingWithId (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_call_handler_cancelOutgoingWithId_finish (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
static void fso_gsm_generic_at_call_handler_release_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void fso_gsm_abstract_call_handler_rejectIncomingWithId (FsoGsmAbstractCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
void fso_gsm_abstract_call_handler_rejectIncomingWithId_finish (FsoGsmAbstractCallHandler* self, GAsyncResult* _res_, GError** error);
static void fso_gsm_generic_at_call_handler_real_releaseAll_data_free (gpointer _data);
static void fso_gsm_generic_at_call_handler_real_releaseAll (FsoGsmAbstractCallHandler* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean fso_gsm_generic_at_call_handler_real_releaseAll_co (fso_gsm_generic_at_call_handler_releaseAllData* _data_);
static void fso_gsm_generic_at_call_handler_releaseAll_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_new (void);
FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_construct (GType object_type);
FsoGsmAbstractCallHandler* fso_gsm_abstract_call_handler_construct (GType object_type);
static GObject * fso_gsm_generic_at_call_handler_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
FsoGsmCall* fso_gsm_call_new_newFromId (gint id);
FsoGsmCall* fso_gsm_call_construct_newFromId (GType object_type, gint id);
static void fso_gsm_generic_at_call_handler_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 gint fso_gsm_generic_at_call_handler_numberOfBusyCalls (FsoGsmGenericAtCallHandler* self) {
	gint result = 0;
	gint num;
	g_return_val_if_fail (self != NULL, 0);
	num = 0;
	{
		gint i;
		i = FSO_GSM_CONSTANTS_CALL_INDEX_MIN;
		{
			gboolean _tmp0_;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp1_;
				gint _tmp3_;
				gboolean _tmp4_ = FALSE;
				FsoGsmCall** _tmp5_;
				gint _tmp5__length1;
				gint _tmp6_;
				FsoGsmCall* _tmp7_;
				FreeSmartphoneGSMCallDetail _tmp8_;
				FreeSmartphoneGSMCallStatus _tmp9_;
				gboolean _tmp15_;
				_tmp1_ = _tmp0_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp3_ = i;
				if (!(((guint) _tmp3_) != FSO_GSM_CONSTANTS_CALL_INDEX_MAX)) {
					break;
				}
				_tmp5_ = self->calls;
				_tmp5__length1 = self->calls_length1;
				_tmp6_ = i;
				_tmp7_ = _tmp5_[_tmp6_];
				_tmp8_ = _tmp7_->detail;
				_tmp9_ = _tmp8_.status;
				if (_tmp9_ != FREE_SMARTPHONE_GSM_CALL_STATUS_RELEASE) {
					FsoGsmCall** _tmp10_;
					gint _tmp10__length1;
					gint _tmp11_;
					FsoGsmCall* _tmp12_;
					FreeSmartphoneGSMCallDetail _tmp13_;
					FreeSmartphoneGSMCallStatus _tmp14_;
					_tmp10_ = self->calls;
					_tmp10__length1 = self->calls_length1;
					_tmp11_ = i;
					_tmp12_ = _tmp10_[_tmp11_];
					_tmp13_ = _tmp12_->detail;
					_tmp14_ = _tmp13_.status;
					_tmp4_ = _tmp14_ != FREE_SMARTPHONE_GSM_CALL_STATUS_INCOMING;
				} else {
					_tmp4_ = FALSE;
				}
				_tmp15_ = _tmp4_;
				if (_tmp15_) {
					gint _tmp16_;
					_tmp16_ = num;
					num = _tmp16_ + 1;
				}
			}
		}
	}
	result = num;
	return result;
}


static gint fso_gsm_generic_at_call_handler_numberOfCallsWithStatus (FsoGsmGenericAtCallHandler* self, FreeSmartphoneGSMCallStatus status) {
	gint result = 0;
	gint num;
	g_return_val_if_fail (self != NULL, 0);
	num = 0;
	{
		gint i;
		i = FSO_GSM_CONSTANTS_CALL_INDEX_MIN;
		{
			gboolean _tmp0_;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp1_;
				gint _tmp3_;
				FsoGsmCall** _tmp4_;
				gint _tmp4__length1;
				gint _tmp5_;
				FsoGsmCall* _tmp6_;
				FreeSmartphoneGSMCallDetail _tmp7_;
				FreeSmartphoneGSMCallStatus _tmp8_;
				FreeSmartphoneGSMCallStatus _tmp9_;
				_tmp1_ = _tmp0_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp3_ = i;
				if (!(((guint) _tmp3_) != FSO_GSM_CONSTANTS_CALL_INDEX_MAX)) {
					break;
				}
				_tmp4_ = self->calls;
				_tmp4__length1 = self->calls_length1;
				_tmp5_ = i;
				_tmp6_ = _tmp4_[_tmp5_];
				_tmp7_ = _tmp6_->detail;
				_tmp8_ = _tmp7_.status;
				_tmp9_ = status;
				if (_tmp8_ == _tmp9_) {
					gint _tmp10_;
					_tmp10_ = num;
					num = _tmp10_ + 1;
				}
			}
		}
	}
	result = num;
	return result;
}


static gint fso_gsm_generic_at_call_handler_lowestOfCallsWithStatus (FsoGsmGenericAtCallHandler* self, FreeSmartphoneGSMCallStatus status) {
	gint result = 0;
	g_return_val_if_fail (self != NULL, 0);
	{
		gint i;
		i = FSO_GSM_CONSTANTS_CALL_INDEX_MIN;
		{
			gboolean _tmp0_;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp1_;
				gint _tmp3_;
				FsoGsmCall** _tmp4_;
				gint _tmp4__length1;
				gint _tmp5_;
				FsoGsmCall* _tmp6_;
				FreeSmartphoneGSMCallDetail _tmp7_;
				FreeSmartphoneGSMCallStatus _tmp8_;
				FreeSmartphoneGSMCallStatus _tmp9_;
				_tmp1_ = _tmp0_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp3_ = i;
				if (!(((guint) _tmp3_) != FSO_GSM_CONSTANTS_CALL_INDEX_MAX)) {
					break;
				}
				_tmp4_ = self->calls;
				_tmp4__length1 = self->calls_length1;
				_tmp5_ = i;
				_tmp6_ = _tmp4_[_tmp5_];
				_tmp7_ = _tmp6_->detail;
				_tmp8_ = _tmp7_.status;
				_tmp9_ = status;
				if (_tmp8_ == _tmp9_) {
					result = i;
					return result;
				}
			}
		}
	}
	result = 0;
	return result;
}


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


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


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


static void fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	gint _tmp1_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_data_->id = _tmp1_;
	fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_cancelOutgoingWithId_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_co (fso_gsm_generic_at_call_handler_cancelOutgoingWithIdData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = _data_->id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup_printf ("%i", _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strconcat ("Cancelling outgoing call with ID ", _data_->_tmp3_, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = FALSE;
	_data_->_tmp6_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp5_);
	g_assert (_data_->_tmp6_);
	_g_free0 (_data_->_tmp5_);
	_g_free0 (_data_->_tmp3_);
	_data_->_tmp7_ = fso_gsm_theModem;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = fso_gsm_modem_data (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _data_->_tmp9_->atCommandCancelOutgoing;
	_data_->_tmp11_ = g_strdup (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_g_object_unref0 (_data_->_tmp9_);
	_data_->cmd = _data_->_tmp12_;
	_data_->_tmp13_ = _data_->cmd;
	if (_data_->_tmp13_ != NULL) {
		_data_->_tmp14_ = fso_gsm_custom_at_command_new ("", FALSE);
		_data_->c1 = _data_->_tmp14_;
		_data_->_tmp15_ = fso_gsm_theModem;
		_data_->_tmp16_ = _data_->c1;
		_data_->_tmp17_ = _data_->cmd;
		_data_->_tmp18_ = 0;
		_data_->_state_ = 1;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp15_, (FsoGsmAtCommand*) _data_->_tmp16_, _data_->_tmp17_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_cancelOutgoingWithId_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp15_, _data_->_res_, &_data_->_tmp18_);
		_data_->r1 = _data_->_tmp19_;
		_data_->r1_length1 = _data_->_tmp18_;
		_data_->_r1_size_ = _data_->r1_length1;
		_data_->_tmp20_ = _data_->c1;
		_data_->_tmp21_ = _data_->r1;
		_data_->_tmp21__length1 = _data_->r1_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp20_, _data_->_tmp21_, _data_->_tmp21__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c1);
				_g_free0 (_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;
			} else {
				_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c1);
				_g_free0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->c1);
	} else {
		_data_->_tmp22_ = fso_gsm_theModem;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = fso_gsm_modem_createAtCommand (_data_->_tmp22_, FSO_GSM_TYPE_V250_H, (GBoxedCopyFunc) g_object_ref, g_object_unref, "H");
		_data_->c2 = (FsoGsmV250H*) _data_->_tmp23_;
		_data_->_tmp24_ = fso_gsm_theModem;
		_data_->_tmp25_ = _data_->c2;
		_data_->_tmp26_ = _data_->c2;
		_data_->_tmp27_ = NULL;
		_data_->_tmp27_ = fso_gsm_v250ter_command_execute ((FsoGsmV250terCommand*) _data_->_tmp26_);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = 0;
		_data_->_state_ = 2;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp24_, (FsoGsmAtCommand*) _data_->_tmp25_, _data_->_tmp28_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_cancelOutgoingWithId_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp24_, _data_->_res_, &_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp31__length1 = _data_->_tmp29_;
		_g_free0 (_data_->_tmp28_);
		_data_->r2 = _data_->_tmp31_;
		_data_->r2_length1 = _data_->_tmp31__length1;
		_data_->_r2_size_ = _data_->r2_length1;
		_data_->_tmp32_ = _data_->c2;
		_data_->_tmp33_ = _data_->r2;
		_data_->_tmp33__length1 = _data_->r2_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp32_, _data_->_tmp33_, _data_->_tmp33__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c2);
				_g_free0 (_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;
			} else {
				_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c2);
				_g_free0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->c2);
	}
	_g_free0 (_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;
}


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


static void fso_gsm_generic_at_call_handler_real_rejectIncomingWithId (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	fso_gsm_generic_at_call_handler_rejectIncomingWithIdData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	gint _tmp1_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (fso_gsm_generic_at_call_handler_rejectIncomingWithIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_rejectIncomingWithId);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_data_->id = _tmp1_;
	fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	fso_gsm_generic_at_call_handler_rejectIncomingWithIdData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_rejectIncomingWithId_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_generic_at_call_handler_rejectIncomingWithIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_co (fso_gsm_generic_at_call_handler_rejectIncomingWithIdData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
	_data_->_tmp1_ = _data_->id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup_printf ("%i", _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strconcat ("Rejecting incoming call with ID ", _data_->_tmp3_, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = FALSE;
	_data_->_tmp6_ = fso_framework_logger_debug (_data_->_tmp0_, _data_->_tmp5_);
	g_assert (_data_->_tmp6_);
	_g_free0 (_data_->_tmp5_);
	_g_free0 (_data_->_tmp3_);
	_data_->_tmp7_ = fso_gsm_theModem;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = fso_gsm_modem_data (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _data_->_tmp9_->atCommandRejectIncoming;
	_data_->_tmp11_ = g_strdup (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_g_object_unref0 (_data_->_tmp9_);
	_data_->cmd = _data_->_tmp12_;
	_data_->_tmp13_ = _data_->cmd;
	if (_data_->_tmp13_ != NULL) {
		_data_->_tmp14_ = fso_gsm_custom_at_command_new ("", FALSE);
		_data_->c1 = _data_->_tmp14_;
		_data_->_tmp15_ = fso_gsm_theModem;
		_data_->_tmp16_ = _data_->c1;
		_data_->_tmp17_ = _data_->cmd;
		_data_->_tmp18_ = 0;
		_data_->_state_ = 1;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp15_, (FsoGsmAtCommand*) _data_->_tmp16_, _data_->_tmp17_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_rejectIncomingWithId_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp15_, _data_->_res_, &_data_->_tmp18_);
		_data_->r1 = _data_->_tmp19_;
		_data_->r1_length1 = _data_->_tmp18_;
		_data_->_r1_size_ = _data_->r1_length1;
		_data_->_tmp20_ = _data_->c1;
		_data_->_tmp21_ = _data_->r1;
		_data_->_tmp21__length1 = _data_->r1_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp20_, _data_->_tmp21_, _data_->_tmp21__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c1);
				_g_free0 (_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;
			} else {
				_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c1);
				_g_free0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->r1 = (_vala_array_free (_data_->r1, _data_->r1_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->c1);
	} else {
		_data_->_tmp22_ = fso_gsm_theModem;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = fso_gsm_modem_createAtCommand (_data_->_tmp22_, FSO_GSM_TYPE_V250_H, (GBoxedCopyFunc) g_object_ref, g_object_unref, "H");
		_data_->c2 = (FsoGsmV250H*) _data_->_tmp23_;
		_data_->_tmp24_ = fso_gsm_theModem;
		_data_->_tmp25_ = _data_->c2;
		_data_->_tmp26_ = _data_->c2;
		_data_->_tmp27_ = NULL;
		_data_->_tmp27_ = fso_gsm_v250ter_command_execute ((FsoGsmV250terCommand*) _data_->_tmp26_);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = 0;
		_data_->_state_ = 2;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp24_, (FsoGsmAtCommand*) _data_->_tmp25_, _data_->_tmp28_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_rejectIncomingWithId_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp24_, _data_->_res_, &_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp31__length1 = _data_->_tmp29_;
		_g_free0 (_data_->_tmp28_);
		_data_->r2 = _data_->_tmp31_;
		_data_->r2_length1 = _data_->_tmp31__length1;
		_data_->_r2_size_ = _data_->r2_length1;
		_data_->_tmp32_ = _data_->c2;
		_data_->_tmp33_ = _data_->r2;
		_data_->_tmp33__length1 = _data_->r2_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp32_, _data_->_tmp33_, _data_->_tmp33__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c2);
				_g_free0 (_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;
			} else {
				_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->c2);
				_g_free0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->r2 = (_vala_array_free (_data_->r2, _data_->r2_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->c2);
	}
	_g_free0 (_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;
}


static gboolean _fso_gsm_generic_at_call_handler_onTimeout_gsource_func (gpointer self) {
	gboolean result;
	result = fso_gsm_generic_at_call_handler_onTimeout (self);
	return result;
}


static void fso_gsm_generic_at_call_handler_real_startTimeoutIfNecessary (FsoGsmAbstractCallHandler* base) {
	FsoGsmGenericAtCallHandler * self;
	guint _tmp0_;
	self = (FsoGsmGenericAtCallHandler*) base;
	fso_gsm_generic_at_call_handler_onTimeout (self);
	_tmp0_ = self->timeout;
	if (_tmp0_ == ((guint) 0)) {
		guint _tmp1_ = 0U;
		_tmp1_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) CALL_STATUS_REFRESH_TIMEOUT, _fso_gsm_generic_at_call_handler_onTimeout_gsource_func, g_object_ref (self), g_object_unref);
		self->timeout = _tmp1_;
	}
}


gboolean fso_gsm_generic_at_call_handler_onTimeout (FsoGsmGenericAtCallHandler* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->inSyncCallStatus;
	if (_tmp0_) {
		FsoFrameworkLogger* _tmp1_;
		gboolean _tmp2_ = FALSE;
		_tmp1_ = ((FsoFrameworkAbstractObject*) self)->logger;
		_tmp2_ = fso_framework_logger_debug (_tmp1_, "Synchronizing call status not done yet... ignoring");
		g_assert (_tmp2_);
	} else {
		fso_gsm_generic_at_call_handler_syncCallStatus (self, NULL, NULL);
	}
	result = TRUE;
	return result;
}


static void fso_gsm_generic_at_call_handler_real_addSupplementaryInformation (FsoGsmAbstractCallHandler* base, const gchar* direction, const gchar* info) {
	FsoGsmGenericAtCallHandler * self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	FsoFrameworkPair* _tmp2_;
	self = (FsoGsmGenericAtCallHandler*) base;
	g_return_if_fail (direction != NULL);
	g_return_if_fail (info != NULL);
	_tmp0_ = direction;
	_tmp1_ = info;
	_tmp2_ = fso_framework_pair_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, _tmp0_, _tmp1_);
	_fso_framework_pair_unref0 (self->supplementary);
	self->supplementary = _tmp2_;
}


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


void fso_gsm_generic_at_call_handler_syncCallStatus (FsoGsmGenericAtCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	fso_gsm_generic_at_call_handler_syncCallStatusData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	_data_ = g_slice_new0 (fso_gsm_generic_at_call_handler_syncCallStatusData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_syncCallStatus);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_syncCallStatus_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_generic_at_call_handler_syncCallStatus_co (_data_);
}


void fso_gsm_generic_at_call_handler_syncCallStatus_finish (FsoGsmGenericAtCallHandler* self, GAsyncResult* _res_) {
	fso_gsm_generic_at_call_handler_syncCallStatusData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_syncCallStatus_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_generic_at_call_handler_syncCallStatusData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_syncCallStatus_co (_data_);
}


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


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


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


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


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 gboolean fso_gsm_generic_at_call_handler_syncCallStatus_co (fso_gsm_generic_at_call_handler_syncCallStatusData* _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_->self->priv->inSyncCallStatus = TRUE;
	{
		_data_->_tmp0_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		_data_->_tmp1_ = FALSE;
		_data_->_tmp1_ = fso_framework_logger_debug (_data_->_tmp0_, "Synchronizing call status");
		g_assert (_data_->_tmp1_);
		_data_->_tmp2_ = fso_gsm_theModem;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = fso_gsm_modem_createMediator (_data_->_tmp2_, FSO_GSM_TYPE_CALL_LIST_CALLS, (GBoxedCopyFunc) g_object_ref, g_object_unref, &_data_->_inner_error_);
		_data_->m = (FsoGsmCallListCalls*) _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->m;
		_data_->_state_ = 1;
		fso_gsm_call_list_calls_run (_data_->_tmp4_, fso_gsm_generic_at_call_handler_syncCallStatus_ready, _data_);
		return FALSE;
		_state_1:
		fso_gsm_call_list_calls_run_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->m);
			goto __catch0_g_error;
		}
		_data_->length = 0;
		_data_->_tmp5_ = _data_->m;
		_data_->_tmp6_ = fso_gsm_call_list_calls_get_calls (_data_->_tmp5_, &_data_->_tmp6__length1);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp7__length1 = _data_->_tmp6__length1;
		{
			_data_->c_collection_length1 = 0;
			_data_->_c_collection_size_ = 0;
			_data_->c_collection = _data_->_tmp7_;
			_data_->c_collection_length1 = _data_->_tmp7__length1;
			_data_->c_it = 0;
			for (_data_->c_it = 0; _data_->c_it < _data_->_tmp7__length1; _data_->c_it = _data_->c_it + 1) {
				memset (&_data_->_tmp8_, 0, sizeof (FreeSmartphoneGSMCallDetail));
				free_smartphone_gsm_call_detail_copy (&_data_->c_collection[_data_->c_it], &_data_->_tmp8_);
				_data_->c = _data_->_tmp8_;
				{
					_data_->_tmp9_ = _data_->length;
					_data_->length = _data_->_tmp9_ + 1;
					free_smartphone_gsm_call_detail_destroy (&_data_->c);
				}
			}
		}
		_data_->_tmp10_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		_data_->_tmp11_ = _data_->length;
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = g_strdup_printf ("%i", _data_->_tmp11_);
		_data_->_tmp13_ = _data_->_tmp12_;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = g_strconcat (_data_->_tmp13_, " calls known in the system", NULL);
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = FALSE;
		_data_->_tmp16_ = fso_framework_logger_debug (_data_->_tmp10_, _data_->_tmp15_);
		g_assert (_data_->_tmp16_);
		_g_free0 (_data_->_tmp15_);
		_g_free0 (_data_->_tmp13_);
		_data_->_tmp17_ = _data_->length;
		if (_data_->_tmp17_ == 0) {
			_data_->_tmp18_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
			_data_->_tmp19_ = FALSE;
			_data_->_tmp19_ = fso_framework_logger_debug (_data_->_tmp18_, "call status idle -> stopping updater");
			g_assert (_data_->_tmp19_);
			_data_->_tmp20_ = _data_->self->timeout;
			g_source_remove (_data_->_tmp20_);
			_data_->self->timeout = (guint) 0;
		}
		_data_->_tmp21_ = _data_->self->supplementary;
		if (_data_->_tmp21_ != NULL) {
			_data_->_tmp22_ = _data_->m;
			_data_->_tmp23_ = fso_gsm_call_list_calls_get_calls (_data_->_tmp22_, &_data_->_tmp23__length1);
			_data_->_tmp24_ = _data_->_tmp23_;
			_data_->_tmp24__length1 = _data_->_tmp23__length1;
			{
				_data_->ca_collection_length1 = 0;
				_data_->_ca_collection_size_ = 0;
				_data_->ca_collection = _data_->_tmp24_;
				_data_->ca_collection_length1 = _data_->_tmp24__length1;
				_data_->ca_it = 0;
				for (_data_->ca_it = 0; _data_->ca_it < _data_->_tmp24__length1; _data_->ca_it = _data_->ca_it + 1) {
					memset (&_data_->_tmp25_, 0, sizeof (FreeSmartphoneGSMCallDetail));
					free_smartphone_gsm_call_detail_copy (&_data_->ca_collection[_data_->ca_it], &_data_->_tmp25_);
					_data_->ca = _data_->_tmp25_;
					{
						_data_->_tmp26_ = _data_->ca;
						_data_->_tmp27_ = _data_->_tmp26_.properties;
						_data_->_tmp28_ = NULL;
						_data_->_tmp28_ = g_hash_table_lookup (_data_->_tmp27_, "direction");
						_data_->_tmp29_ = NULL;
						_data_->_tmp29_ = g_variant_get_string ((GVariant*) _data_->_tmp28_, NULL);
						_data_->_tmp30_ = g_strdup (_data_->_tmp29_);
						_data_->direction = _data_->_tmp30_;
						_data_->_tmp31_ = _data_->direction;
						_data_->_tmp32_ = _data_->self->supplementary;
						_data_->_tmp33_ = _data_->_tmp32_->first;
						if (g_strcmp0 (_data_->_tmp31_, (const gchar*) _data_->_tmp33_) == 0) {
							_data_->_tmp34_ = _data_->ca;
							_data_->_tmp35_ = _data_->_tmp34_.properties;
							_data_->_tmp36_ = g_strdup ("service");
							_data_->_tmp37_ = _data_->self->supplementary;
							_data_->_tmp38_ = _data_->_tmp37_->second;
							_data_->_tmp39_ = _variant_new1 ((const gchar*) _data_->_tmp38_);
							g_hash_table_insert (_data_->_tmp35_, _data_->_tmp36_, _data_->_tmp39_);
						}
						_g_free0 (_data_->direction);
						free_smartphone_gsm_call_detail_destroy (&_data_->ca);
					}
				}
			}
			_fso_framework_pair_unref0 (_data_->self->supplementary);
			_data_->self->supplementary = NULL;
		}
		_data_->_tmp40_ = NULL;
		_data_->_tmp40_ = g_new0 (gboolean, FSO_GSM_CONSTANTS_CALL_INDEX_MAX + 1);
		_data_->visited = _data_->_tmp40_;
		_data_->visited_length1 = FSO_GSM_CONSTANTS_CALL_INDEX_MAX + 1;
		_data_->_visited_size_ = _data_->visited_length1;
		_data_->_tmp41_ = _data_->m;
		_data_->_tmp42_ = fso_gsm_call_list_calls_get_calls (_data_->_tmp41_, &_data_->_tmp42__length1);
		_data_->_tmp43_ = _data_->_tmp42_;
		_data_->_tmp43__length1 = _data_->_tmp42__length1;
		{
			_data_->call_collection_length1 = 0;
			_data_->_call_collection_size_ = 0;
			_data_->call_collection = _data_->_tmp43_;
			_data_->call_collection_length1 = _data_->_tmp43__length1;
			_data_->call_it = 0;
			for (_data_->call_it = 0; _data_->call_it < _data_->_tmp43__length1; _data_->call_it = _data_->call_it + 1) {
				memset (&_data_->_tmp44_, 0, sizeof (FreeSmartphoneGSMCallDetail));
				free_smartphone_gsm_call_detail_copy (&_data_->call_collection[_data_->call_it], &_data_->_tmp44_);
				_data_->call = _data_->_tmp44_;
				{
					_data_->_tmp45_ = _data_->self->calls;
					_data_->_tmp45__length1 = _data_->self->calls_length1;
					_data_->_tmp46_ = _data_->call;
					_data_->_tmp47_ = _data_->_tmp46_.id;
					_data_->_tmp48_ = _data_->_tmp45_[_data_->_tmp47_];
					_data_->_tmp49_ = _data_->call;
					fso_gsm_call_update (_data_->_tmp48_, &_data_->_tmp49_);
					_data_->_tmp50_ = _data_->visited;
					_data_->_tmp50__length1 = _data_->visited_length1;
					_data_->_tmp51_ = _data_->call;
					_data_->_tmp52_ = _data_->_tmp51_.id;
					_data_->_tmp50_[_data_->_tmp52_] = TRUE;
					_data_->_tmp53_ = _data_->_tmp50_[_data_->_tmp52_];
					free_smartphone_gsm_call_detail_destroy (&_data_->call);
				}
			}
		}
		{
			_data_->i = FSO_GSM_CONSTANTS_CALL_INDEX_MIN;
			{
				_data_->_tmp54_ = TRUE;
				while (TRUE) {
					_data_->_tmp55_ = _data_->_tmp54_;
					if (!_data_->_tmp55_) {
						_data_->_tmp56_ = _data_->i;
						_data_->i = _data_->_tmp56_ + 1;
					}
					_data_->_tmp54_ = FALSE;
					_data_->_tmp57_ = _data_->i;
					if (!(((guint) _data_->_tmp57_) != FSO_GSM_CONSTANTS_CALL_INDEX_MAX)) {
						break;
					}
					_data_->_tmp59_ = _data_->visited;
					_data_->_tmp59__length1 = _data_->visited_length1;
					_data_->_tmp60_ = _data_->i;
					_data_->_tmp61_ = _data_->_tmp59_[_data_->_tmp60_];
					if (!_data_->_tmp61_) {
						_data_->_tmp62_ = _data_->self->calls;
						_data_->_tmp62__length1 = _data_->self->calls_length1;
						_data_->_tmp63_ = _data_->i;
						_data_->_tmp64_ = _data_->_tmp62_[_data_->_tmp63_];
						_data_->_tmp65_ = _data_->_tmp64_->detail;
						_data_->_tmp66_ = _data_->_tmp65_.status;
						_data_->_tmp58_ = _data_->_tmp66_ != FREE_SMARTPHONE_GSM_CALL_STATUS_RELEASE;
					} else {
						_data_->_tmp58_ = FALSE;
					}
					_data_->_tmp67_ = _data_->_tmp58_;
					if (_data_->_tmp67_) {
						_data_->_tmp68_ = _data_->i;
						_data_->_tmp69_ = g_str_hash;
						_data_->_tmp70_ = g_str_equal;
						_data_->_tmp71_ = g_hash_table_new_full (_data_->_tmp69_, _data_->_tmp70_, _g_free0_, _g_variant_unref0_);
						_data_->_tmp72_ = _data_->_tmp71_;
						free_smartphone_gsm_call_detail_init (&_data_->detail, _data_->_tmp68_, FREE_SMARTPHONE_GSM_CALL_STATUS_RELEASE, _data_->_tmp72_);
						_g_hash_table_unref0 (_data_->_tmp72_);
						_data_->_tmp73_ = fso_gsm_theModem;
						_data_->_tmp74_ = NULL;
						_data_->_tmp74_ = fso_gsm_modem_createAtCommand (_data_->_tmp73_, FSO_GSM_TYPE_PLUS_CEER, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CEER");
						_data_->ceer = (FsoGsmPlusCEER*) _data_->_tmp74_;
						_data_->_tmp75_ = fso_gsm_theModem;
						_data_->_tmp76_ = _data_->ceer;
						_data_->_tmp77_ = _data_->ceer;
						_data_->_tmp78_ = NULL;
						_data_->_tmp78_ = fso_gsm_plus_ceer_execute (_data_->_tmp77_);
						_data_->_tmp79_ = _data_->_tmp78_;
						_data_->_tmp80_ = 0;
						_data_->_state_ = 2;
						fso_gsm_modem_processAtCommandAsync (_data_->_tmp75_, (FsoGsmAtCommand*) _data_->_tmp76_, _data_->_tmp79_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_syncCallStatus_ready, _data_);
						return FALSE;
						_state_2:
						_data_->_tmp81_ = NULL;
						_data_->_tmp81_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp75_, _data_->_res_, &_data_->_tmp80_);
						_data_->_tmp82_ = _data_->_tmp81_;
						_data_->_tmp82__length1 = _data_->_tmp80_;
						_g_free0 (_data_->_tmp79_);
						_data_->_result_ = _data_->_tmp82_;
						_data_->_result__length1 = _data_->_tmp82__length1;
						_data_->__result__size_ = _data_->_result__length1;
						_data_->_tmp83_ = _data_->ceer;
						_data_->_tmp84_ = _data_->_result_;
						_data_->_tmp84__length1 = _data_->_result__length1;
						_data_->_tmp85_ = 0;
						_data_->_tmp85_ = fso_gsm_abstract_at_command_validate ((FsoGsmAbstractAtCommand*) _data_->_tmp83_, _data_->_tmp84_, _data_->_tmp84__length1);
						if (_data_->_tmp85_ == FSO_GSM_CONSTANTS_AT_RESPONSE_VALID) {
							_data_->_tmp86_ = _data_->detail;
							_data_->_tmp87_ = _data_->_tmp86_.properties;
							_data_->_tmp88_ = g_strdup ("cause");
							_data_->_tmp89_ = _data_->ceer;
							_data_->_tmp90_ = _data_->_tmp89_->reason;
							_data_->_tmp91_ = _variant_new2 (_data_->_tmp90_);
							g_hash_table_insert (_data_->_tmp87_, _data_->_tmp88_, _data_->_tmp91_);
						}
						_data_->_tmp92_ = _data_->self->calls;
						_data_->_tmp92__length1 = _data_->self->calls_length1;
						_data_->_tmp93_ = _data_->i;
						_data_->_tmp94_ = _data_->_tmp92_[_data_->_tmp93_];
						_data_->_tmp95_ = _data_->detail;
						fso_gsm_call_update (_data_->_tmp94_, &_data_->_tmp95_);
						_data_->_result_ = (_vala_array_free (_data_->_result_, _data_->_result__length1, (GDestroyNotify) g_free), NULL);
						_g_object_unref0 (_data_->ceer);
						free_smartphone_gsm_call_detail_destroy (&_data_->detail);
					}
				}
			}
		}
		_data_->visited = (g_free (_data_->visited), NULL);
		_g_object_unref0 (_data_->m);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp96_ = ((FsoFrameworkAbstractObject*) _data_->self)->logger;
		_data_->_tmp97_ = _data_->e;
		_data_->_tmp98_ = _data_->_tmp97_->message;
		_data_->_tmp99_ = NULL;
		_data_->_tmp99_ = string_to_string (_data_->_tmp98_);
		_data_->_tmp100_ = NULL;
		_data_->_tmp100_ = g_strconcat ("Can't synchronize call status: ", _data_->_tmp99_, NULL);
		_data_->_tmp101_ = _data_->_tmp100_;
		fso_framework_logger_error (_data_->_tmp96_, _data_->_tmp101_);
		_g_free0 (_data_->_tmp101_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->self->priv->inSyncCallStatus = 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_generic_at_call_handler_real_activate_data_free (gpointer _data) {
	FsoGsmGenericAtCallHandlerActivateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoGsmGenericAtCallHandlerActivateData, _data_);
}


static void fso_gsm_generic_at_call_handler_real_activate (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	FsoGsmGenericAtCallHandlerActivateData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	gint _tmp1_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (FsoGsmGenericAtCallHandlerActivateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_activate);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_activate_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_data_->id = _tmp1_;
	fso_gsm_generic_at_call_handler_real_activate_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_activate_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	FsoGsmGenericAtCallHandlerActivateData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_activate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandlerActivateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_activate_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_activate_co (FsoGsmGenericAtCallHandlerActivateData* _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_->_tmp1_ = _data_->id;
	if (_data_->_tmp1_ < 1) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp2_ = _data_->id;
		_data_->_tmp0_ = ((guint) _data_->_tmp2_) > FSO_GSM_CONSTANTS_CALL_INDEX_MAX;
	}
	_data_->_tmp3_ = _data_->_tmp0_;
	if (_data_->_tmp3_) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = g_strdup_printf ("Call index needs to be within [ 1, %d ]", (gint) FSO_GSM_CONSTANTS_CALL_INDEX_MAX);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INVALID_PARAMETER, _data_->_tmp5_);
		_data_->_tmp7_ = _data_->_tmp6_;
		_g_free0 (_data_->_tmp5_);
		_data_->_inner_error_ = _data_->_tmp7_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp9_ = _data_->self->calls;
	_data_->_tmp9__length1 = _data_->self->calls_length1;
	_data_->_tmp10_ = _data_->id;
	_data_->_tmp11_ = _data_->_tmp9_[_data_->_tmp10_];
	_data_->_tmp12_ = _data_->_tmp11_->detail;
	_data_->_tmp13_ = _data_->_tmp12_.status;
	if (_data_->_tmp13_ != FREE_SMARTPHONE_GSM_CALL_STATUS_INCOMING) {
		_data_->_tmp14_ = _data_->self->calls;
		_data_->_tmp14__length1 = _data_->self->calls_length1;
		_data_->_tmp15_ = _data_->id;
		_data_->_tmp16_ = _data_->_tmp14_[_data_->_tmp15_];
		_data_->_tmp17_ = _data_->_tmp16_->detail;
		_data_->_tmp18_ = _data_->_tmp17_.status;
		_data_->_tmp8_ = _data_->_tmp18_ != FREE_SMARTPHONE_GSM_CALL_STATUS_HELD;
	} else {
		_data_->_tmp8_ = FALSE;
	}
	_data_->_tmp19_ = _data_->_tmp8_;
	if (_data_->_tmp19_) {
		_data_->_tmp20_ = g_error_new_literal (FREE_SMARTPHONE_GSM_ERROR, FREE_SMARTPHONE_GSM_ERROR_CALL_NOT_FOUND, "No suitable call to activate found");
		_data_->_inner_error_ = _data_->_tmp20_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp21_ = 0;
	_data_->_tmp21_ = fso_gsm_generic_at_call_handler_numberOfBusyCalls (_data_->self);
	if (_data_->_tmp21_ == 0) {
		_data_->_tmp22_ = fso_gsm_theModem;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = fso_gsm_modem_createAtCommand (_data_->_tmp22_, FSO_GSM_TYPE_V250_D, (GBoxedCopyFunc) g_object_ref, g_object_unref, "A");
		_data_->cmd = (FsoGsmV250D*) _data_->_tmp23_;
		_data_->_tmp24_ = fso_gsm_theModem;
		_data_->_tmp25_ = _data_->cmd;
		_data_->_tmp26_ = _data_->cmd;
		_data_->_tmp27_ = NULL;
		_data_->_tmp27_ = fso_gsm_v250ter_command_execute ((FsoGsmV250terCommand*) _data_->_tmp26_);
		_data_->_tmp28_ = _data_->_tmp27_;
		_data_->_tmp29_ = 0;
		_data_->_state_ = 1;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp24_, (FsoGsmAtCommand*) _data_->_tmp25_, _data_->_tmp28_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_activate_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp24_, _data_->_res_, &_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp31__length1 = _data_->_tmp29_;
		_g_free0 (_data_->_tmp28_);
		_data_->response = _data_->_tmp31_;
		_data_->response_length1 = _data_->_tmp31__length1;
		_data_->_response_size_ = _data_->response_length1;
		_data_->_tmp32_ = _data_->cmd;
		_data_->_tmp33_ = _data_->response;
		_data_->_tmp33__length1 = _data_->response_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp32_, _data_->_tmp33_, _data_->_tmp33__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_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;
			} else {
				_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->cmd);
	} else {
		_data_->_tmp34_ = fso_gsm_theModem;
		_data_->_tmp35_ = NULL;
		_data_->_tmp35_ = fso_gsm_modem_createAtCommand (_data_->_tmp34_, FSO_GSM_TYPE_PLUS_CHLD, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CHLD");
		_data_->cmd2 = (FsoGsmPlusCHLD*) _data_->_tmp35_;
		_data_->_tmp36_ = fso_gsm_theModem;
		_data_->_tmp37_ = _data_->cmd2;
		_data_->_tmp38_ = _data_->cmd2;
		_data_->_tmp39_ = NULL;
		_data_->_tmp39_ = fso_gsm_plus_chld_issue (_data_->_tmp38_, FSO_GSM_PLUS_CHLD_ACTION_HOLD_ALL_AND_ACCEPT_WAITING_OR_HELD, 0);
		_data_->_tmp40_ = _data_->_tmp39_;
		_data_->_tmp41_ = 0;
		_data_->_state_ = 2;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp36_, (FsoGsmAtCommand*) _data_->_tmp37_, _data_->_tmp40_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_activate_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp42_ = NULL;
		_data_->_tmp42_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp36_, _data_->_res_, &_data_->_tmp41_);
		_data_->_tmp43_ = _data_->_tmp42_;
		_data_->_tmp43__length1 = _data_->_tmp41_;
		_g_free0 (_data_->_tmp40_);
		_data_->response2 = _data_->_tmp43_;
		_data_->response2_length1 = _data_->_tmp43__length1;
		_data_->_response2_size_ = _data_->response2_length1;
		_data_->_tmp44_ = _data_->cmd2;
		_data_->_tmp45_ = _data_->response2;
		_data_->_tmp45__length1 = _data_->response2_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp44_, _data_->_tmp45_, _data_->_tmp45__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_data_->response2 = (_vala_array_free (_data_->response2, _data_->response2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->cmd2);
				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_->response2 = (_vala_array_free (_data_->response2, _data_->response2_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->cmd2);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->response2 = (_vala_array_free (_data_->response2, _data_->response2_length1, (GDestroyNotify) g_free), NULL);
		_g_object_unref0 (_data_->cmd2);
	}
	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_generic_at_call_handler_real_initiate_data_free (gpointer _data) {
	FsoGsmGenericAtCallHandlerInitiateData* _data_;
	_data_ = _data;
	_g_free0 (_data_->number);
	_g_free0 (_data_->ctype);
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoGsmGenericAtCallHandlerInitiateData, _data_);
}


static void fso_gsm_generic_at_call_handler_real_initiate (FsoGsmAbstractCallHandler* base, const gchar* number, const gchar* ctype, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	FsoGsmGenericAtCallHandlerInitiateData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (FsoGsmGenericAtCallHandlerInitiateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_initiate);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_initiate_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = number;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->number = _tmp2_;
	_tmp3_ = ctype;
	_tmp4_ = g_strdup (_tmp3_);
	_data_->ctype = _tmp4_;
	fso_gsm_generic_at_call_handler_real_initiate_co (_data_);
}


static gint fso_gsm_generic_at_call_handler_real_initiate_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	gint result;
	FsoGsmGenericAtCallHandlerInitiateData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return 0;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void fso_gsm_generic_at_call_handler_initiate_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandlerInitiateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_initiate_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_initiate_co (FsoGsmGenericAtCallHandlerInitiateData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = 0;
	_data_->_tmp0_ = fso_gsm_generic_at_call_handler_lowestOfCallsWithStatus (_data_->self, FREE_SMARTPHONE_GSM_CALL_STATUS_RELEASE);
	_data_->num = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->num;
	if (_data_->_tmp1_ == 0) {
		_data_->_tmp2_ = g_error_new_literal (FREE_SMARTPHONE_GSM_ERROR, FREE_SMARTPHONE_GSM_ERROR_CALL_NOT_FOUND, "System busy");
		_data_->_inner_error_ = _data_->_tmp2_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp3_ = fso_gsm_theModem;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = fso_gsm_modem_createAtCommand (_data_->_tmp3_, FSO_GSM_TYPE_V250_D, (GBoxedCopyFunc) g_object_ref, g_object_unref, "D");
	_data_->cmd = (FsoGsmV250D*) _data_->_tmp4_;
	_data_->_tmp5_ = fso_gsm_theModem;
	_data_->_tmp6_ = _data_->number;
	_data_->_tmp7_ = _data_->ctype;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = fso_gsm_v250_d_issue (_data_->cmd, _data_->_tmp6_, g_strcmp0 (_data_->_tmp7_, "voice") == 0);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = 0;
	_data_->_state_ = 1;
	fso_gsm_modem_processAtCommandAsync (_data_->_tmp5_, (FsoGsmAtCommand*) _data_->cmd, _data_->_tmp9_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_initiate_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp5_, _data_->_res_, &_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp12__length1 = _data_->_tmp10_;
	_g_free0 (_data_->_tmp9_);
	_data_->response = _data_->_tmp12_;
	_data_->response_length1 = _data_->_tmp12__length1;
	_data_->_response_size_ = _data_->response_length1;
	fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->cmd, _data_->response, _data_->response_length1, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_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;
		} else {
			_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (_data_->cmd);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	fso_gsm_abstract_call_handler_startTimeoutIfNecessary ((FsoGsmAbstractCallHandler*) _data_->self);
	_data_->result = _data_->num;
	_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);
	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_generic_at_call_handler_real_hold_data_free (gpointer _data) {
	FsoGsmGenericAtCallHandlerHoldData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FsoGsmGenericAtCallHandlerHoldData, _data_);
}


static void fso_gsm_generic_at_call_handler_real_hold (FsoGsmAbstractCallHandler* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	FsoGsmGenericAtCallHandlerHoldData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (FsoGsmGenericAtCallHandlerHoldData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_hold);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_hold_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_generic_at_call_handler_real_hold_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_hold_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	FsoGsmGenericAtCallHandlerHoldData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_hold_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandlerHoldData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_hold_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_hold_co (FsoGsmGenericAtCallHandlerHoldData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = 0;
	_data_->_tmp0_ = fso_gsm_generic_at_call_handler_numberOfCallsWithStatus (_data_->self, FREE_SMARTPHONE_GSM_CALL_STATUS_ACTIVE);
	if (_data_->_tmp0_ == 0) {
		_data_->_tmp1_ = g_error_new_literal (FREE_SMARTPHONE_GSM_ERROR, FREE_SMARTPHONE_GSM_ERROR_CALL_NOT_FOUND, "No active call present");
		_data_->_inner_error_ = _data_->_tmp1_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp2_ = 0;
	_data_->_tmp2_ = fso_gsm_generic_at_call_handler_numberOfCallsWithStatus (_data_->self, FREE_SMARTPHONE_GSM_CALL_STATUS_INCOMING);
	if (_data_->_tmp2_ > 0) {
		_data_->_tmp3_ = g_error_new_literal (FREE_SMARTPHONE_GSM_ERROR, FREE_SMARTPHONE_GSM_ERROR_CALL_NOT_FOUND, "Call incoming. Can't hold active calls without activating");
		_data_->_inner_error_ = _data_->_tmp3_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp4_ = fso_gsm_theModem;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = fso_gsm_modem_createAtCommand (_data_->_tmp4_, FSO_GSM_TYPE_PLUS_CHLD, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CHLD");
	_data_->cmd = (FsoGsmPlusCHLD*) _data_->_tmp5_;
	_data_->_tmp6_ = fso_gsm_theModem;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = fso_gsm_plus_chld_issue (_data_->cmd, FSO_GSM_PLUS_CHLD_ACTION_HOLD_ALL_AND_ACCEPT_WAITING_OR_HELD, 0);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = 0;
	_data_->_state_ = 1;
	fso_gsm_modem_processAtCommandAsync (_data_->_tmp6_, (FsoGsmAtCommand*) _data_->cmd, _data_->_tmp8_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_hold_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp6_, _data_->_res_, &_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp11__length1 = _data_->_tmp9_;
	_g_free0 (_data_->_tmp8_);
	_data_->response = _data_->_tmp11_;
	_data_->response_length1 = _data_->_tmp11__length1;
	_data_->_response_size_ = _data_->response_length1;
	fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->cmd, _data_->response, _data_->response_length1, &_data_->_inner_error_);
	if (_data_->_inner_error_ != NULL) {
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_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;
		} else {
			_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
			_g_object_unref0 (_data_->cmd);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->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;
}


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


static void fso_gsm_generic_at_call_handler_real_release (FsoGsmAbstractCallHandler* base, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	FsoGsmGenericAtCallHandlerReleaseData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	gint _tmp1_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (FsoGsmGenericAtCallHandlerReleaseData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_release);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_release_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_data_->id = _tmp1_;
	fso_gsm_generic_at_call_handler_real_release_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_release_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	FsoGsmGenericAtCallHandlerReleaseData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_release_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandlerReleaseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_release_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_release_co (FsoGsmGenericAtCallHandlerReleaseData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = _data_->id;
	if (_data_->_tmp1_ < 1) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp2_ = _data_->id;
		_data_->_tmp0_ = ((guint) _data_->_tmp2_) > FSO_GSM_CONSTANTS_CALL_INDEX_MAX;
	}
	_data_->_tmp3_ = _data_->_tmp0_;
	if (_data_->_tmp3_) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = g_strdup_printf ("Call index needs to be within [ 1, %d ]", (gint) FSO_GSM_CONSTANTS_CALL_INDEX_MAX);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INVALID_PARAMETER, _data_->_tmp5_);
		_data_->_tmp7_ = _data_->_tmp6_;
		_g_free0 (_data_->_tmp5_);
		_data_->_inner_error_ = _data_->_tmp7_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp8_ = _data_->self->calls;
	_data_->_tmp8__length1 = _data_->self->calls_length1;
	_data_->_tmp9_ = _data_->id;
	_data_->_tmp10_ = _data_->_tmp8_[_data_->_tmp9_];
	_data_->_tmp11_ = _data_->_tmp10_->detail;
	_data_->_tmp12_ = _data_->_tmp11_.status;
	if (_data_->_tmp12_ == FREE_SMARTPHONE_GSM_CALL_STATUS_RELEASE) {
		_data_->_tmp13_ = g_error_new_literal (FREE_SMARTPHONE_GSM_ERROR, FREE_SMARTPHONE_GSM_ERROR_CALL_NOT_FOUND, "No suitable call to release found");
		_data_->_inner_error_ = _data_->_tmp13_;
		if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp14_ = _data_->self->calls;
	_data_->_tmp14__length1 = _data_->self->calls_length1;
	_data_->_tmp15_ = _data_->id;
	_data_->_tmp16_ = _data_->_tmp14_[_data_->_tmp15_];
	_data_->_tmp17_ = _data_->_tmp16_->detail;
	_data_->_tmp18_ = _data_->_tmp17_.status;
	if (_data_->_tmp18_ == FREE_SMARTPHONE_GSM_CALL_STATUS_OUTGOING) {
		_data_->_tmp19_ = _data_->id;
		_data_->_state_ = 1;
		fso_gsm_abstract_call_handler_cancelOutgoingWithId ((FsoGsmAbstractCallHandler*) _data_->self, _data_->_tmp19_, fso_gsm_generic_at_call_handler_release_ready, _data_);
		return FALSE;
		_state_1:
		fso_gsm_abstract_call_handler_cancelOutgoingWithId_finish ((FsoGsmAbstractCallHandler*) _data_->self, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			} else {
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp21_ = 0;
	_data_->_tmp21_ = fso_gsm_generic_at_call_handler_numberOfCallsWithStatus (_data_->self, FREE_SMARTPHONE_GSM_CALL_STATUS_INCOMING);
	if (_data_->_tmp21_ == 1) {
		_data_->_tmp22_ = _data_->self->calls;
		_data_->_tmp22__length1 = _data_->self->calls_length1;
		_data_->_tmp23_ = _data_->id;
		_data_->_tmp24_ = _data_->_tmp22_[_data_->_tmp23_];
		_data_->_tmp25_ = _data_->_tmp24_->detail;
		_data_->_tmp26_ = _data_->_tmp25_.status;
		_data_->_tmp20_ = _data_->_tmp26_ == FREE_SMARTPHONE_GSM_CALL_STATUS_INCOMING;
	} else {
		_data_->_tmp20_ = FALSE;
	}
	_data_->_tmp27_ = _data_->_tmp20_;
	if (_data_->_tmp27_) {
		_data_->_tmp28_ = _data_->id;
		_data_->_state_ = 2;
		fso_gsm_abstract_call_handler_rejectIncomingWithId ((FsoGsmAbstractCallHandler*) _data_->self, _data_->_tmp28_, fso_gsm_generic_at_call_handler_release_ready, _data_);
		return FALSE;
		_state_2:
		fso_gsm_abstract_call_handler_rejectIncomingWithId_finish ((FsoGsmAbstractCallHandler*) _data_->self, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			} else {
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp29_ = fso_gsm_theModem;
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = fso_gsm_modem_createAtCommand (_data_->_tmp29_, FSO_GSM_TYPE_PLUS_CHLD, (GBoxedCopyFunc) g_object_ref, g_object_unref, "+CHLD");
		_data_->cmd = (FsoGsmPlusCHLD*) _data_->_tmp30_;
		_data_->_tmp31_ = fso_gsm_theModem;
		_data_->_tmp32_ = _data_->cmd;
		_data_->_tmp33_ = _data_->cmd;
		_data_->_tmp34_ = _data_->id;
		_data_->_tmp35_ = NULL;
		_data_->_tmp35_ = fso_gsm_plus_chld_issue (_data_->_tmp33_, FSO_GSM_PLUS_CHLD_ACTION_DROP_SPECIFIC_AND_ACCEPT_WAITING_OR_HELD, _data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp37_ = 0;
		_data_->_state_ = 3;
		fso_gsm_modem_processAtCommandAsync (_data_->_tmp31_, (FsoGsmAtCommand*) _data_->_tmp32_, _data_->_tmp36_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_release_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp38_ = NULL;
		_data_->_tmp38_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp31_, _data_->_res_, &_data_->_tmp37_);
		_data_->_tmp39_ = _data_->_tmp38_;
		_data_->_tmp39__length1 = _data_->_tmp37_;
		_g_free0 (_data_->_tmp36_);
		_data_->response = _data_->_tmp39_;
		_data_->response_length1 = _data_->_tmp39__length1;
		_data_->_response_size_ = _data_->response_length1;
		_data_->_tmp40_ = _data_->cmd;
		_data_->_tmp41_ = _data_->response;
		_data_->_tmp41__length1 = _data_->response_length1;
		fso_gsm_checkResponseOk ((FsoGsmAtCommand*) _data_->_tmp40_, _data_->_tmp41_, _data_->_tmp41__length1, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_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;
			} else {
				_data_->response = (_vala_array_free (_data_->response, _data_->response_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (_data_->cmd);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
				g_clear_error (&_data_->_inner_error_);
				return FALSE;
			}
		}
		_data_->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;
}


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


static void fso_gsm_generic_at_call_handler_real_releaseAll (FsoGsmAbstractCallHandler* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FsoGsmGenericAtCallHandler * self;
	fso_gsm_generic_at_call_handler_releaseAllData* _data_;
	FsoGsmGenericAtCallHandler* _tmp0_;
	self = (FsoGsmGenericAtCallHandler*) base;
	_data_ = g_slice_new0 (fso_gsm_generic_at_call_handler_releaseAllData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, fso_gsm_generic_at_call_handler_real_releaseAll);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, fso_gsm_generic_at_call_handler_real_releaseAll_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	fso_gsm_generic_at_call_handler_real_releaseAll_co (_data_);
}


static void fso_gsm_generic_at_call_handler_real_releaseAll_finish (FsoGsmAbstractCallHandler* base, GAsyncResult* _res_, GError** error) {
	fso_gsm_generic_at_call_handler_releaseAllData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void fso_gsm_generic_at_call_handler_releaseAll_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	fso_gsm_generic_at_call_handler_releaseAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	fso_gsm_generic_at_call_handler_real_releaseAll_co (_data_);
}


static gboolean fso_gsm_generic_at_call_handler_real_releaseAll_co (fso_gsm_generic_at_call_handler_releaseAllData* _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_ = NULL;
	_data_->_tmp1_ = fso_gsm_modem_createAtCommand (_data_->_tmp0_, FSO_GSM_TYPE_V250_H, (GBoxedCopyFunc) g_object_ref, g_object_unref, "H");
	_data_->cmd = (FsoGsmV250H*) _data_->_tmp1_;
	_data_->_tmp2_ = fso_gsm_theModem;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = fso_gsm_v250ter_command_execute ((FsoGsmV250terCommand*) _data_->cmd);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = 0;
	_data_->_state_ = 1;
	fso_gsm_modem_processAtCommandAsync (_data_->_tmp2_, (FsoGsmAtCommand*) _data_->cmd, _data_->_tmp4_, FSO_GSM_MODEM_DEFAULT_RETRIES, fso_gsm_generic_at_call_handler_releaseAll_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = fso_gsm_modem_processAtCommandAsync_finish (_data_->_tmp2_, _data_->_res_, &_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp7__length1 = _data_->_tmp5_;
	_data_->_tmp7_ = (_vala_array_free (_data_->_tmp7_, _data_->_tmp7__length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->_tmp4_);
	_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;
}


FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_construct (GType object_type) {
	FsoGsmGenericAtCallHandler * self = NULL;
	self = (FsoGsmGenericAtCallHandler*) fso_gsm_abstract_call_handler_construct (object_type);
	return self;
}


FsoGsmGenericAtCallHandler* fso_gsm_generic_at_call_handler_new (void) {
	return fso_gsm_generic_at_call_handler_construct (FSO_GSM_TYPE_GENERIC_AT_CALL_HANDLER);
}


static GObject * fso_gsm_generic_at_call_handler_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FsoGsmGenericAtCallHandler * self;
	FsoGsmCall** _tmp0_ = NULL;
	parent_class = G_OBJECT_CLASS (fso_gsm_generic_at_call_handler_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = FSO_GSM_GENERIC_AT_CALL_HANDLER (obj);
	_tmp0_ = g_new0 (FsoGsmCall*, (FSO_GSM_CONSTANTS_CALL_INDEX_MAX + 1) + 1);
	self->calls = (_vala_array_free (self->calls, self->calls_length1, (GDestroyNotify) fso_gsm_call_unref), NULL);
	self->calls = _tmp0_;
	self->calls_length1 = FSO_GSM_CONSTANTS_CALL_INDEX_MAX + 1;
	{
		gint i;
		i = FSO_GSM_CONSTANTS_CALL_INDEX_MIN;
		{
			gboolean _tmp1_;
			_tmp1_ = TRUE;
			while (TRUE) {
				gboolean _tmp2_;
				gint _tmp4_;
				FsoGsmCall** _tmp5_;
				gint _tmp5__length1;
				gint _tmp6_;
				gint _tmp7_;
				FsoGsmCall* _tmp8_;
				FsoGsmCall* _tmp9_;
				_tmp2_ = _tmp1_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp4_ = i;
				if (!(((guint) _tmp4_) != FSO_GSM_CONSTANTS_CALL_INDEX_MAX)) {
					break;
				}
				_tmp5_ = self->calls;
				_tmp5__length1 = self->calls_length1;
				_tmp6_ = i;
				_tmp7_ = i;
				_tmp8_ = fso_gsm_call_new_newFromId (_tmp7_);
				_fso_gsm_call_unref0 (_tmp5_[_tmp6_]);
				_tmp5_[_tmp6_] = _tmp8_;
				_tmp9_ = _tmp5_[_tmp6_];
			}
		}
	}
	return obj;
}


static void fso_gsm_generic_at_call_handler_class_init (FsoGsmGenericAtCallHandlerClass * klass) {
	fso_gsm_generic_at_call_handler_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoGsmGenericAtCallHandlerPrivate));
	FSO_FRAMEWORK_ABSTRACT_OBJECT_CLASS (klass)->repr = fso_gsm_generic_at_call_handler_real_repr;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->cancelOutgoingWithId = fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->cancelOutgoingWithId_finish = fso_gsm_generic_at_call_handler_real_cancelOutgoingWithId_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->rejectIncomingWithId = fso_gsm_generic_at_call_handler_real_rejectIncomingWithId;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->rejectIncomingWithId_finish = fso_gsm_generic_at_call_handler_real_rejectIncomingWithId_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->startTimeoutIfNecessary = fso_gsm_generic_at_call_handler_real_startTimeoutIfNecessary;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->addSupplementaryInformation = fso_gsm_generic_at_call_handler_real_addSupplementaryInformation;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->activate = fso_gsm_generic_at_call_handler_real_activate;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->activate_finish = fso_gsm_generic_at_call_handler_real_activate_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->initiate = fso_gsm_generic_at_call_handler_real_initiate;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->initiate_finish = fso_gsm_generic_at_call_handler_real_initiate_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->hold = fso_gsm_generic_at_call_handler_real_hold;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->hold_finish = fso_gsm_generic_at_call_handler_real_hold_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->release = fso_gsm_generic_at_call_handler_real_release;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->release_finish = fso_gsm_generic_at_call_handler_real_release_finish;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->releaseAll = fso_gsm_generic_at_call_handler_real_releaseAll;
	FSO_GSM_ABSTRACT_CALL_HANDLER_CLASS (klass)->releaseAll_finish = fso_gsm_generic_at_call_handler_real_releaseAll_finish;
	G_OBJECT_CLASS (klass)->constructor = fso_gsm_generic_at_call_handler_constructor;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_generic_at_call_handler_finalize;
}


static void fso_gsm_generic_at_call_handler_instance_init (FsoGsmGenericAtCallHandler * self) {
	self->priv = FSO_GSM_GENERIC_AT_CALL_HANDLER_GET_PRIVATE (self);
}


static void fso_gsm_generic_at_call_handler_finalize (GObject* obj) {
	FsoGsmGenericAtCallHandler * self;
	self = FSO_GSM_GENERIC_AT_CALL_HANDLER (obj);
	self->calls = (_vala_array_free (self->calls, self->calls_length1, (GDestroyNotify) fso_gsm_call_unref), NULL);
	_fso_framework_pair_unref0 (self->supplementary);
	G_OBJECT_CLASS (fso_gsm_generic_at_call_handler_parent_class)->finalize (obj);
}


/**
 * @class FsoGsm.GenericAtCallHandler
 */
GType fso_gsm_generic_at_call_handler_get_type (void) {
	static volatile gsize fso_gsm_generic_at_call_handler_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_generic_at_call_handler_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmGenericAtCallHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_generic_at_call_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmGenericAtCallHandler), 0, (GInstanceInitFunc) fso_gsm_generic_at_call_handler_instance_init, NULL };
		GType fso_gsm_generic_at_call_handler_type_id;
		fso_gsm_generic_at_call_handler_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_CALL_HANDLER, "FsoGsmGenericAtCallHandler", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_generic_at_call_handler_type_id__volatile, fso_gsm_generic_at_call_handler_type_id);
	}
	return fso_gsm_generic_at_call_handler_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);
}



