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


#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_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;
typedef struct _FsoGsmAbstractAtCommandPrivate FsoGsmAbstractAtCommandPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_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_MODEM_TYPE_DATA (fso_gsm_modem_data_get_type ())
#define FSO_GSM_MODEM_DATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemData))
#define FSO_GSM_MODEM_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemDataClass))
#define FSO_GSM_MODEM_IS_DATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_MODEM_TYPE_DATA))
#define FSO_GSM_MODEM_IS_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_MODEM_TYPE_DATA))
#define FSO_GSM_MODEM_DATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_MODEM_TYPE_DATA, FsoGsmModemDataClass))

typedef struct _FsoGsmModemData FsoGsmModemData;
typedef struct _FsoGsmModemDataClass FsoGsmModemDataClass;

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

typedef struct _FsoGsmCallHandler FsoGsmCallHandler;
typedef struct _FsoGsmCallHandlerIface FsoGsmCallHandlerIface;

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

typedef struct _FsoGsmCallInfo FsoGsmCallInfo;
typedef struct _FsoGsmCallInfoClass FsoGsmCallInfoClass;

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

typedef struct _FsoGsmSmsHandler FsoGsmSmsHandler;
typedef struct _FsoGsmSmsHandlerIface FsoGsmSmsHandlerIface;

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

typedef struct _WrapHexPdu WrapHexPdu;
typedef struct _WrapHexPduClass WrapHexPduClass;

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

typedef struct _FsoGsmISmsStorage FsoGsmISmsStorage;
typedef struct _FsoGsmISmsStorageIface FsoGsmISmsStorageIface;

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

typedef struct _FsoGsmPhonebookHandler FsoGsmPhonebookHandler;
typedef struct _FsoGsmPhonebookHandlerIface FsoGsmPhonebookHandlerIface;

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

typedef struct _FsoGsmPhonebookStorage FsoGsmPhonebookStorage;
typedef struct _FsoGsmPhonebookStorageClass FsoGsmPhonebookStorageClass;

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

typedef struct _FsoGsmWatchDog FsoGsmWatchDog;
typedef struct _FsoGsmWatchDogIface FsoGsmWatchDogIface;

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

typedef struct _FsoGsmIPdpHandler FsoGsmIPdpHandler;
typedef struct _FsoGsmIPdpHandlerIface FsoGsmIPdpHandlerIface;

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

typedef struct _FsoGsmRouteInfo FsoGsmRouteInfo;
typedef struct _FsoGsmRouteInfoClass FsoGsmRouteInfoClass;
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 _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#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;
typedef struct _FsoGsmV250terCommandPrivate FsoGsmV250terCommandPrivate;

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

typedef struct _FsoGsmSimpleAtCommand FsoGsmSimpleAtCommand;
typedef struct _FsoGsmSimpleAtCommandClass FsoGsmSimpleAtCommandClass;
typedef struct _FsoGsmSimpleAtCommandPrivate FsoGsmSimpleAtCommandPrivate;

#define FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND (fso_gsm_two_params_at_command_get_type ())
#define FSO_GSM_TWO_PARAMS_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND, FsoGsmTwoParamsAtCommand))
#define FSO_GSM_TWO_PARAMS_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND, FsoGsmTwoParamsAtCommandClass))
#define FSO_GSM_IS_TWO_PARAMS_AT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND))
#define FSO_GSM_IS_TWO_PARAMS_AT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND))
#define FSO_GSM_TWO_PARAMS_AT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND, FsoGsmTwoParamsAtCommandClass))

typedef struct _FsoGsmTwoParamsAtCommand FsoGsmTwoParamsAtCommand;
typedef struct _FsoGsmTwoParamsAtCommandClass FsoGsmTwoParamsAtCommandClass;
typedef struct _FsoGsmTwoParamsAtCommandPrivate FsoGsmTwoParamsAtCommandPrivate;

#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;
typedef struct _FsoGsmCustomAtCommandPrivate FsoGsmCustomAtCommandPrivate;

/**
 * AT Command Interface and Abstract Base Class.
 *
 * The AtCommand class encapsulate generation and parsing of every kind of AT
 * command strings. To generate a command, use issue() or query(). The response
 * is to be fed into the parse() method. At commands are parsed using regular
 * expressions. The resulting fields are then picked into member variables.
 **/
typedef enum  {
	FSO_GSM_AT_COMMAND_ERROR_UNABLE_TO_PARSE
} FsoGsmAtCommandError;
#define FSO_GSM_AT_COMMAND_ERROR fso_gsm_at_command_error_quark ()
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_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 _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 _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 _FsoGsmCallHandlerIface {
	GTypeInterface parent_iface;
	void (*handleIncomingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleConnectingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*handleEndingCall) (FsoGsmCallHandler* self, FsoGsmCallInfo* call_info);
	void (*addSupplementaryInformation) (FsoGsmCallHandler* self, const gchar* direction, const gchar* info);
	void (*activate) (FsoGsmCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*activate_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*initiate) (FsoGsmCallHandler* self, const gchar* number, const gchar* ctype, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gint (*initiate_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*hold) (FsoGsmCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*hold_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*release) (FsoGsmCallHandler* self, gint id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*release_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
	void (*releaseAll) (FsoGsmCallHandler* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*releaseAll_finish) (FsoGsmCallHandler* self, GAsyncResult* _res_, GError** error);
};

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

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

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

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

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

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

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

struct _FsoGsmModemDataClass {
	GObjectClass parent_class;
};

struct _FsoGsmV250terCommand {
	FsoGsmAbstractAtCommand parent_instance;
	FsoGsmV250terCommandPrivate * priv;
	gchar* name;
};

struct _FsoGsmV250terCommandClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _FsoGsmSimpleAtCommand {
	FsoGsmAbstractAtCommand parent_instance;
	FsoGsmSimpleAtCommandPrivate * priv;
	gpointer value;
	gchar* righthandside;
	gint min;
	gint max;
};

struct _FsoGsmSimpleAtCommandClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _FsoGsmSimpleAtCommandPrivate {
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	gchar* name;
};

struct _FsoGsmTwoParamsAtCommand {
	FsoGsmAbstractAtCommand parent_instance;
	FsoGsmTwoParamsAtCommandPrivate * priv;
	gpointer value1;
	gpointer value2;
};

struct _FsoGsmTwoParamsAtCommandClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _FsoGsmTwoParamsAtCommandPrivate {
	GType t1_type;
	GBoxedCopyFunc t1_dup_func;
	GDestroyNotify t1_destroy_func;
	GType t2_type;
	GBoxedCopyFunc t2_dup_func;
	GDestroyNotify t2_destroy_func;
	gchar* name;
};

struct _FsoGsmCustomAtCommand {
	FsoGsmAbstractAtCommand parent_instance;
	FsoGsmCustomAtCommandPrivate * priv;
	gchar* name;
};

struct _FsoGsmCustomAtCommandClass {
	FsoGsmAbstractAtCommandClass parent_class;
	gchar* (*execute) (FsoGsmCustomAtCommand* self);
	gchar* (*query) (FsoGsmCustomAtCommand* self);
	gchar* (*test) (FsoGsmCustomAtCommand* self);
};


static gpointer fso_gsm_abstract_at_command_parent_class = NULL;
extern FsoGsmModem* fso_gsm_theModem;
static FsoGsmAtCommandQueueCommandIface* fso_gsm_abstract_at_command_fso_gsm_at_command_queue_command_parent_iface = NULL;
static FsoGsmAtCommandIface* fso_gsm_abstract_at_command_fso_gsm_at_command_parent_iface = NULL;
static gpointer fso_gsm_v250ter_command_parent_class = NULL;
static gpointer fso_gsm_simple_at_command_parent_class = NULL;
static gpointer fso_gsm_two_params_at_command_parent_class = NULL;
static gpointer fso_gsm_custom_at_command_parent_class = NULL;

#define FSO_GSM_DEFAULT_COMMAND_TIMEOUT ((guint) 5)
#define FSO_GSM_DEFAULT_COMMAND_RETRY ((guint) 3)
GQuark fso_gsm_at_command_error_quark (void);
GType fso_gsm_at_command_queue_command_get_type (void) G_GNUC_CONST;
GType fso_gsm_constants_at_response_get_type (void) G_GNUC_CONST;
GType fso_gsm_at_command_get_type (void) G_GNUC_CONST;
guint fso_gsm_at_command_get_timeout (FsoGsmAtCommand* self);
guint fso_gsm_at_command_get_retry (FsoGsmAtCommand* self);
gchar* fso_gsm_at_command_get_prefix (FsoGsmAtCommand* self);
gchar* fso_gsm_at_command_get_postfix (FsoGsmAtCommand* self);
gboolean fso_gsm_at_command_is_valid_prefix (FsoGsmAtCommand* self, const gchar* line);
void fso_gsm_at_command_parse (FsoGsmAtCommand* self, const gchar* response, GError** error);
void fso_gsm_at_command_parseMulti (FsoGsmAtCommand* self, gchar** response, int response_length1, GError** error);
void fso_gsm_at_command_parseTest (FsoGsmAtCommand* self, const gchar* response, GError** error);
gchar* fso_gsm_at_command_encodeString (FsoGsmAtCommand* self, const gchar* str);
gchar* fso_gsm_at_command_decodeString (FsoGsmAtCommand* self, const gchar* str);
FsoGsmConstantsAtResponse fso_gsm_at_command_validate (FsoGsmAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_at_command_validateTest (FsoGsmAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_at_command_validateUrc (FsoGsmAtCommand* self, const gchar* response);
FsoGsmConstantsAtResponse fso_gsm_at_command_validateUrcPdu (FsoGsmAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_at_command_validateOk (FsoGsmAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_at_command_validateMulti (FsoGsmAtCommand* self, gchar** response, int response_length1);
GType fso_gsm_abstract_at_command_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_ABSTRACT_AT_COMMAND_DUMMY_PROPERTY
};
static gchar* fso_gsm_abstract_at_command_real_encodeString (FsoGsmAtCommand* base, const gchar* str);
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_modem_data_get_type (void) G_GNUC_CONST;
GType fso_gsm_call_info_get_type (void) G_GNUC_CONST;
GType fso_gsm_call_handler_get_type (void) G_GNUC_CONST;
gpointer wrap_hex_pdu_ref (gpointer instance);
void wrap_hex_pdu_unref (gpointer instance);
GParamSpec* param_spec_wrap_hex_pdu (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_wrap_hex_pdu (GValue* value, gpointer v_object);
void value_take_wrap_hex_pdu (GValue* value, gpointer v_object);
gpointer value_get_wrap_hex_pdu (const GValue* value);
GType wrap_hex_pdu_get_type (void) G_GNUC_CONST;
GType fso_gsm_isms_storage_get_type (void) G_GNUC_CONST;
GType fso_gsm_sms_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_phonebook_storage_get_type (void) G_GNUC_CONST;
GType fso_gsm_phonebook_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_watch_dog_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_route_info_ref (gpointer instance);
void fso_gsm_route_info_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_route_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_route_info (GValue* value, gpointer v_object);
void fso_gsm_value_take_route_info (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_route_info (const GValue* value);
GType fso_gsm_route_info_get_type (void) G_GNUC_CONST;
GType fso_gsm_ipdp_handler_get_type (void) G_GNUC_CONST;
GType fso_gsm_modem_get_type (void) G_GNUC_CONST;
FsoGsmModemData* fso_gsm_modem_data (FsoGsmModem* self);
gpointer fso_gsm_phonebook_params_ref (gpointer instance);
void fso_gsm_phonebook_params_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_phonebook_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_phonebook_params (GValue* value, gpointer v_object);
void fso_gsm_value_take_phonebook_params (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_phonebook_params (const GValue* value);
GType fso_gsm_phonebook_params_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_context_params_ref (gpointer instance);
void fso_gsm_context_params_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_context_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_context_params (GValue* value, gpointer v_object);
void fso_gsm_value_take_context_params (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_context_params (const GValue* value);
GType fso_gsm_context_params_get_type (void) G_GNUC_CONST;
gpointer fso_gsm_network_time_report_ref (gpointer instance);
void fso_gsm_network_time_report_unref (gpointer instance);
GParamSpec* fso_gsm_param_spec_network_time_report (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void fso_gsm_value_set_network_time_report (GValue* value, gpointer v_object);
void fso_gsm_value_take_network_time_report (GValue* value, gpointer v_object);
gpointer fso_gsm_value_get_network_time_report (const GValue* value);
GType fso_gsm_network_time_report_get_type (void) G_GNUC_CONST;
static gchar* fso_gsm_abstract_at_command_real_decodeString (FsoGsmAtCommand* base, const gchar* str);
void fso_gsm_abstract_at_command_parse (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
static void fso_gsm_abstract_at_command_real_parse (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
void fso_gsm_abstract_at_command_parseTest (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
static void fso_gsm_abstract_at_command_real_parseTest (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error);
void fso_gsm_abstract_at_command_parseMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1, GError** error);
static void fso_gsm_abstract_at_command_real_parseMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1, GError** error);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateOk (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateOk (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validate (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validate (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateTest (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateTest (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateUrc (FsoGsmAbstractAtCommand* self, const gchar* response);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateUrc (FsoGsmAbstractAtCommand* self, const gchar* response);
FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateUrcPdu (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateUrcPdu (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1);
gchar* fso_gsm_abstract_at_command_to_string (FsoGsmAbstractAtCommand* self, const gchar* name);
gint fso_gsm_abstract_at_command_to_int (FsoGsmAbstractAtCommand* self, const gchar* name);
guint fso_gsm_abstract_at_command_get_timeout (FsoGsmAbstractAtCommand* self);
static guint fso_gsm_abstract_at_command_real_get_timeout (FsoGsmAbstractAtCommand* self);
guint fso_gsm_abstract_at_command_get_retry (FsoGsmAbstractAtCommand* self);
static guint fso_gsm_abstract_at_command_real_get_retry (FsoGsmAbstractAtCommand* self);
gchar* fso_gsm_abstract_at_command_get_prefix (FsoGsmAbstractAtCommand* self);
static gchar* fso_gsm_abstract_at_command_real_get_prefix (FsoGsmAbstractAtCommand* self);
gchar* fso_gsm_abstract_at_command_get_postfix (FsoGsmAbstractAtCommand* self);
static gchar* fso_gsm_abstract_at_command_real_get_postfix (FsoGsmAbstractAtCommand* self);
static gboolean fso_gsm_abstract_at_command_real_is_valid_prefix (FsoGsmAtCommandQueueCommand* base, const gchar* line);
FsoGsmAbstractAtCommand* fso_gsm_abstract_at_command_construct (GType object_type);
static GObject * fso_gsm_abstract_at_command_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void fso_gsm_abstract_at_command_finalize (GObject* obj);
GType fso_gsm_v250ter_command_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_V250TER_COMMAND_DUMMY_PROPERTY
};
FsoGsmV250terCommand* fso_gsm_v250ter_command_new (const gchar* name);
FsoGsmV250terCommand* fso_gsm_v250ter_command_construct (GType object_type, const gchar* name);
gchar* fso_gsm_v250ter_command_execute (FsoGsmV250terCommand* self);
static void fso_gsm_v250ter_command_finalize (GObject* obj);
GType fso_gsm_simple_at_command_get_type (void) G_GNUC_CONST;
#define FSO_GSM_SIMPLE_AT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_GSM_TYPE_SIMPLE_AT_COMMAND, FsoGsmSimpleAtCommandPrivate))
enum  {
	FSO_GSM_SIMPLE_AT_COMMAND_DUMMY_PROPERTY,
	FSO_GSM_SIMPLE_AT_COMMAND_T_TYPE,
	FSO_GSM_SIMPLE_AT_COMMAND_T_DUP_FUNC,
	FSO_GSM_SIMPLE_AT_COMMAND_T_DESTROY_FUNC
};
FsoGsmSimpleAtCommand* fso_gsm_simple_at_command_new (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* name, gboolean prefixoptional);
FsoGsmSimpleAtCommand* fso_gsm_simple_at_command_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* name, gboolean prefixoptional);
static void fso_gsm_simple_at_command_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
static void fso_gsm_simple_at_command_real_parseTest (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
gchar* fso_gsm_simple_at_command_execute (FsoGsmSimpleAtCommand* self);
gchar* fso_gsm_simple_at_command_query (FsoGsmSimpleAtCommand* self);
gchar* fso_gsm_simple_at_command_test (FsoGsmSimpleAtCommand* self);
gchar* fso_gsm_simple_at_command_issue (FsoGsmSimpleAtCommand* self, gconstpointer val);
static void fso_gsm_simple_at_command_finalize (GObject* obj);
static void _vala_fso_gsm_simple_at_command_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_fso_gsm_simple_at_command_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType fso_gsm_two_params_at_command_get_type (void) G_GNUC_CONST;
#define FSO_GSM_TWO_PARAMS_AT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND, FsoGsmTwoParamsAtCommandPrivate))
enum  {
	FSO_GSM_TWO_PARAMS_AT_COMMAND_DUMMY_PROPERTY,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_TYPE,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DUP_FUNC,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DESTROY_FUNC,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_TYPE,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DUP_FUNC,
	FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DESTROY_FUNC
};
FsoGsmTwoParamsAtCommand* fso_gsm_two_params_at_command_new (GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, const gchar* name, gboolean prefixoptional);
FsoGsmTwoParamsAtCommand* fso_gsm_two_params_at_command_construct (GType object_type, GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, const gchar* name, gboolean prefixoptional);
static void fso_gsm_two_params_at_command_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
gchar* fso_gsm_two_params_at_command_execute (FsoGsmTwoParamsAtCommand* self);
gchar* fso_gsm_two_params_at_command_query (FsoGsmTwoParamsAtCommand* self);
gchar* fso_gsm_two_params_at_command_test (FsoGsmTwoParamsAtCommand* self);
gchar* fso_gsm_two_params_at_command_issue (FsoGsmTwoParamsAtCommand* self, gconstpointer val1, gconstpointer val2);
static void fso_gsm_two_params_at_command_finalize (GObject* obj);
static void _vala_fso_gsm_two_params_at_command_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_fso_gsm_two_params_at_command_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType fso_gsm_custom_at_command_get_type (void) G_GNUC_CONST;
enum  {
	FSO_GSM_CUSTOM_AT_COMMAND_DUMMY_PROPERTY
};
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);
gchar* fso_gsm_custom_at_command_execute (FsoGsmCustomAtCommand* self);
static gchar* fso_gsm_custom_at_command_real_execute (FsoGsmCustomAtCommand* self);
gchar* fso_gsm_custom_at_command_query (FsoGsmCustomAtCommand* self);
static gchar* fso_gsm_custom_at_command_real_query (FsoGsmCustomAtCommand* self);
gchar* fso_gsm_custom_at_command_test (FsoGsmCustomAtCommand* self);
static gchar* fso_gsm_custom_at_command_real_test (FsoGsmCustomAtCommand* self);
static void fso_gsm_custom_at_command_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 _vala_array_length (gpointer array);


GQuark fso_gsm_at_command_error_quark (void) {
	return g_quark_from_static_string ("fso_gsm_at_command_error-quark");
}


guint fso_gsm_at_command_get_timeout (FsoGsmAtCommand* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->get_timeout (self);
}


guint fso_gsm_at_command_get_retry (FsoGsmAtCommand* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->get_retry (self);
}


gchar* fso_gsm_at_command_get_prefix (FsoGsmAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->get_prefix (self);
}


gchar* fso_gsm_at_command_get_postfix (FsoGsmAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->get_postfix (self);
}


gboolean fso_gsm_at_command_is_valid_prefix (FsoGsmAtCommand* self, const gchar* line) {
	g_return_val_if_fail (self != NULL, FALSE);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->is_valid_prefix (self, line);
}


void fso_gsm_at_command_parse (FsoGsmAtCommand* self, const gchar* response, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->parse (self, response, error);
}


void fso_gsm_at_command_parseMulti (FsoGsmAtCommand* self, gchar** response, int response_length1, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->parseMulti (self, response, response_length1, error);
}


void fso_gsm_at_command_parseTest (FsoGsmAtCommand* self, const gchar* response, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->parseTest (self, response, error);
}


gchar* fso_gsm_at_command_encodeString (FsoGsmAtCommand* self, const gchar* str) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->encodeString (self, str);
}


gchar* fso_gsm_at_command_decodeString (FsoGsmAtCommand* self, const gchar* str) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->decodeString (self, str);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validate (FsoGsmAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validate (self, response, response_length1);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validateTest (FsoGsmAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validateTest (self, response, response_length1);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validateUrc (FsoGsmAtCommand* self, const gchar* response) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validateUrc (self, response);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validateUrcPdu (FsoGsmAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validateUrcPdu (self, response, response_length1);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validateOk (FsoGsmAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validateOk (self, response, response_length1);
}


FsoGsmConstantsAtResponse fso_gsm_at_command_validateMulti (FsoGsmAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_AT_COMMAND_GET_INTERFACE (self)->validateMulti (self, response, response_length1);
}


static void fso_gsm_at_command_base_init (FsoGsmAtCommandIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


GType fso_gsm_at_command_get_type (void) {
	static volatile gsize fso_gsm_at_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_at_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAtCommandIface), (GBaseInitFunc) fso_gsm_at_command_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType fso_gsm_at_command_type_id;
		fso_gsm_at_command_type_id = g_type_register_static (G_TYPE_INTERFACE, "FsoGsmAtCommand", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (fso_gsm_at_command_type_id, G_TYPE_OBJECT);
		g_type_interface_add_prerequisite (fso_gsm_at_command_type_id, FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND);
		g_once_init_leave (&fso_gsm_at_command_type_id__volatile, fso_gsm_at_command_type_id);
	}
	return fso_gsm_at_command_type_id__volatile;
}


static gchar* fso_gsm_abstract_at_command_real_encodeString (FsoGsmAtCommand* base, const gchar* str) {
	FsoGsmAbstractAtCommand * self;
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gboolean _tmp3_;
	FsoGsmModem* _tmp5_;
	FsoGsmModemData* _tmp6_ = NULL;
	FsoGsmModemData* data;
	FsoGsmModemData* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GQuark _tmp11_ = 0U;
	static GQuark _tmp10_label0 = 0;
	static GQuark _tmp10_label1 = 0;
	self = (FsoGsmAbstractAtCommand*) base;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp1_ = str;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp2_;
		_tmp2_ = str;
		_tmp0_ = g_strcmp0 (_tmp2_, "") == 0;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("");
		result = _tmp4_;
		return result;
	}
	_tmp5_ = fso_gsm_theModem;
	_tmp6_ = fso_gsm_modem_data (_tmp5_);
	data = _tmp6_;
	_tmp7_ = data;
	_tmp8_ = _tmp7_->charset;
	_tmp9_ = _tmp8_;
	_tmp11_ = (NULL == _tmp9_) ? 0 : g_quark_from_string (_tmp9_);
	if (_tmp11_ == ((0 != _tmp10_label0) ? _tmp10_label0 : (_tmp10_label0 = g_quark_from_static_string ("UCS2")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp12_;
				gchar* _tmp13_ = NULL;
				gchar* res;
				const gchar* _tmp14_ = NULL;
				const gchar* _tmp15_;
				const gchar* _tmp17_;
				gchar* _tmp18_;
				_tmp12_ = str;
				_tmp13_ = utf8_to_ucs2 (_tmp12_);
				res = _tmp13_;
				_tmp15_ = res;
				if (_tmp15_ != NULL) {
					const gchar* _tmp16_;
					_tmp16_ = res;
					_tmp14_ = _tmp16_;
				} else {
					_tmp14_ = "";
				}
				_tmp17_ = _tmp14_;
				_tmp18_ = g_strdup (_tmp17_);
				result = _tmp18_;
				_g_free0 (res);
				_g_object_unref0 (data);
				return result;
			}
		}
	} else if (_tmp11_ == ((0 != _tmp10_label1) ? _tmp10_label1 : (_tmp10_label1 = g_quark_from_static_string ("HEX")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp19_;
				gchar* _tmp20_ = NULL;
				gchar* res;
				const gchar* _tmp21_ = NULL;
				const gchar* _tmp22_;
				const gchar* _tmp24_;
				gchar* _tmp25_;
				_tmp19_ = str;
				_tmp20_ = utf8_to_gsm (_tmp19_);
				res = _tmp20_;
				_tmp22_ = res;
				if (_tmp22_ != NULL) {
					const gchar* _tmp23_;
					_tmp23_ = res;
					_tmp21_ = _tmp23_;
				} else {
					_tmp21_ = "";
				}
				_tmp24_ = _tmp21_;
				_tmp25_ = g_strdup (_tmp24_);
				result = _tmp25_;
				_g_free0 (res);
				_g_object_unref0 (data);
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp26_;
				gchar* _tmp27_;
				_tmp26_ = str;
				_tmp27_ = g_strdup (_tmp26_);
				result = _tmp27_;
				_g_object_unref0 (data);
				return result;
			}
		}
	}
	_g_object_unref0 (data);
}


static gchar* fso_gsm_abstract_at_command_real_decodeString (FsoGsmAtCommand* base, const gchar* str) {
	FsoGsmAbstractAtCommand * self;
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	FsoGsmModem* _tmp6_;
	FsoGsmModemData* _tmp7_ = NULL;
	FsoGsmModemData* data;
	FsoGsmModemData* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GQuark _tmp12_ = 0U;
	static GQuark _tmp11_label0 = 0;
	static GQuark _tmp11_label1 = 0;
	self = (FsoGsmAbstractAtCommand*) base;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = str;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = str;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == 0) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup ("");
		result = _tmp5_;
		return result;
	}
	_tmp6_ = fso_gsm_theModem;
	_tmp7_ = fso_gsm_modem_data (_tmp6_);
	data = _tmp7_;
	_tmp8_ = data;
	_tmp9_ = _tmp8_->charset;
	_tmp10_ = _tmp9_;
	_tmp12_ = (NULL == _tmp10_) ? 0 : g_quark_from_string (_tmp10_);
	if (_tmp12_ == ((0 != _tmp11_label0) ? _tmp11_label0 : (_tmp11_label0 = g_quark_from_static_string ("UCS2")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp13_;
				gchar* _tmp14_ = NULL;
				gchar* res;
				const gchar* _tmp15_ = NULL;
				const gchar* _tmp16_;
				const gchar* _tmp18_;
				gchar* _tmp19_;
				_tmp13_ = str;
				_tmp14_ = ucs2_to_utf8 (_tmp13_);
				res = _tmp14_;
				_tmp16_ = res;
				if (_tmp16_ != NULL) {
					const gchar* _tmp17_;
					_tmp17_ = res;
					_tmp15_ = _tmp17_;
				} else {
					_tmp15_ = "";
				}
				_tmp18_ = _tmp15_;
				_tmp19_ = g_strdup (_tmp18_);
				result = _tmp19_;
				_g_free0 (res);
				_g_object_unref0 (data);
				return result;
			}
		}
	} else if (_tmp12_ == ((0 != _tmp11_label1) ? _tmp11_label1 : (_tmp11_label1 = g_quark_from_static_string ("HEX")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp20_;
				gchar* _tmp21_ = NULL;
				gchar* res;
				const gchar* _tmp22_ = NULL;
				const gchar* _tmp23_;
				const gchar* _tmp25_;
				gchar* _tmp26_;
				_tmp20_ = str;
				_tmp21_ = gsm_to_utf8 (_tmp20_);
				res = _tmp21_;
				_tmp23_ = res;
				if (_tmp23_ != NULL) {
					const gchar* _tmp24_;
					_tmp24_ = res;
					_tmp22_ = _tmp24_;
				} else {
					_tmp22_ = "";
				}
				_tmp25_ = _tmp22_;
				_tmp26_ = g_strdup (_tmp25_);
				result = _tmp26_;
				_g_free0 (res);
				_g_object_unref0 (data);
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp27_;
				gchar* _tmp28_;
				_tmp27_ = str;
				_tmp28_ = g_strdup (_tmp27_);
				result = _tmp28_;
				_g_object_unref0 (data);
				return result;
			}
		}
	}
	_g_object_unref0 (data);
}


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


static void fso_gsm_abstract_at_command_real_parse (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error) {
	gboolean match = FALSE;
	GRegex* _tmp0_;
	const gchar* _tmp1_;
	GMatchInfo* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	gboolean _tmp7_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (response != NULL);
	_tmp0_ = self->re;
	_tmp1_ = response;
	_tmp3_ = g_regex_match (_tmp0_, _tmp1_, 0, &_tmp2_);
	_g_match_info_free0 (self->mi);
	self->mi = _tmp2_;
	match = _tmp3_;
	_tmp5_ = match;
	if (!_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		GMatchInfo* _tmp6_;
		_tmp6_ = self->mi;
		_tmp4_ = _tmp6_ == NULL;
	}
	_tmp7_ = _tmp4_;
	if (_tmp7_) {
		const gchar* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GRegex* _tmp10_;
		const gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		GError* _tmp15_;
		GError* _tmp16_;
		_tmp8_ = response;
		_tmp9_ = string_to_string (_tmp8_);
		_tmp10_ = self->re;
		_tmp11_ = g_regex_get_pattern (_tmp10_);
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat ("Parsing error: '", _tmp9_, "' does not match '", _tmp12_, "'", NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_error_new_literal (FSO_GSM_AT_COMMAND_ERROR, FSO_GSM_AT_COMMAND_ERROR_UNABLE_TO_PARSE, _tmp14_);
		_tmp16_ = _tmp15_;
		_g_free0 (_tmp14_);
		_inner_error_ = _tmp16_;
		if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void fso_gsm_abstract_at_command_parse (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->parse (self, response, error);
}


static void fso_gsm_abstract_at_command_real_parseTest (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error) {
	gboolean match = FALSE;
	GRegex* _tmp0_;
	const gchar* _tmp1_;
	GMatchInfo* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	gboolean _tmp7_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (response != NULL);
	_tmp0_ = self->tere;
	_tmp1_ = response;
	_tmp3_ = g_regex_match (_tmp0_, _tmp1_, 0, &_tmp2_);
	_g_match_info_free0 (self->mi);
	self->mi = _tmp2_;
	match = _tmp3_;
	_tmp5_ = match;
	if (!_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		GMatchInfo* _tmp6_;
		_tmp6_ = self->mi;
		_tmp4_ = _tmp6_ == NULL;
	}
	_tmp7_ = _tmp4_;
	if (_tmp7_) {
		const gchar* _tmp8_;
		const gchar* _tmp9_ = NULL;
		GRegex* _tmp10_;
		const gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		GError* _tmp15_;
		GError* _tmp16_;
		_tmp8_ = response;
		_tmp9_ = string_to_string (_tmp8_);
		_tmp10_ = self->tere;
		_tmp11_ = g_regex_get_pattern (_tmp10_);
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat ("Parsing error: '", _tmp9_, "' does not match '", _tmp12_, "'", NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_error_new_literal (FSO_GSM_AT_COMMAND_ERROR, FSO_GSM_AT_COMMAND_ERROR_UNABLE_TO_PARSE, _tmp14_);
		_tmp16_ = _tmp15_;
		_g_free0 (_tmp14_);
		_inner_error_ = _tmp16_;
		if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void fso_gsm_abstract_at_command_parseTest (FsoGsmAbstractAtCommand* self, const gchar* response, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->parseTest (self, response, error);
}


static void fso_gsm_abstract_at_command_real_parseMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1, GError** error) {
	g_assert_not_reached ();
}


void fso_gsm_abstract_at_command_parseMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1, GError** error) {
	g_return_if_fail (self != NULL);
	FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->parseMulti (self, response, response_length1, error);
}


/**
     * Validate the terminal response for this At command
     *
     * Does NOT parse!
     **/
static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = needle;
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
	result = _tmp1_ != NULL;
	return result;
}


static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateOk (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	FsoGsmConstantsAtResponse result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* statusline;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	FsoGsmModem* _tmp6_;
	FsoFrameworkLogger* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_ = NULL;
	GType _tmp10_ = 0UL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_;
	gboolean _tmp15_ = FALSE;
	gint errorcode;
	const gchar* _tmp16_;
	gboolean _tmp17_ = FALSE;
	const gchar* _tmp18_;
	gboolean _tmp19_ = FALSE;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	_tmp1_ = response;
	_tmp1__length1 = response_length1;
	_tmp2_ = _tmp0_[_tmp1__length1 - 1];
	_tmp3_ = g_strdup (_tmp2_);
	statusline = _tmp3_;
	_tmp4_ = statusline;
	if (g_strcmp0 (_tmp4_, "OK") == 0) {
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_OK;
		_g_free0 (statusline);
		return result;
	}
	_tmp5_ = statusline;
	if (g_strcmp0 (_tmp5_, "CONNECT") == 0) {
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_CONNECT;
		_g_free0 (statusline);
		return result;
	}
	_tmp6_ = fso_gsm_theModem;
	_tmp7_ = ((FsoFrameworkAbstractObject*) _tmp6_)->logger;
	_tmp8_ = statusline;
	_tmp9_ = string_to_string (_tmp8_);
	_tmp10_ = G_TYPE_FROM_INSTANCE (self);
	_tmp11_ = g_type_name (_tmp10_);
	_tmp12_ = string_to_string (_tmp11_);
	_tmp13_ = g_strconcat ("Did not receive OK (instead '", _tmp9_, "') for ", _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	_tmp15_ = fso_framework_logger_debug (_tmp7_, _tmp14_);
	g_assert (_tmp15_);
	_g_free0 (_tmp14_);
	errorcode = 0;
	_tmp16_ = statusline;
	_tmp17_ = string_contains (_tmp16_, ":");
	if (!_tmp17_) {
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_ERROR;
		_g_free0 (statusline);
		return result;
	}
	_tmp18_ = statusline;
	_tmp19_ = g_str_has_prefix (_tmp18_, "+CMS");
	if (_tmp19_) {
		gint _tmp20_;
		gint _tmp21_;
		const gchar* _tmp22_;
		gchar** _tmp23_;
		gchar** _tmp24_ = NULL;
		gchar** _tmp25_;
		gint _tmp25__length1;
		const gchar* _tmp26_;
		gint _tmp27_ = 0;
		gint _tmp28_;
		_tmp20_ = errorcode;
		errorcode = _tmp20_ + ((gint) FSO_GSM_CONSTANTS_AT_RESPONSE_CMS_ERROR_START);
		_tmp21_ = errorcode;
		_tmp22_ = statusline;
		_tmp24_ = _tmp23_ = g_strsplit (_tmp22_, ":", 0);
		_tmp25_ = _tmp24_;
		_tmp25__length1 = _vala_array_length (_tmp23_);
		_tmp26_ = _tmp25_[1];
		_tmp27_ = atoi (_tmp26_);
		errorcode = _tmp21_ + _tmp27_;
		_tmp25_ = (_vala_array_free (_tmp25_, _tmp25__length1, (GDestroyNotify) g_free), NULL);
		_tmp28_ = errorcode;
		result = (FsoGsmConstantsAtResponse) _tmp28_;
		_g_free0 (statusline);
		return result;
	} else {
		const gchar* _tmp29_;
		gboolean _tmp30_ = FALSE;
		_tmp29_ = statusline;
		_tmp30_ = g_str_has_prefix (_tmp29_, "+CME");
		if (_tmp30_) {
			gint _tmp31_;
			gint _tmp32_;
			const gchar* _tmp33_;
			gchar** _tmp34_;
			gchar** _tmp35_ = NULL;
			gchar** _tmp36_;
			gint _tmp36__length1;
			const gchar* _tmp37_;
			gint _tmp38_ = 0;
			gint _tmp39_;
			_tmp31_ = errorcode;
			errorcode = _tmp31_ + ((gint) FSO_GSM_CONSTANTS_AT_RESPONSE_CME_ERROR_START);
			_tmp32_ = errorcode;
			_tmp33_ = statusline;
			_tmp35_ = _tmp34_ = g_strsplit (_tmp33_, ":", 0);
			_tmp36_ = _tmp35_;
			_tmp36__length1 = _vala_array_length (_tmp34_);
			_tmp37_ = _tmp36_[1];
			_tmp38_ = atoi (_tmp37_);
			errorcode = _tmp32_ + _tmp38_;
			_tmp36_ = (_vala_array_free (_tmp36_, _tmp36__length1, (GDestroyNotify) g_free), NULL);
			_tmp39_ = errorcode;
			result = (FsoGsmConstantsAtResponse) _tmp39_;
			_g_free0 (statusline);
			return result;
		} else {
			const gchar* _tmp40_;
			gboolean _tmp41_ = FALSE;
			_tmp40_ = statusline;
			_tmp41_ = g_str_has_prefix (_tmp40_, "+EXT");
			if (_tmp41_) {
				gint _tmp42_;
				gint _tmp43_;
				const gchar* _tmp44_;
				gchar** _tmp45_;
				gchar** _tmp46_ = NULL;
				gchar** _tmp47_;
				gint _tmp47__length1;
				const gchar* _tmp48_;
				gint _tmp49_ = 0;
				gint _tmp50_;
				_tmp42_ = errorcode;
				errorcode = _tmp42_ + ((gint) FSO_GSM_CONSTANTS_AT_RESPONSE_EXT_ERROR_START);
				_tmp43_ = errorcode;
				_tmp44_ = statusline;
				_tmp46_ = _tmp45_ = g_strsplit (_tmp44_, ":", 0);
				_tmp47_ = _tmp46_;
				_tmp47__length1 = _vala_array_length (_tmp45_);
				_tmp48_ = _tmp47_[1];
				_tmp49_ = atoi (_tmp48_);
				errorcode = _tmp43_ + _tmp49_;
				_tmp47_ = (_vala_array_free (_tmp47_, _tmp47__length1, (GDestroyNotify) g_free), NULL);
				_tmp50_ = errorcode;
				result = (FsoGsmConstantsAtResponse) _tmp50_;
				_g_free0 (statusline);
				return result;
			}
		}
	}
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_ERROR;
	_g_free0 (statusline);
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateOk (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validateOk (self, response, response_length1);
}


/**
     * Parse actual response to this At command and validate
     **/
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validate (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	FsoGsmConstantsAtResponse result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	FsoGsmConstantsAtResponse _tmp1_ = 0;
	FsoGsmConstantsAtResponse status;
	FsoGsmConstantsAtResponse _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_;
	FsoGsmModem* _tmp24_;
	FsoFrameworkLogger* _tmp25_;
	GType _tmp26_ = 0UL;
	const gchar* _tmp27_ = NULL;
	const gchar* _tmp28_ = NULL;
	gchar* _tmp29_ = NULL;
	gchar* _tmp30_;
	gboolean _tmp31_ = FALSE;
	GError * _inner_error_ = NULL;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	_tmp1_ = fso_gsm_abstract_at_command_validateOk (self, _tmp0_, _tmp0__length1);
	status = _tmp1_;
	_tmp2_ = status;
	if (_tmp2_ != FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
		result = status;
		return result;
	}
	_tmp3_ = response;
	_tmp3__length1 = response_length1;
	_tmp4_ = self->length;
	if (_tmp3__length1 <= _tmp4_) {
		FsoGsmModem* _tmp5_;
		FsoFrameworkLogger* _tmp6_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		GType _tmp10_ = 0UL;
		const gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		_tmp5_ = fso_gsm_theModem;
		_tmp6_ = ((FsoFrameworkAbstractObject*) _tmp5_)->logger;
		_tmp7_ = response;
		_tmp7__length1 = response_length1;
		_tmp8_ = g_strdup_printf ("%i", _tmp7__length1);
		_tmp9_ = _tmp8_;
		_tmp10_ = G_TYPE_FROM_INSTANCE (self);
		_tmp11_ = g_type_name (_tmp10_);
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat ("Unexpected length ", _tmp9_, " for ", _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		fso_framework_logger_warning (_tmp6_, _tmp14_);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp9_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNEXPECTED_LENGTH;
		return result;
	}
	{
		gchar** _tmp15_;
		gint _tmp15__length1;
		const gchar* _tmp16_;
		_tmp15_ = response;
		_tmp15__length1 = response_length1;
		_tmp16_ = _tmp15_[0];
		fso_gsm_abstract_at_command_parse (self, _tmp16_, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
				goto __catch1_fso_gsm_at_command_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
	}
	goto __finally1;
	__catch1_fso_gsm_at_command_error:
	{
		GError* e = NULL;
		FsoGsmModem* _tmp17_;
		FsoFrameworkLogger* _tmp18_;
		GType _tmp19_ = 0UL;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		gchar* _tmp23_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp17_ = fso_gsm_theModem;
		_tmp18_ = ((FsoFrameworkAbstractObject*) _tmp17_)->logger;
		_tmp19_ = G_TYPE_FROM_INSTANCE (self);
		_tmp20_ = g_type_name (_tmp19_);
		_tmp21_ = string_to_string (_tmp20_);
		_tmp22_ = g_strconcat ("Unexpected format for ", _tmp21_, NULL);
		_tmp23_ = _tmp22_;
		fso_framework_logger_warning (_tmp18_, _tmp23_);
		_g_free0 (_tmp23_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE;
		_g_error_free0 (e);
		return result;
	}
	__finally1:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp24_ = fso_gsm_theModem;
	_tmp25_ = ((FsoFrameworkAbstractObject*) _tmp24_)->logger;
	_tmp26_ = G_TYPE_FROM_INSTANCE (self);
	_tmp27_ = g_type_name (_tmp26_);
	_tmp28_ = string_to_string (_tmp27_);
	_tmp29_ = g_strconcat ("Did receive a valid response for ", _tmp28_, NULL);
	_tmp30_ = _tmp29_;
	_tmp31_ = fso_framework_logger_debug (_tmp25_, _tmp30_);
	g_assert (_tmp31_);
	_g_free0 (_tmp30_);
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_VALID;
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validate (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validate (self, response, response_length1);
}


/**
     * Validate a test response for this At command
     **/
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateTest (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	FsoGsmConstantsAtResponse result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	FsoGsmConstantsAtResponse _tmp1_ = 0;
	FsoGsmConstantsAtResponse status;
	FsoGsmConstantsAtResponse _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gint _tmp4_;
	FsoGsmModem* _tmp25_;
	FsoFrameworkLogger* _tmp26_;
	GType _tmp27_ = 0UL;
	const gchar* _tmp28_ = NULL;
	const gchar* _tmp29_ = NULL;
	gchar* _tmp30_ = NULL;
	gchar* _tmp31_;
	gboolean _tmp32_ = FALSE;
	GError * _inner_error_ = NULL;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	_tmp1_ = fso_gsm_abstract_at_command_validateOk (self, _tmp0_, _tmp0__length1);
	status = _tmp1_;
	_tmp2_ = status;
	if (_tmp2_ != FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
		result = status;
		return result;
	}
	_tmp3_ = response;
	_tmp3__length1 = response_length1;
	_tmp4_ = self->length;
	if (_tmp3__length1 <= _tmp4_) {
		FsoGsmModem* _tmp5_;
		FsoFrameworkLogger* _tmp6_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		GType _tmp10_ = 0UL;
		const gchar* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		gchar* _tmp13_ = NULL;
		gchar* _tmp14_;
		_tmp5_ = fso_gsm_theModem;
		_tmp6_ = ((FsoFrameworkAbstractObject*) _tmp5_)->logger;
		_tmp7_ = response;
		_tmp7__length1 = response_length1;
		_tmp8_ = g_strdup_printf ("%i", _tmp7__length1);
		_tmp9_ = _tmp8_;
		_tmp10_ = G_TYPE_FROM_INSTANCE (self);
		_tmp11_ = g_type_name (_tmp10_);
		_tmp12_ = string_to_string (_tmp11_);
		_tmp13_ = g_strconcat ("Unexpected test length ", _tmp9_, " for ", _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		fso_framework_logger_warning (_tmp6_, _tmp14_);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp9_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNEXPECTED_LENGTH;
		return result;
	}
	{
		gchar** _tmp15_;
		gint _tmp15__length1;
		const gchar* _tmp16_;
		_tmp15_ = response;
		_tmp15__length1 = response_length1;
		_tmp16_ = _tmp15_[0];
		fso_gsm_abstract_at_command_parseTest (self, _tmp16_, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
				goto __catch2_fso_gsm_at_command_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
	}
	goto __finally2;
	__catch2_fso_gsm_at_command_error:
	{
		GError* e = NULL;
		FsoGsmModem* _tmp17_;
		FsoFrameworkLogger* _tmp18_;
		GType _tmp19_ = 0UL;
		const gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
		gchar* _tmp23_;
		gboolean _tmp24_ = FALSE;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp17_ = fso_gsm_theModem;
		_tmp18_ = ((FsoFrameworkAbstractObject*) _tmp17_)->logger;
		_tmp19_ = G_TYPE_FROM_INSTANCE (self);
		_tmp20_ = g_type_name (_tmp19_);
		_tmp21_ = string_to_string (_tmp20_);
		_tmp22_ = g_strconcat ("Unexpected test format for ", _tmp21_, NULL);
		_tmp23_ = _tmp22_;
		_tmp24_ = fso_framework_logger_debug (_tmp18_, _tmp23_);
		g_assert (_tmp24_);
		_g_free0 (_tmp23_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE;
		_g_error_free0 (e);
		return result;
	}
	__finally2:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp25_ = fso_gsm_theModem;
	_tmp26_ = ((FsoFrameworkAbstractObject*) _tmp25_)->logger;
	_tmp27_ = G_TYPE_FROM_INSTANCE (self);
	_tmp28_ = g_type_name (_tmp27_);
	_tmp29_ = string_to_string (_tmp28_);
	_tmp30_ = g_strconcat ("Did receive a valid test response for ", _tmp29_, NULL);
	_tmp31_ = _tmp30_;
	_tmp32_ = fso_framework_logger_debug (_tmp26_, _tmp31_);
	g_assert (_tmp32_);
	_g_free0 (_tmp31_);
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_VALID;
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateTest (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validateTest (self, response, response_length1);
}


/**
     * Validate a multiline response for this At command
     **/
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	FsoGsmConstantsAtResponse result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	FsoGsmConstantsAtResponse _tmp1_ = 0;
	FsoGsmConstantsAtResponse status;
	FsoGsmConstantsAtResponse _tmp2_;
	gint _tmp3_;
	FsoGsmModem* _tmp14_;
	FsoFrameworkLogger* _tmp15_;
	GType _tmp16_ = 0UL;
	const gchar* _tmp17_ = NULL;
	const gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_;
	gboolean _tmp21_ = FALSE;
	GError * _inner_error_ = NULL;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	_tmp1_ = fso_gsm_abstract_at_command_validateOk (self, _tmp0_, _tmp0__length1);
	status = _tmp1_;
	_tmp2_ = status;
	if (_tmp2_ != FSO_GSM_CONSTANTS_AT_RESPONSE_OK) {
		result = status;
		return result;
	}
	_tmp3_ = response_length1;
	response_length1 = _tmp3_ - 1;
	{
		gchar** _tmp4_;
		gint _tmp4__length1;
		gint _tmp5_;
		_tmp4_ = response;
		_tmp4__length1 = response_length1;
		fso_gsm_abstract_at_command_parseMulti (self, _tmp4_, _tmp4__length1, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
				goto __catch3_fso_gsm_at_command_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp5_ = response_length1;
		response_length1 = _tmp5_ + 1;
	}
	goto __finally3;
	__catch3_fso_gsm_at_command_error:
	{
		GError* e = NULL;
		gint _tmp6_;
		FsoGsmModem* _tmp7_;
		FsoFrameworkLogger* _tmp8_;
		GType _tmp9_ = 0UL;
		const gchar* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		gchar* _tmp12_ = NULL;
		gchar* _tmp13_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp6_ = response_length1;
		response_length1 = _tmp6_ + 1;
		_tmp7_ = fso_gsm_theModem;
		_tmp8_ = ((FsoFrameworkAbstractObject*) _tmp7_)->logger;
		_tmp9_ = G_TYPE_FROM_INSTANCE (self);
		_tmp10_ = g_type_name (_tmp9_);
		_tmp11_ = string_to_string (_tmp10_);
		_tmp12_ = g_strconcat ("Unexpected format for ", _tmp11_, NULL);
		_tmp13_ = _tmp12_;
		fso_framework_logger_warning (_tmp8_, _tmp13_);
		_g_free0 (_tmp13_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE;
		_g_error_free0 (e);
		return result;
	}
	__finally3:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp14_ = fso_gsm_theModem;
	_tmp15_ = ((FsoFrameworkAbstractObject*) _tmp14_)->logger;
	_tmp16_ = G_TYPE_FROM_INSTANCE (self);
	_tmp17_ = g_type_name (_tmp16_);
	_tmp18_ = string_to_string (_tmp17_);
	_tmp19_ = g_strconcat ("Did receive a valid response for ", _tmp18_, NULL);
	_tmp20_ = _tmp19_;
	_tmp21_ = fso_framework_logger_debug (_tmp15_, _tmp20_);
	g_assert (_tmp21_);
	_g_free0 (_tmp20_);
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_VALID;
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateMulti (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validateMulti (self, response, response_length1);
}


/**
     * Validate an URC for this At command
     **/
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateUrc (FsoGsmAbstractAtCommand* self, const gchar* response) {
	FsoGsmConstantsAtResponse result = 0;
	FsoGsmModem* _tmp8_;
	FsoFrameworkLogger* _tmp9_;
	GType _tmp10_ = 0UL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_;
	gboolean _tmp15_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (response != NULL, 0);
	{
		const gchar* _tmp0_;
		_tmp0_ = response;
		fso_gsm_abstract_at_command_parse (self, _tmp0_, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
				goto __catch4_fso_gsm_at_command_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
	}
	goto __finally4;
	__catch4_fso_gsm_at_command_error:
	{
		GError* e = NULL;
		FsoGsmModem* _tmp1_;
		FsoFrameworkLogger* _tmp2_;
		GType _tmp3_ = 0UL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp1_ = fso_gsm_theModem;
		_tmp2_ = ((FsoFrameworkAbstractObject*) _tmp1_)->logger;
		_tmp3_ = G_TYPE_FROM_INSTANCE (self);
		_tmp4_ = g_type_name (_tmp3_);
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = g_strconcat ("Unexpected format for ", _tmp5_, NULL);
		_tmp7_ = _tmp6_;
		fso_framework_logger_warning (_tmp2_, _tmp7_);
		_g_free0 (_tmp7_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE;
		_g_error_free0 (e);
		return result;
	}
	__finally4:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp8_ = fso_gsm_theModem;
	_tmp9_ = ((FsoFrameworkAbstractObject*) _tmp8_)->logger;
	_tmp10_ = G_TYPE_FROM_INSTANCE (self);
	_tmp11_ = g_type_name (_tmp10_);
	_tmp12_ = string_to_string (_tmp11_);
	_tmp13_ = g_strconcat ("Did receive a valid response for ", _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	_tmp15_ = fso_framework_logger_debug (_tmp9_, _tmp14_);
	g_assert (_tmp15_);
	_g_free0 (_tmp14_);
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_VALID;
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateUrc (FsoGsmAbstractAtCommand* self, const gchar* response) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validateUrc (self, response);
}


/**
     * Validate an URC w/ PDU for this At command
     **/
static FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_real_validateUrcPdu (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	FsoGsmConstantsAtResponse result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	FsoGsmModem* _tmp19_;
	FsoFrameworkLogger* _tmp20_;
	GType _tmp21_ = 0UL;
	const gchar* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_;
	gboolean _tmp26_ = FALSE;
	GError * _inner_error_ = NULL;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	if (_tmp0__length1 < 2) {
		FsoGsmModem* _tmp1_;
		FsoFrameworkLogger* _tmp2_;
		gchar** _tmp3_;
		gint _tmp3__length1;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_;
		GType _tmp6_ = 0UL;
		const gchar* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_;
		_tmp1_ = fso_gsm_theModem;
		_tmp2_ = ((FsoFrameworkAbstractObject*) _tmp1_)->logger;
		_tmp3_ = response;
		_tmp3__length1 = response_length1;
		_tmp4_ = g_strdup_printf ("%i", _tmp3__length1);
		_tmp5_ = _tmp4_;
		_tmp6_ = G_TYPE_FROM_INSTANCE (self);
		_tmp7_ = g_type_name (_tmp6_);
		_tmp8_ = string_to_string (_tmp7_);
		_tmp9_ = g_strconcat ("Unexpected length ", _tmp5_, " for ", _tmp8_, NULL);
		_tmp10_ = _tmp9_;
		fso_framework_logger_warning (_tmp2_, _tmp10_);
		_g_free0 (_tmp10_);
		_g_free0 (_tmp5_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNEXPECTED_LENGTH;
		return result;
	}
	{
		gchar** _tmp11_;
		gint _tmp11__length1;
		_tmp11_ = response;
		_tmp11__length1 = response_length1;
		fso_gsm_abstract_at_command_parseMulti (self, _tmp11_, _tmp11__length1, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
				goto __catch5_fso_gsm_at_command_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
	}
	goto __finally5;
	__catch5_fso_gsm_at_command_error:
	{
		GError* e = NULL;
		FsoGsmModem* _tmp12_;
		FsoFrameworkLogger* _tmp13_;
		GType _tmp14_ = 0UL;
		const gchar* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp12_ = fso_gsm_theModem;
		_tmp13_ = ((FsoFrameworkAbstractObject*) _tmp12_)->logger;
		_tmp14_ = G_TYPE_FROM_INSTANCE (self);
		_tmp15_ = g_type_name (_tmp14_);
		_tmp16_ = string_to_string (_tmp15_);
		_tmp17_ = g_strconcat ("Unexpected format for ", _tmp16_, NULL);
		_tmp18_ = _tmp17_;
		fso_framework_logger_warning (_tmp13_, _tmp18_);
		_g_free0 (_tmp18_);
		result = FSO_GSM_CONSTANTS_AT_RESPONSE_UNABLE_TO_PARSE;
		_g_error_free0 (e);
		return result;
	}
	__finally5:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp19_ = fso_gsm_theModem;
	_tmp20_ = ((FsoFrameworkAbstractObject*) _tmp19_)->logger;
	_tmp21_ = G_TYPE_FROM_INSTANCE (self);
	_tmp22_ = g_type_name (_tmp21_);
	_tmp23_ = string_to_string (_tmp22_);
	_tmp24_ = g_strconcat ("Did receive a valid response for ", _tmp23_, NULL);
	_tmp25_ = _tmp24_;
	_tmp26_ = fso_framework_logger_debug (_tmp20_, _tmp25_);
	g_assert (_tmp26_);
	_g_free0 (_tmp25_);
	result = FSO_GSM_CONSTANTS_AT_RESPONSE_VALID;
	return result;
}


FsoGsmConstantsAtResponse fso_gsm_abstract_at_command_validateUrcPdu (FsoGsmAbstractAtCommand* self, gchar** response, int response_length1) {
	g_return_val_if_fail (self != NULL, 0);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->validateUrcPdu (self, response, response_length1);
}


gchar* fso_gsm_abstract_at_command_to_string (FsoGsmAbstractAtCommand* self, const gchar* name) {
	gchar* result = NULL;
	GMatchInfo* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* res;
	const gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->mi;
	_tmp1_ = name;
	_tmp2_ = g_match_info_fetch_named (_tmp0_, _tmp1_);
	res = _tmp2_;
	_tmp3_ = res;
	if (_tmp3_ == NULL) {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("");
		result = _tmp4_;
		_g_free0 (res);
		return result;
	}
	result = res;
	return result;
}


gint fso_gsm_abstract_at_command_to_int (FsoGsmAbstractAtCommand* self, const gchar* name) {
	gint result = 0;
	GMatchInfo* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* res;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (name != NULL, 0);
	_tmp0_ = self->mi;
	_tmp1_ = name;
	_tmp2_ = g_match_info_fetch_named (_tmp0_, _tmp1_);
	res = _tmp2_;
	_tmp3_ = res;
	if (_tmp3_ == NULL) {
		result = -1;
		_g_free0 (res);
		return result;
	}
	_tmp4_ = res;
	_tmp5_ = atoi (_tmp4_);
	result = _tmp5_;
	_g_free0 (res);
	return result;
}


static guint fso_gsm_abstract_at_command_real_get_timeout (FsoGsmAbstractAtCommand* self) {
	guint result = 0U;
	result = FSO_GSM_DEFAULT_COMMAND_TIMEOUT;
	return result;
}


guint fso_gsm_abstract_at_command_get_timeout (FsoGsmAbstractAtCommand* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->get_timeout (self);
}


static guint fso_gsm_abstract_at_command_real_get_retry (FsoGsmAbstractAtCommand* self) {
	guint result = 0U;
	result = FSO_GSM_DEFAULT_COMMAND_RETRY;
	return result;
}


guint fso_gsm_abstract_at_command_get_retry (FsoGsmAbstractAtCommand* self) {
	g_return_val_if_fail (self != NULL, 0U);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->get_retry (self);
}


static gchar* fso_gsm_abstract_at_command_real_get_prefix (FsoGsmAbstractAtCommand* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	_tmp0_ = g_strdup ("AT");
	result = _tmp0_;
	return result;
}


gchar* fso_gsm_abstract_at_command_get_prefix (FsoGsmAbstractAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->get_prefix (self);
}


static gchar* fso_gsm_abstract_at_command_real_get_postfix (FsoGsmAbstractAtCommand* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	_tmp0_ = g_strdup ("\r\n");
	result = _tmp0_;
	return result;
}


gchar* fso_gsm_abstract_at_command_get_postfix (FsoGsmAbstractAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_ABSTRACT_AT_COMMAND_GET_CLASS (self)->get_postfix (self);
}


static gboolean fso_gsm_abstract_at_command_real_is_valid_prefix (FsoGsmAtCommandQueueCommand* base, const gchar* line) {
	FsoGsmAbstractAtCommand * self;
	gboolean result = FALSE;
	gchar** _tmp0_;
	gint _tmp0__length1;
	self = (FsoGsmAbstractAtCommand*) base;
	g_return_val_if_fail (line != NULL, FALSE);
	_tmp0_ = self->prefix;
	_tmp0__length1 = self->prefix_length1;
	if (_tmp0_ == NULL) {
		result = TRUE;
		return result;
	}
	{
		gint i;
		i = 0;
		{
			gboolean _tmp1_;
			_tmp1_ = TRUE;
			while (TRUE) {
				gboolean _tmp2_;
				gint _tmp4_;
				gchar** _tmp5_;
				gint _tmp5__length1;
				const gchar* _tmp6_;
				gchar** _tmp7_;
				gint _tmp7__length1;
				gint _tmp8_;
				const gchar* _tmp9_;
				gboolean _tmp10_ = FALSE;
				_tmp2_ = _tmp1_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp4_ = i;
				_tmp5_ = self->prefix;
				_tmp5__length1 = self->prefix_length1;
				if (!(_tmp4_ < _tmp5__length1)) {
					break;
				}
				_tmp6_ = line;
				_tmp7_ = self->prefix;
				_tmp7__length1 = self->prefix_length1;
				_tmp8_ = i;
				_tmp9_ = _tmp7_[_tmp8_];
				_tmp10_ = g_str_has_prefix (_tmp6_, _tmp9_);
				if (_tmp10_) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}


FsoGsmAbstractAtCommand* fso_gsm_abstract_at_command_construct (GType object_type) {
	FsoGsmAbstractAtCommand * self = NULL;
	self = (FsoGsmAbstractAtCommand*) g_object_new (object_type, NULL);
	return self;
}


static GObject * fso_gsm_abstract_at_command_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	FsoGsmAbstractAtCommand * self;
	parent_class = G_OBJECT_CLASS (fso_gsm_abstract_at_command_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = FSO_GSM_ABSTRACT_AT_COMMAND (obj);
	self->length = 1;
	return obj;
}


static void fso_gsm_abstract_at_command_class_init (FsoGsmAbstractAtCommandClass * klass) {
	fso_gsm_abstract_at_command_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = fso_gsm_abstract_at_command_real_parse;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parseTest = fso_gsm_abstract_at_command_real_parseTest;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parseMulti = fso_gsm_abstract_at_command_real_parseMulti;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validateOk = fso_gsm_abstract_at_command_real_validateOk;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validate = fso_gsm_abstract_at_command_real_validate;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validateTest = fso_gsm_abstract_at_command_real_validateTest;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validateMulti = fso_gsm_abstract_at_command_real_validateMulti;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validateUrc = fso_gsm_abstract_at_command_real_validateUrc;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->validateUrcPdu = fso_gsm_abstract_at_command_real_validateUrcPdu;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->get_timeout = fso_gsm_abstract_at_command_real_get_timeout;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->get_retry = fso_gsm_abstract_at_command_real_get_retry;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->get_prefix = fso_gsm_abstract_at_command_real_get_prefix;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->get_postfix = fso_gsm_abstract_at_command_real_get_postfix;
	G_OBJECT_CLASS (klass)->constructor = fso_gsm_abstract_at_command_constructor;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_abstract_at_command_finalize;
}


static void fso_gsm_abstract_at_command_fso_gsm_at_command_queue_command_interface_init (FsoGsmAtCommandQueueCommandIface * iface) {
	fso_gsm_abstract_at_command_fso_gsm_at_command_queue_command_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_timeout = (guint (*)(FsoGsmAtCommandQueueCommand*)) fso_gsm_abstract_at_command_get_timeout;
	iface->get_retry = (guint (*)(FsoGsmAtCommandQueueCommand*)) fso_gsm_abstract_at_command_get_retry;
	iface->get_prefix = (gchar* (*)(FsoGsmAtCommandQueueCommand*)) fso_gsm_abstract_at_command_get_prefix;
	iface->get_postfix = (gchar* (*)(FsoGsmAtCommandQueueCommand*)) fso_gsm_abstract_at_command_get_postfix;
	iface->is_valid_prefix = (gboolean (*)(FsoGsmAtCommandQueueCommand*, const gchar*)) fso_gsm_abstract_at_command_real_is_valid_prefix;
}


static void fso_gsm_abstract_at_command_fso_gsm_at_command_interface_init (FsoGsmAtCommandIface * iface) {
	fso_gsm_abstract_at_command_fso_gsm_at_command_parent_iface = g_type_interface_peek_parent (iface);
	iface->encodeString = (gchar* (*)(FsoGsmAtCommand*, const gchar*)) fso_gsm_abstract_at_command_real_encodeString;
	iface->decodeString = (gchar* (*)(FsoGsmAtCommand*, const gchar*)) fso_gsm_abstract_at_command_real_decodeString;
	iface->parse = (void (*)(FsoGsmAtCommand*, const gchar*, GError**)) fso_gsm_abstract_at_command_parse;
	iface->parseTest = (void (*)(FsoGsmAtCommand*, const gchar*, GError**)) fso_gsm_abstract_at_command_parseTest;
	iface->parseMulti = (void (*)(FsoGsmAtCommand*, gchar**, int, GError**)) fso_gsm_abstract_at_command_parseMulti;
	iface->validateOk = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, gchar**, int)) fso_gsm_abstract_at_command_validateOk;
	iface->validate = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, gchar**, int)) fso_gsm_abstract_at_command_validate;
	iface->validateTest = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, gchar**, int)) fso_gsm_abstract_at_command_validateTest;
	iface->validateMulti = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, gchar**, int)) fso_gsm_abstract_at_command_validateMulti;
	iface->validateUrc = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, const gchar*)) fso_gsm_abstract_at_command_validateUrc;
	iface->validateUrcPdu = (FsoGsmConstantsAtResponse (*)(FsoGsmAtCommand*, gchar**, int)) fso_gsm_abstract_at_command_validateUrcPdu;
}


static void fso_gsm_abstract_at_command_instance_init (FsoGsmAbstractAtCommand * self) {
}


static void fso_gsm_abstract_at_command_finalize (GObject* obj) {
	FsoGsmAbstractAtCommand * self;
	self = FSO_GSM_ABSTRACT_AT_COMMAND (obj);
	_g_regex_unref0 (self->re);
	_g_regex_unref0 (self->tere);
	_g_match_info_free0 (self->mi);
	self->prefix = (_vala_array_free (self->prefix, self->prefix_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (fso_gsm_abstract_at_command_parent_class)->finalize (obj);
}


GType fso_gsm_abstract_at_command_get_type (void) {
	static volatile gsize fso_gsm_abstract_at_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_abstract_at_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmAbstractAtCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_abstract_at_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmAbstractAtCommand), 0, (GInstanceInitFunc) fso_gsm_abstract_at_command_instance_init, NULL };
		static const GInterfaceInfo fso_gsm_at_command_queue_command_info = { (GInterfaceInitFunc) fso_gsm_abstract_at_command_fso_gsm_at_command_queue_command_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo fso_gsm_at_command_info = { (GInterfaceInitFunc) fso_gsm_abstract_at_command_fso_gsm_at_command_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType fso_gsm_abstract_at_command_type_id;
		fso_gsm_abstract_at_command_type_id = g_type_register_static (G_TYPE_OBJECT, "FsoGsmAbstractAtCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (fso_gsm_abstract_at_command_type_id, FSO_GSM_TYPE_AT_COMMAND_QUEUE_COMMAND, &fso_gsm_at_command_queue_command_info);
		g_type_add_interface_static (fso_gsm_abstract_at_command_type_id, FSO_GSM_TYPE_AT_COMMAND, &fso_gsm_at_command_info);
		g_once_init_leave (&fso_gsm_abstract_at_command_type_id__volatile, fso_gsm_abstract_at_command_type_id);
	}
	return fso_gsm_abstract_at_command_type_id__volatile;
}


FsoGsmV250terCommand* fso_gsm_v250ter_command_construct (GType object_type, const gchar* name) {
	FsoGsmV250terCommand * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_ = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (FsoGsmV250terCommand*) fso_gsm_abstract_at_command_construct (object_type);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	_tmp2_ = g_strdup ("+ONLY_TERMINAL_SYMBOLS_ALLOWED");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	((FsoGsmAbstractAtCommand*) self)->prefix = (_vala_array_free (((FsoGsmAbstractAtCommand*) self)->prefix, ((FsoGsmAbstractAtCommand*) self)->prefix_length1, (GDestroyNotify) g_free), NULL);
	((FsoGsmAbstractAtCommand*) self)->prefix = _tmp3_;
	((FsoGsmAbstractAtCommand*) self)->prefix_length1 = 1;
	return self;
}


FsoGsmV250terCommand* fso_gsm_v250ter_command_new (const gchar* name) {
	return fso_gsm_v250ter_command_construct (FSO_GSM_TYPE_V250TER_COMMAND, name);
}


gchar* fso_gsm_v250ter_command_execute (FsoGsmV250terCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


static void fso_gsm_v250ter_command_class_init (FsoGsmV250terCommandClass * klass) {
	fso_gsm_v250ter_command_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_v250ter_command_finalize;
}


static void fso_gsm_v250ter_command_instance_init (FsoGsmV250terCommand * self) {
}


static void fso_gsm_v250ter_command_finalize (GObject* obj) {
	FsoGsmV250terCommand * self;
	self = FSO_GSM_V250TER_COMMAND (obj);
	_g_free0 (self->name);
	G_OBJECT_CLASS (fso_gsm_v250ter_command_parent_class)->finalize (obj);
}


GType fso_gsm_v250ter_command_get_type (void) {
	static volatile gsize fso_gsm_v250ter_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_v250ter_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmV250terCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_v250ter_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmV250terCommand), 0, (GInstanceInitFunc) fso_gsm_v250ter_command_instance_init, NULL };
		GType fso_gsm_v250ter_command_type_id;
		fso_gsm_v250ter_command_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "FsoGsmV250terCommand", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_v250ter_command_type_id__volatile, fso_gsm_v250ter_command_type_id);
	}
	return fso_gsm_v250ter_command_type_id__volatile;
}


FsoGsmSimpleAtCommand* fso_gsm_simple_at_command_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* name, gboolean prefixoptional) {
	FsoGsmSimpleAtCommand * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* regex;
	gchar* _tmp10_ = NULL;
	gboolean _tmp11_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* testx;
	gboolean _tmp26_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (FsoGsmSimpleAtCommand*) fso_gsm_abstract_at_command_construct (object_type);
	self->priv->t_type = t_type;
	self->priv->t_dup_func = t_dup_func;
	self->priv->t_destroy_func = t_destroy_func;
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->name);
	self->priv->name = _tmp1_;
	_tmp3_ = prefixoptional;
	if (_tmp3_) {
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		_tmp4_ = name;
		_tmp5_ = g_strdup_printf ("(\\%s:\\ )?", _tmp4_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp5_;
	} else {
		const gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		_tmp6_ = name;
		_tmp7_ = g_strdup_printf ("\\%s:\\ ", _tmp6_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp7_;
	}
	_tmp8_ = _tmp2_;
	_tmp9_ = g_strdup (_tmp8_);
	regex = _tmp9_;
	_tmp11_ = prefixoptional;
	if (_tmp11_) {
		const gchar* _tmp12_;
		gchar* _tmp13_ = NULL;
		_tmp12_ = name;
		_tmp13_ = g_strdup_printf ("(\\%s:\\ )?", _tmp12_);
		_g_free0 (_tmp10_);
		_tmp10_ = _tmp13_;
	} else {
		const gchar* _tmp14_;
		gchar* _tmp15_ = NULL;
		_tmp14_ = name;
		_tmp15_ = g_strdup_printf ("\\%s:\\ ", _tmp14_);
		_g_free0 (_tmp10_);
		_tmp10_ = _tmp15_;
	}
	_tmp16_ = _tmp10_;
	_tmp17_ = g_strdup (_tmp16_);
	testx = _tmp17_;
	if (t_type == G_TYPE_STRING) {
		const gchar* _tmp18_;
		gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		_tmp18_ = regex;
		_tmp19_ = g_strconcat (_tmp18_, "\"?(?P<righthandside>[^\"]*)\"?", NULL);
		_g_free0 (regex);
		regex = _tmp19_;
		_tmp20_ = testx;
		_tmp21_ = g_strconcat (_tmp20_, "\"?(?P<righthandside>.*)\"?", NULL);
		_g_free0 (testx);
		testx = _tmp21_;
	} else {
		if (t_type == G_TYPE_INT) {
			const gchar* _tmp22_;
			gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp22_ = regex;
			_tmp23_ = g_strconcat (_tmp22_, "(?P<righthandside>\\d+)", NULL);
			_g_free0 (regex);
			regex = _tmp23_;
			_tmp24_ = testx;
			_tmp25_ = g_strconcat (_tmp24_, "\\((?P<min>\\d+)-(?P<max>\\d+)\\)", NULL);
			_g_free0 (testx);
			testx = _tmp25_;
		} else {
			g_assert_not_reached ();
		}
	}
	_tmp26_ = prefixoptional;
	if (!_tmp26_) {
		const gchar* _tmp27_;
		gchar* _tmp28_;
		gchar** _tmp29_ = NULL;
		_tmp27_ = name;
		_tmp28_ = g_strconcat (_tmp27_, ": ", NULL);
		_tmp29_ = g_new0 (gchar*, 1 + 1);
		_tmp29_[0] = _tmp28_;
		((FsoGsmAbstractAtCommand*) self)->prefix = (_vala_array_free (((FsoGsmAbstractAtCommand*) self)->prefix, ((FsoGsmAbstractAtCommand*) self)->prefix_length1, (GDestroyNotify) g_free), NULL);
		((FsoGsmAbstractAtCommand*) self)->prefix = _tmp29_;
		((FsoGsmAbstractAtCommand*) self)->prefix_length1 = 1;
	}
	{
		const gchar* _tmp30_;
		GRegex* _tmp31_;
		GRegex* _tmp32_;
		const gchar* _tmp33_;
		GRegex* _tmp34_;
		GRegex* _tmp35_;
		_tmp30_ = regex;
		_tmp31_ = g_regex_new (_tmp30_, 0, 0, &_inner_error_);
		_tmp32_ = _tmp31_;
		if (_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp32_;
		_tmp33_ = testx;
		_tmp34_ = g_regex_new (_tmp33_, 0, 0, &_inner_error_);
		_tmp35_ = _tmp34_;
		if (_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->tere);
		((FsoGsmAbstractAtCommand*) self)->tere = _tmp35_;
	}
	goto __finally6;
	__catch6_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally6:
	if (_inner_error_ != NULL) {
		_g_free0 (testx);
		_g_free0 (_tmp10_);
		_g_free0 (regex);
		_g_free0 (_tmp2_);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_g_free0 (testx);
	_g_free0 (_tmp10_);
	_g_free0 (regex);
	_g_free0 (_tmp2_);
	return self;
}


FsoGsmSimpleAtCommand* fso_gsm_simple_at_command_new (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, const gchar* name, gboolean prefixoptional) {
	return fso_gsm_simple_at_command_construct (FSO_GSM_TYPE_SIMPLE_AT_COMMAND, t_type, t_dup_func, t_destroy_func, name, prefixoptional);
}


static void fso_gsm_simple_at_command_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	FsoGsmSimpleAtCommand * self;
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
	self = (FsoGsmSimpleAtCommand*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (fso_gsm_simple_at_command_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp0_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	if (self->priv->t_type == G_TYPE_STRING) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "righthandside");
		((self->value == NULL) || (self->priv->t_destroy_func == NULL)) ? NULL : (self->value = (self->priv->t_destroy_func (self->value), NULL));
		self->value = _tmp1_;
	} else {
		if (self->priv->t_type == G_TYPE_INT) {
			gint _tmp2_ = 0;
			_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "righthandside");
			((self->value == NULL) || (self->priv->t_destroy_func == NULL)) ? NULL : (self->value = (self->priv->t_destroy_func (self->value), NULL));
			self->value = _tmp2_;
		} else {
			g_assert_not_reached ();
		}
	}
}


static void fso_gsm_simple_at_command_real_parseTest (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	FsoGsmSimpleAtCommand * self;
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
	self = (FsoGsmSimpleAtCommand*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (fso_gsm_simple_at_command_parent_class)->parseTest (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp0_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	if (self->priv->t_type == G_TYPE_STRING) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "righthandside");
		_g_free0 (self->righthandside);
		self->righthandside = _tmp1_;
	} else {
		if (self->priv->t_type == G_TYPE_INT) {
			gint _tmp2_ = 0;
			gint _tmp3_ = 0;
			_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "min");
			self->min = _tmp2_;
			_tmp3_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "max");
			self->max = _tmp3_;
		} else {
			g_assert_not_reached ();
		}
	}
}


gchar* fso_gsm_simple_at_command_execute (FsoGsmSimpleAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_simple_at_command_query (FsoGsmSimpleAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strconcat (_tmp0_, "?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_simple_at_command_test (FsoGsmSimpleAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strconcat (_tmp0_, "=?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_simple_at_command_issue (FsoGsmSimpleAtCommand* self, gconstpointer val) {
	gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	if (self->priv->t_type == G_TYPE_STRING) {
		const gchar* _tmp0_;
		gconstpointer _tmp1_;
		gchar* _tmp2_ = NULL;
		_tmp0_ = self->priv->name;
		_tmp1_ = val;
		_tmp2_ = g_strdup_printf ("%s=\"%s\"", _tmp0_, (const gchar*) _tmp1_);
		result = _tmp2_;
		return result;
	} else {
		if (self->priv->t_type == G_TYPE_INT) {
			const gchar* _tmp3_;
			gconstpointer _tmp4_;
			gchar* _tmp5_ = NULL;
			_tmp3_ = self->priv->name;
			_tmp4_ = val;
			_tmp5_ = g_strdup_printf ("%s=%d", _tmp3_, (gint) _tmp4_);
			result = _tmp5_;
			return result;
		} else {
			g_assert_not_reached ();
		}
	}
}


static void fso_gsm_simple_at_command_class_init (FsoGsmSimpleAtCommandClass * klass) {
	fso_gsm_simple_at_command_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoGsmSimpleAtCommandPrivate));
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = fso_gsm_simple_at_command_real_parse;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parseTest = fso_gsm_simple_at_command_real_parseTest;
	G_OBJECT_CLASS (klass)->get_property = _vala_fso_gsm_simple_at_command_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_fso_gsm_simple_at_command_set_property;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_simple_at_command_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_SIMPLE_AT_COMMAND_T_TYPE, g_param_spec_gtype ("t-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_SIMPLE_AT_COMMAND_T_DUP_FUNC, g_param_spec_pointer ("t-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_SIMPLE_AT_COMMAND_T_DESTROY_FUNC, g_param_spec_pointer ("t-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void fso_gsm_simple_at_command_instance_init (FsoGsmSimpleAtCommand * self) {
	self->priv = FSO_GSM_SIMPLE_AT_COMMAND_GET_PRIVATE (self);
}


static void fso_gsm_simple_at_command_finalize (GObject* obj) {
	FsoGsmSimpleAtCommand * self;
	self = FSO_GSM_SIMPLE_AT_COMMAND (obj);
	_g_free0 (self->priv->name);
	((self->value == NULL) || (self->priv->t_destroy_func == NULL)) ? NULL : (self->value = (self->priv->t_destroy_func (self->value), NULL));
	_g_free0 (self->righthandside);
	G_OBJECT_CLASS (fso_gsm_simple_at_command_parent_class)->finalize (obj);
}


GType fso_gsm_simple_at_command_get_type (void) {
	static volatile gsize fso_gsm_simple_at_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_simple_at_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmSimpleAtCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_simple_at_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmSimpleAtCommand), 0, (GInstanceInitFunc) fso_gsm_simple_at_command_instance_init, NULL };
		GType fso_gsm_simple_at_command_type_id;
		fso_gsm_simple_at_command_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "FsoGsmSimpleAtCommand", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_simple_at_command_type_id__volatile, fso_gsm_simple_at_command_type_id);
	}
	return fso_gsm_simple_at_command_type_id__volatile;
}


static void _vala_fso_gsm_simple_at_command_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FsoGsmSimpleAtCommand * self;
	self = FSO_GSM_SIMPLE_AT_COMMAND (object);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_fso_gsm_simple_at_command_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FsoGsmSimpleAtCommand * self;
	self = FSO_GSM_SIMPLE_AT_COMMAND (object);
	switch (property_id) {
		case FSO_GSM_SIMPLE_AT_COMMAND_T_TYPE:
		self->priv->t_type = g_value_get_gtype (value);
		break;
		case FSO_GSM_SIMPLE_AT_COMMAND_T_DUP_FUNC:
		self->priv->t_dup_func = g_value_get_pointer (value);
		break;
		case FSO_GSM_SIMPLE_AT_COMMAND_T_DESTROY_FUNC:
		self->priv->t_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


FsoGsmTwoParamsAtCommand* fso_gsm_two_params_at_command_construct (GType object_type, GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, const gchar* name, gboolean prefixoptional) {
	FsoGsmTwoParamsAtCommand * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* regex;
	gchar* _tmp10_ = NULL;
	gboolean _tmp11_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* testx;
	gboolean _tmp34_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	self = (FsoGsmTwoParamsAtCommand*) fso_gsm_abstract_at_command_construct (object_type);
	self->priv->t1_type = t1_type;
	self->priv->t1_dup_func = t1_dup_func;
	self->priv->t1_destroy_func = t1_destroy_func;
	self->priv->t2_type = t2_type;
	self->priv->t2_dup_func = t2_dup_func;
	self->priv->t2_destroy_func = t2_destroy_func;
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->name);
	self->priv->name = _tmp1_;
	_tmp3_ = prefixoptional;
	if (_tmp3_) {
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		_tmp4_ = name;
		_tmp5_ = g_strdup_printf ("(\\%s:\\ )?", _tmp4_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp5_;
	} else {
		const gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		_tmp6_ = name;
		_tmp7_ = g_strdup_printf ("\\%s:\\ ", _tmp6_);
		_g_free0 (_tmp2_);
		_tmp2_ = _tmp7_;
	}
	_tmp8_ = _tmp2_;
	_tmp9_ = g_strdup (_tmp8_);
	regex = _tmp9_;
	_tmp11_ = prefixoptional;
	if (_tmp11_) {
		const gchar* _tmp12_;
		gchar* _tmp13_ = NULL;
		_tmp12_ = name;
		_tmp13_ = g_strdup_printf ("(\\%s:\\ )?", _tmp12_);
		_g_free0 (_tmp10_);
		_tmp10_ = _tmp13_;
	} else {
		const gchar* _tmp14_;
		gchar* _tmp15_ = NULL;
		_tmp14_ = name;
		_tmp15_ = g_strdup_printf ("\\%s:\\ ", _tmp14_);
		_g_free0 (_tmp10_);
		_tmp10_ = _tmp15_;
	}
	_tmp16_ = _tmp10_;
	_tmp17_ = g_strdup (_tmp16_);
	testx = _tmp17_;
	if (t1_type == G_TYPE_STRING) {
		const gchar* _tmp18_;
		gchar* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		_tmp18_ = regex;
		_tmp19_ = g_strconcat (_tmp18_, "\"?(?P<arg1>[^\"]*)\"?", NULL);
		_g_free0 (regex);
		regex = _tmp19_;
		_tmp20_ = testx;
		_tmp21_ = g_strconcat (_tmp20_, "\"?(?P<arg1>.*)\"?", NULL);
		_g_free0 (testx);
		testx = _tmp21_;
	} else {
		if (t1_type == G_TYPE_INT) {
			const gchar* _tmp22_;
			gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			_tmp22_ = regex;
			_tmp23_ = g_strconcat (_tmp22_, "(?P<arg1>\\d+)", NULL);
			_g_free0 (regex);
			regex = _tmp23_;
			_tmp24_ = testx;
			_tmp25_ = g_strconcat (_tmp24_, "\\((?P<min1>\\d+)-(?P<max1>\\d+)\\)", NULL);
			_g_free0 (testx);
			testx = _tmp25_;
		} else {
			g_assert_not_reached ();
		}
	}
	if (t2_type == G_TYPE_STRING) {
		const gchar* _tmp26_;
		gchar* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		_tmp26_ = regex;
		_tmp27_ = g_strconcat (_tmp26_, ",\"?(?P<arg2>[^\"]*)\"?", NULL);
		_g_free0 (regex);
		regex = _tmp27_;
		_tmp28_ = testx;
		_tmp29_ = g_strconcat (_tmp28_, ",\"?(?P<arg2>.*)\"?", NULL);
		_g_free0 (testx);
		testx = _tmp29_;
	} else {
		if (t2_type == G_TYPE_INT) {
			const gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp30_ = regex;
			_tmp31_ = g_strconcat (_tmp30_, ",(?P<arg2>\\d+)", NULL);
			_g_free0 (regex);
			regex = _tmp31_;
			_tmp32_ = testx;
			_tmp33_ = g_strconcat (_tmp32_, ",\\((?P<min2>\\d+)-(?P<max2>\\d+)\\)", NULL);
			_g_free0 (testx);
			testx = _tmp33_;
		} else {
			g_assert_not_reached ();
		}
	}
	_tmp34_ = prefixoptional;
	if (!_tmp34_) {
		const gchar* _tmp35_;
		gchar* _tmp36_;
		gchar** _tmp37_ = NULL;
		_tmp35_ = name;
		_tmp36_ = g_strconcat (_tmp35_, ": ", NULL);
		_tmp37_ = g_new0 (gchar*, 1 + 1);
		_tmp37_[0] = _tmp36_;
		((FsoGsmAbstractAtCommand*) self)->prefix = (_vala_array_free (((FsoGsmAbstractAtCommand*) self)->prefix, ((FsoGsmAbstractAtCommand*) self)->prefix_length1, (GDestroyNotify) g_free), NULL);
		((FsoGsmAbstractAtCommand*) self)->prefix = _tmp37_;
		((FsoGsmAbstractAtCommand*) self)->prefix_length1 = 1;
	}
	{
		const gchar* _tmp38_;
		GRegex* _tmp39_;
		GRegex* _tmp40_;
		const gchar* _tmp41_;
		GRegex* _tmp42_;
		GRegex* _tmp43_;
		_tmp38_ = regex;
		_tmp39_ = g_regex_new (_tmp38_, 0, 0, &_inner_error_);
		_tmp40_ = _tmp39_;
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp40_;
		_tmp41_ = testx;
		_tmp42_ = g_regex_new (_tmp41_, 0, 0, &_inner_error_);
		_tmp43_ = _tmp42_;
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->tere);
		((FsoGsmAbstractAtCommand*) self)->tere = _tmp43_;
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally7:
	if (_inner_error_ != NULL) {
		_g_free0 (testx);
		_g_free0 (_tmp10_);
		_g_free0 (regex);
		_g_free0 (_tmp2_);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_g_free0 (testx);
	_g_free0 (_tmp10_);
	_g_free0 (regex);
	_g_free0 (_tmp2_);
	return self;
}


FsoGsmTwoParamsAtCommand* fso_gsm_two_params_at_command_new (GType t1_type, GBoxedCopyFunc t1_dup_func, GDestroyNotify t1_destroy_func, GType t2_type, GBoxedCopyFunc t2_dup_func, GDestroyNotify t2_destroy_func, const gchar* name, gboolean prefixoptional) {
	return fso_gsm_two_params_at_command_construct (FSO_GSM_TYPE_TWO_PARAMS_AT_COMMAND, t1_type, t1_dup_func, t1_destroy_func, t2_type, t2_dup_func, t2_destroy_func, name, prefixoptional);
}


static void fso_gsm_two_params_at_command_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	FsoGsmTwoParamsAtCommand * self;
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
	self = (FsoGsmTwoParamsAtCommand*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (fso_gsm_two_params_at_command_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp0_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == FSO_GSM_AT_COMMAND_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	if (self->priv->t1_type == G_TYPE_STRING) {
		gchar* _tmp1_ = NULL;
		_tmp1_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "arg1");
		((self->value1 == NULL) || (self->priv->t1_destroy_func == NULL)) ? NULL : (self->value1 = (self->priv->t1_destroy_func (self->value1), NULL));
		self->value1 = _tmp1_;
	} else {
		if (self->priv->t1_type == G_TYPE_INT) {
			gint _tmp2_ = 0;
			_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "arg1");
			((self->value1 == NULL) || (self->priv->t1_destroy_func == NULL)) ? NULL : (self->value1 = (self->priv->t1_destroy_func (self->value1), NULL));
			self->value1 = _tmp2_;
		} else {
			g_assert_not_reached ();
		}
	}
	if (self->priv->t2_type == G_TYPE_STRING) {
		gchar* _tmp3_ = NULL;
		_tmp3_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "arg2");
		((self->value2 == NULL) || (self->priv->t2_destroy_func == NULL)) ? NULL : (self->value2 = (self->priv->t2_destroy_func (self->value2), NULL));
		self->value2 = _tmp3_;
	} else {
		if (self->priv->t2_type == G_TYPE_INT) {
			gint _tmp4_ = 0;
			_tmp4_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "arg2");
			((self->value2 == NULL) || (self->priv->t2_destroy_func == NULL)) ? NULL : (self->value2 = (self->priv->t2_destroy_func (self->value2), NULL));
			self->value2 = _tmp4_;
		} else {
			g_assert_not_reached ();
		}
	}
}


gchar* fso_gsm_two_params_at_command_execute (FsoGsmTwoParamsAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_two_params_at_command_query (FsoGsmTwoParamsAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strconcat (_tmp0_, "?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_two_params_at_command_test (FsoGsmTwoParamsAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strconcat (_tmp0_, "=?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_two_params_at_command_issue (FsoGsmTwoParamsAtCommand* self, gconstpointer val1, gconstpointer val2) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* cmd;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->name;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = g_strconcat (_tmp1_, "=", NULL);
	cmd = _tmp2_;
	if (self->priv->t1_type == G_TYPE_STRING) {
		const gchar* _tmp3_;
		gconstpointer _tmp4_;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp3_ = cmd;
		_tmp4_ = val1;
		_tmp5_ = g_strdup_printf ("\"%s\"", (const gchar*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strconcat (_tmp3_, _tmp6_, NULL);
		_g_free0 (cmd);
		cmd = _tmp7_;
		_g_free0 (_tmp6_);
	} else {
		if (self->priv->t1_type == G_TYPE_INT) {
			const gchar* _tmp8_;
			gconstpointer _tmp9_;
			gchar* _tmp10_ = NULL;
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp8_ = cmd;
			_tmp9_ = val1;
			_tmp10_ = g_strdup_printf ("%d", (gint) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = g_strconcat (_tmp8_, _tmp11_, NULL);
			_g_free0 (cmd);
			cmd = _tmp12_;
			_g_free0 (_tmp11_);
		} else {
			g_assert_not_reached ();
		}
	}
	if (self->priv->t2_type == G_TYPE_STRING) {
		const gchar* _tmp13_;
		gconstpointer _tmp14_;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_;
		gchar* _tmp17_;
		_tmp13_ = cmd;
		_tmp14_ = val2;
		_tmp15_ = g_strdup_printf (",\"%s\"", (const gchar*) _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = g_strconcat (_tmp13_, _tmp16_, NULL);
		_g_free0 (cmd);
		cmd = _tmp17_;
		_g_free0 (_tmp16_);
	} else {
		if (self->priv->t2_type == G_TYPE_INT) {
			const gchar* _tmp18_;
			gconstpointer _tmp19_;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_;
			gchar* _tmp22_;
			_tmp18_ = cmd;
			_tmp19_ = val2;
			_tmp20_ = g_strdup_printf (",%d", (gint) _tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = g_strconcat (_tmp18_, _tmp21_, NULL);
			_g_free0 (cmd);
			cmd = _tmp22_;
			_g_free0 (_tmp21_);
		} else {
			g_assert_not_reached ();
		}
	}
	result = cmd;
	return result;
}


static void fso_gsm_two_params_at_command_class_init (FsoGsmTwoParamsAtCommandClass * klass) {
	fso_gsm_two_params_at_command_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FsoGsmTwoParamsAtCommandPrivate));
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = fso_gsm_two_params_at_command_real_parse;
	G_OBJECT_CLASS (klass)->get_property = _vala_fso_gsm_two_params_at_command_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_fso_gsm_two_params_at_command_set_property;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_two_params_at_command_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_TYPE, g_param_spec_gtype ("t1-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DUP_FUNC, g_param_spec_pointer ("t1-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DESTROY_FUNC, g_param_spec_pointer ("t1-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_TYPE, g_param_spec_gtype ("t2-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DUP_FUNC, g_param_spec_pointer ("t2-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DESTROY_FUNC, g_param_spec_pointer ("t2-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void fso_gsm_two_params_at_command_instance_init (FsoGsmTwoParamsAtCommand * self) {
	self->priv = FSO_GSM_TWO_PARAMS_AT_COMMAND_GET_PRIVATE (self);
}


static void fso_gsm_two_params_at_command_finalize (GObject* obj) {
	FsoGsmTwoParamsAtCommand * self;
	self = FSO_GSM_TWO_PARAMS_AT_COMMAND (obj);
	_g_free0 (self->priv->name);
	((self->value1 == NULL) || (self->priv->t1_destroy_func == NULL)) ? NULL : (self->value1 = (self->priv->t1_destroy_func (self->value1), NULL));
	((self->value2 == NULL) || (self->priv->t2_destroy_func == NULL)) ? NULL : (self->value2 = (self->priv->t2_destroy_func (self->value2), NULL));
	G_OBJECT_CLASS (fso_gsm_two_params_at_command_parent_class)->finalize (obj);
}


GType fso_gsm_two_params_at_command_get_type (void) {
	static volatile gsize fso_gsm_two_params_at_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_two_params_at_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmTwoParamsAtCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_two_params_at_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmTwoParamsAtCommand), 0, (GInstanceInitFunc) fso_gsm_two_params_at_command_instance_init, NULL };
		GType fso_gsm_two_params_at_command_type_id;
		fso_gsm_two_params_at_command_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "FsoGsmTwoParamsAtCommand", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_two_params_at_command_type_id__volatile, fso_gsm_two_params_at_command_type_id);
	}
	return fso_gsm_two_params_at_command_type_id__volatile;
}


static void _vala_fso_gsm_two_params_at_command_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FsoGsmTwoParamsAtCommand * self;
	self = FSO_GSM_TWO_PARAMS_AT_COMMAND (object);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_fso_gsm_two_params_at_command_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FsoGsmTwoParamsAtCommand * self;
	self = FSO_GSM_TWO_PARAMS_AT_COMMAND (object);
	switch (property_id) {
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_TYPE:
		self->priv->t1_type = g_value_get_gtype (value);
		break;
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DUP_FUNC:
		self->priv->t1_dup_func = g_value_get_pointer (value);
		break;
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T1_DESTROY_FUNC:
		self->priv->t1_destroy_func = g_value_get_pointer (value);
		break;
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_TYPE:
		self->priv->t2_type = g_value_get_gtype (value);
		break;
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DUP_FUNC:
		self->priv->t2_dup_func = g_value_get_pointer (value);
		break;
		case FSO_GSM_TWO_PARAMS_AT_COMMAND_T2_DESTROY_FUNC:
		self->priv->t2_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


FsoGsmCustomAtCommand* fso_gsm_custom_at_command_construct (GType object_type, const gchar* name, gboolean prefixoptional) {
	FsoGsmCustomAtCommand * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (name != NULL, NULL);
	self = (FsoGsmCustomAtCommand*) fso_gsm_abstract_at_command_construct (object_type);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	_tmp2_ = prefixoptional;
	if (!_tmp2_) {
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar** _tmp5_ = NULL;
		_tmp3_ = name;
		_tmp4_ = g_strconcat (_tmp3_, ": ", NULL);
		_tmp5_ = g_new0 (gchar*, 1 + 1);
		_tmp5_[0] = _tmp4_;
		((FsoGsmAbstractAtCommand*) self)->prefix = (_vala_array_free (((FsoGsmAbstractAtCommand*) self)->prefix, ((FsoGsmAbstractAtCommand*) self)->prefix_length1, (GDestroyNotify) g_free), NULL);
		((FsoGsmAbstractAtCommand*) self)->prefix = _tmp5_;
		((FsoGsmAbstractAtCommand*) self)->prefix_length1 = 1;
	}
	return self;
}


FsoGsmCustomAtCommand* fso_gsm_custom_at_command_new (const gchar* name, gboolean prefixoptional) {
	return fso_gsm_custom_at_command_construct (FSO_GSM_TYPE_CUSTOM_AT_COMMAND, name, prefixoptional);
}


static gchar* fso_gsm_custom_at_command_real_execute (FsoGsmCustomAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = self->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_custom_at_command_execute (FsoGsmCustomAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_CUSTOM_AT_COMMAND_GET_CLASS (self)->execute (self);
}


static gchar* fso_gsm_custom_at_command_real_query (FsoGsmCustomAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = self->name;
	_tmp1_ = g_strconcat (_tmp0_, "?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_custom_at_command_query (FsoGsmCustomAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_CUSTOM_AT_COMMAND_GET_CLASS (self)->query (self);
}


static gchar* fso_gsm_custom_at_command_real_test (FsoGsmCustomAtCommand* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = self->name;
	_tmp1_ = g_strconcat (_tmp0_, "=?", NULL);
	result = _tmp1_;
	return result;
}


gchar* fso_gsm_custom_at_command_test (FsoGsmCustomAtCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FSO_GSM_CUSTOM_AT_COMMAND_GET_CLASS (self)->test (self);
}


static void fso_gsm_custom_at_command_class_init (FsoGsmCustomAtCommandClass * klass) {
	fso_gsm_custom_at_command_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_CUSTOM_AT_COMMAND_CLASS (klass)->execute = fso_gsm_custom_at_command_real_execute;
	FSO_GSM_CUSTOM_AT_COMMAND_CLASS (klass)->query = fso_gsm_custom_at_command_real_query;
	FSO_GSM_CUSTOM_AT_COMMAND_CLASS (klass)->test = fso_gsm_custom_at_command_real_test;
	G_OBJECT_CLASS (klass)->finalize = fso_gsm_custom_at_command_finalize;
}


static void fso_gsm_custom_at_command_instance_init (FsoGsmCustomAtCommand * self) {
}


static void fso_gsm_custom_at_command_finalize (GObject* obj) {
	FsoGsmCustomAtCommand * self;
	self = FSO_GSM_CUSTOM_AT_COMMAND (obj);
	_g_free0 (self->name);
	G_OBJECT_CLASS (fso_gsm_custom_at_command_parent_class)->finalize (obj);
}


/**
 * @class FsoGsm.CustomAtCommand
 *
 * Instances of CustomAtCommand can be used, when you have to wrap a command
 * that does not require special parsing or is not expensive to (re)create.
 * These classes must not be added to the common command table, hence can not
 * be created by the atCommandFactory() method in the base modem class.
 **/
GType fso_gsm_custom_at_command_get_type (void) {
	static volatile gsize fso_gsm_custom_at_command_type_id__volatile = 0;
	if (g_once_init_enter (&fso_gsm_custom_at_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FsoGsmCustomAtCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fso_gsm_custom_at_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FsoGsmCustomAtCommand), 0, (GInstanceInitFunc) fso_gsm_custom_at_command_instance_init, NULL };
		GType fso_gsm_custom_at_command_type_id;
		fso_gsm_custom_at_command_type_id = g_type_register_static (FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "FsoGsmCustomAtCommand", &g_define_type_info, 0);
		g_once_init_leave (&fso_gsm_custom_at_command_type_id__volatile, fso_gsm_custom_at_command_type_id);
	}
	return fso_gsm_custom_at_command_type_id__volatile;
}


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


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


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



