/* commands.c generated by valac 0.14.2, the Vala compiler
 * generated from commands.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 <fsogsm.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#define TI_CALYPSO_TYPE_PERCENT_CPMB (ti_calypso_percent_cpmb_get_type ())
#define TI_CALYPSO_PERCENT_CPMB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_CPMB, TiCalypsoPercentCPMB))
#define TI_CALYPSO_PERCENT_CPMB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_CPMB, TiCalypsoPercentCPMBClass))
#define TI_CALYPSO_IS_PERCENT_CPMB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_CPMB))
#define TI_CALYPSO_IS_PERCENT_CPMB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_CPMB))
#define TI_CALYPSO_PERCENT_CPMB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_CPMB, TiCalypsoPercentCPMBClass))

typedef struct _TiCalypsoPercentCPMB TiCalypsoPercentCPMB;
typedef struct _TiCalypsoPercentCPMBClass TiCalypsoPercentCPMBClass;
typedef struct _TiCalypsoPercentCPMBPrivate TiCalypsoPercentCPMBPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _fso_gsm_constants_unref0(var) ((var == NULL) ? NULL : (var = (fso_gsm_constants_unref (var), NULL)))

#define TI_CALYPSO_TYPE_PERCENT_CPRI (ti_calypso_percent_cpri_get_type ())
#define TI_CALYPSO_PERCENT_CPRI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_CPRI, TiCalypsoPercentCPRI))
#define TI_CALYPSO_PERCENT_CPRI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_CPRI, TiCalypsoPercentCPRIClass))
#define TI_CALYPSO_IS_PERCENT_CPRI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_CPRI))
#define TI_CALYPSO_IS_PERCENT_CPRI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_CPRI))
#define TI_CALYPSO_PERCENT_CPRI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_CPRI, TiCalypsoPercentCPRIClass))

typedef struct _TiCalypsoPercentCPRI TiCalypsoPercentCPRI;
typedef struct _TiCalypsoPercentCPRIClass TiCalypsoPercentCPRIClass;
typedef struct _TiCalypsoPercentCPRIPrivate TiCalypsoPercentCPRIPrivate;

#define TI_CALYPSO_PERCENT_CPRI_TYPE_STATUS (ti_calypso_percent_cpri_status_get_type ())

#define TI_CALYPSO_TYPE_PERCENT_CSTAT (ti_calypso_percent_cstat_get_type ())
#define TI_CALYPSO_PERCENT_CSTAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_CSTAT, TiCalypsoPercentCSTAT))
#define TI_CALYPSO_PERCENT_CSTAT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_CSTAT, TiCalypsoPercentCSTATClass))
#define TI_CALYPSO_IS_PERCENT_CSTAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_CSTAT))
#define TI_CALYPSO_IS_PERCENT_CSTAT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_CSTAT))
#define TI_CALYPSO_PERCENT_CSTAT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_CSTAT, TiCalypsoPercentCSTATClass))

typedef struct _TiCalypsoPercentCSTAT TiCalypsoPercentCSTAT;
typedef struct _TiCalypsoPercentCSTATClass TiCalypsoPercentCSTATClass;
typedef struct _TiCalypsoPercentCSTATPrivate TiCalypsoPercentCSTATPrivate;

#define TI_CALYPSO_TYPE_PERCENT_CSQ (ti_calypso_percent_csq_get_type ())
#define TI_CALYPSO_PERCENT_CSQ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_CSQ, TiCalypsoPercentCSQ))
#define TI_CALYPSO_PERCENT_CSQ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_CSQ, TiCalypsoPercentCSQClass))
#define TI_CALYPSO_IS_PERCENT_CSQ(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_CSQ))
#define TI_CALYPSO_IS_PERCENT_CSQ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_CSQ))
#define TI_CALYPSO_PERCENT_CSQ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_CSQ, TiCalypsoPercentCSQClass))

typedef struct _TiCalypsoPercentCSQ TiCalypsoPercentCSQ;
typedef struct _TiCalypsoPercentCSQClass TiCalypsoPercentCSQClass;
typedef struct _TiCalypsoPercentCSQPrivate TiCalypsoPercentCSQPrivate;

#define TI_CALYPSO_TYPE_PERCENT_EM21 (ti_calypso_percent_em21_get_type ())
#define TI_CALYPSO_PERCENT_EM21(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_EM21, TiCalypsoPercentEM21))
#define TI_CALYPSO_PERCENT_EM21_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_EM21, TiCalypsoPercentEM21Class))
#define TI_CALYPSO_IS_PERCENT_EM21(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_EM21))
#define TI_CALYPSO_IS_PERCENT_EM21_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_EM21))
#define TI_CALYPSO_PERCENT_EM21_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_EM21, TiCalypsoPercentEM21Class))

typedef struct _TiCalypsoPercentEM21 TiCalypsoPercentEM21;
typedef struct _TiCalypsoPercentEM21Class TiCalypsoPercentEM21Class;
typedef struct _TiCalypsoPercentEM21Private TiCalypsoPercentEM21Private;

#define TI_CALYPSO_TYPE_PERCENT_EM23 (ti_calypso_percent_em23_get_type ())
#define TI_CALYPSO_PERCENT_EM23(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_EM23, TiCalypsoPercentEM23))
#define TI_CALYPSO_PERCENT_EM23_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_EM23, TiCalypsoPercentEM23Class))
#define TI_CALYPSO_IS_PERCENT_EM23(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_EM23))
#define TI_CALYPSO_IS_PERCENT_EM23_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_EM23))
#define TI_CALYPSO_PERCENT_EM23_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_EM23, TiCalypsoPercentEM23Class))

typedef struct _TiCalypsoPercentEM23 TiCalypsoPercentEM23;
typedef struct _TiCalypsoPercentEM23Class TiCalypsoPercentEM23Class;
typedef struct _TiCalypsoPercentEM23Private TiCalypsoPercentEM23Private;

#define TI_CALYPSO_TYPE_PERCENT_PVRF (ti_calypso_percent_pvrf_get_type ())
#define TI_CALYPSO_PERCENT_PVRF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TI_CALYPSO_TYPE_PERCENT_PVRF, TiCalypsoPercentPVRF))
#define TI_CALYPSO_PERCENT_PVRF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TI_CALYPSO_TYPE_PERCENT_PVRF, TiCalypsoPercentPVRFClass))
#define TI_CALYPSO_IS_PERCENT_PVRF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TI_CALYPSO_TYPE_PERCENT_PVRF))
#define TI_CALYPSO_IS_PERCENT_PVRF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TI_CALYPSO_TYPE_PERCENT_PVRF))
#define TI_CALYPSO_PERCENT_PVRF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TI_CALYPSO_TYPE_PERCENT_PVRF, TiCalypsoPercentPVRFClass))

typedef struct _TiCalypsoPercentPVRF TiCalypsoPercentPVRF;
typedef struct _TiCalypsoPercentPVRFClass TiCalypsoPercentPVRFClass;
typedef struct _TiCalypsoPercentPVRFPrivate TiCalypsoPercentPVRFPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _TiCalypsoPercentCPMB {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentCPMBPrivate * priv;
	gchar* number;
};

struct _TiCalypsoPercentCPMBClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

typedef enum  {
	TI_CALYPSO_PERCENT_CPRI_STATUS_DISABLED = 0,
	TI_CALYPSO_PERCENT_CPRI_STATUS_ENABLED = 1,
	TI_CALYPSO_PERCENT_CPRI_STATUS_UNKNOWN = 2
} TiCalypsoPercentCPRIStatus;

struct _TiCalypsoPercentCPRI {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentCPRIPrivate * priv;
	TiCalypsoPercentCPRIStatus telcipher;
	TiCalypsoPercentCPRIStatus pdpcipher;
};

struct _TiCalypsoPercentCPRIClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _TiCalypsoPercentCSTAT {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentCSTATPrivate * priv;
	gchar* subsystem;
	gboolean ready;
};

struct _TiCalypsoPercentCSTATClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _TiCalypsoPercentCSQ {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentCSQPrivate * priv;
	gint strength;
};

struct _TiCalypsoPercentCSQClass {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _TiCalypsoPercentEM21 {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentEM21Private * priv;
	gint arfcn;
	gint c1;
	gint c2;
	gint rxlev;
	gint bsic;
	gint cid;
	gint dsc;
	gint txlev;
	gint tn;
	gint rlt;
	gint tav;
	gint rxlev_f;
	gint rxlev_s;
	gint rxqual_f;
	gint rxqual_s;
	gint lac;
	gint cba;
	gint cbq;
	gint ctype;
	gint vocoder;
};

struct _TiCalypsoPercentEM21Class {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _TiCalypsoPercentEM23 {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentEM23Private * priv;
	gint valid;
	gint* arfcn;
	gint arfcn_length1;
	gint* c1;
	gint c1_length1;
	gint* c2;
	gint c2_length1;
	gint* rxlev;
	gint rxlev_length1;
	gint* bsic;
	gint bsic_length1;
	gint* cid;
	gint cid_length1;
	gint* lac;
	gint lac_length1;
	gint* foffset;
	gint foffset_length1;
	gint* timea;
	gint timea_length1;
	gint* cba;
	gint cba_length1;
	gint* cbq;
	gint cbq_length1;
	gint* ctype;
	gint ctype_length1;
	gint* rac;
	gint rac_length1;
	gint* roffset;
	gint roffset_length1;
	gint* toffset;
	gint toffset_length1;
	gint* rxlevam;
	gint rxlevam_length1;
};

struct _TiCalypsoPercentEM23Class {
	FsoGsmAbstractAtCommandClass parent_class;
};

struct _TiCalypsoPercentPVRF {
	FsoGsmAbstractAtCommand parent_instance;
	TiCalypsoPercentPVRFPrivate * priv;
	gint pin;
	gint pin2;
	gint puk;
	gint puk2;
};

struct _TiCalypsoPercentPVRFClass {
	FsoGsmAbstractAtCommandClass parent_class;
};


static gpointer ti_calypso_percent_cpmb_parent_class = NULL;
static GType ti_calypso_percent_cpmb_type_id = 0;
static gpointer ti_calypso_percent_cpri_parent_class = NULL;
static GType ti_calypso_percent_cpri_type_id = 0;
static gpointer ti_calypso_percent_cstat_parent_class = NULL;
static GType ti_calypso_percent_cstat_type_id = 0;
static gpointer ti_calypso_percent_csq_parent_class = NULL;
static GType ti_calypso_percent_csq_type_id = 0;
static gpointer ti_calypso_percent_em21_parent_class = NULL;
static GType ti_calypso_percent_em21_type_id = 0;
static gpointer ti_calypso_percent_em23_parent_class = NULL;
static GType ti_calypso_percent_em23_type_id = 0;
static gpointer ti_calypso_percent_pvrf_parent_class = NULL;
static GType ti_calypso_percent_pvrf_type_id = 0;

GType ti_calypso_percent_cpmb_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_cpmb_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_CPMB_DUMMY_PROPERTY
};
TiCalypsoPercentCPMB* ti_calypso_percent_cpmb_new (void);
TiCalypsoPercentCPMB* ti_calypso_percent_cpmb_construct (GType object_type);
static void ti_calypso_percent_cpmb_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
gchar* ti_calypso_percent_cpmb_query (TiCalypsoPercentCPMB* self);
static void ti_calypso_percent_cpmb_finalize (GObject* obj);
GType ti_calypso_percent_cpri_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_cpri_register_type (GTypeModule * module);
GType ti_calypso_percent_cpri_status_get_type (void) G_GNUC_CONST;
enum  {
	TI_CALYPSO_PERCENT_CPRI_DUMMY_PROPERTY
};
TiCalypsoPercentCPRI* ti_calypso_percent_cpri_new (void);
TiCalypsoPercentCPRI* ti_calypso_percent_cpri_construct (GType object_type);
static void ti_calypso_percent_cpri_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
static void ti_calypso_percent_cpri_finalize (GObject* obj);
GType ti_calypso_percent_cstat_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_cstat_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_CSTAT_DUMMY_PROPERTY
};
TiCalypsoPercentCSTAT* ti_calypso_percent_cstat_new (void);
TiCalypsoPercentCSTAT* ti_calypso_percent_cstat_construct (GType object_type);
static void ti_calypso_percent_cstat_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
static void ti_calypso_percent_cstat_finalize (GObject* obj);
GType ti_calypso_percent_csq_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_csq_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_CSQ_DUMMY_PROPERTY
};
TiCalypsoPercentCSQ* ti_calypso_percent_csq_new (void);
TiCalypsoPercentCSQ* ti_calypso_percent_csq_construct (GType object_type);
static void ti_calypso_percent_csq_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
static void ti_calypso_percent_csq_finalize (GObject* obj);
GType ti_calypso_percent_em21_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_em21_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_EM21_DUMMY_PROPERTY
};
TiCalypsoPercentEM21* ti_calypso_percent_em21_new (void);
TiCalypsoPercentEM21* ti_calypso_percent_em21_construct (GType object_type);
static void ti_calypso_percent_em21_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
gchar* ti_calypso_percent_em21_query (TiCalypsoPercentEM21* self);
static void ti_calypso_percent_em21_finalize (GObject* obj);
GType ti_calypso_percent_em23_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_em23_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_EM23_DUMMY_PROPERTY
};
TiCalypsoPercentEM23* ti_calypso_percent_em23_new (void);
TiCalypsoPercentEM23* ti_calypso_percent_em23_construct (GType object_type);
static void ti_calypso_percent_em23_real_parseMulti (FsoGsmAbstractAtCommand* base, gchar** response, int response_length1, GError** error);
static void ti_calypso_percent_em23_fillArray (TiCalypsoPercentEM23* self, gint** array, int* array_length1, gint v1, gint v2, gint v3, gint v4, gint v5, gint v6);
gchar* ti_calypso_percent_em23_query (TiCalypsoPercentEM23* self);
static void ti_calypso_percent_em23_finalize (GObject* obj);
GType ti_calypso_percent_pvrf_get_type (void) G_GNUC_CONST;
GType ti_calypso_percent_pvrf_register_type (GTypeModule * module);
enum  {
	TI_CALYPSO_PERCENT_PVRF_DUMMY_PROPERTY
};
TiCalypsoPercentPVRF* ti_calypso_percent_pvrf_new (void);
TiCalypsoPercentPVRF* ti_calypso_percent_pvrf_construct (GType object_type);
static void ti_calypso_percent_pvrf_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error);
gchar* ti_calypso_percent_pvrf_query (TiCalypsoPercentPVRF* self);
static void ti_calypso_percent_pvrf_finalize (GObject* obj);
void ti_calypso_registerCustomAtCommands (GeeHashMap* table);
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);


TiCalypsoPercentCPMB* ti_calypso_percent_cpmb_construct (GType object_type) {
	TiCalypsoPercentCPMB * self = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCPMB*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%CPMB: (?P<id>\\d),(?P<type>\\d+),\"(?P<number>[\\+0-9*#w]*)\",(?P<typ" \
">\\d+)(?:,\"(?P<name>[^\"]*)\")?", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally0:
	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 NULL;
	}
	_tmp2_ = g_strdup ("%CPMB: ");
	_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;
}


TiCalypsoPercentCPMB* ti_calypso_percent_cpmb_new (void) {
	return ti_calypso_percent_cpmb_construct (TI_CALYPSO_TYPE_PERCENT_CPMB);
}


static void ti_calypso_percent_cpmb_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentCPMB * self;
	const gchar* _tmp0_;
	FsoGsmConstants* _tmp1_ = NULL;
	FsoGsmConstants* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gint _tmp5_ = 0;
	gchar* _tmp6_ = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCPMB*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_cpmb_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;
		}
	}
	_tmp1_ = fso_gsm_constants_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "number");
	_tmp4_ = _tmp3_;
	_tmp5_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "typ");
	_tmp6_ = fso_gsm_constants_phonenumberTupleToString (_tmp2_, _tmp4_, _tmp5_);
	_g_free0 (self->number);
	self->number = _tmp6_;
	_g_free0 (_tmp4_);
	_fso_gsm_constants_unref0 (_tmp2_);
}


gchar* ti_calypso_percent_cpmb_query (TiCalypsoPercentCPMB* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("%CPMB=1");
	result = _tmp0_;
	return result;
}


static void ti_calypso_percent_cpmb_class_init (TiCalypsoPercentCPMBClass * klass) {
	ti_calypso_percent_cpmb_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_cpmb_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_cpmb_finalize;
}


static void ti_calypso_percent_cpmb_instance_init (TiCalypsoPercentCPMB * self) {
}


static void ti_calypso_percent_cpmb_finalize (GObject* obj) {
	TiCalypsoPercentCPMB * self;
	self = TI_CALYPSO_PERCENT_CPMB (obj);
	_g_free0 (self->number);
	G_OBJECT_CLASS (ti_calypso_percent_cpmb_parent_class)->finalize (obj);
}


/**
 * %CPMB: SIM voice mailbox number
 **/
GType ti_calypso_percent_cpmb_get_type (void) {
	return ti_calypso_percent_cpmb_type_id;
}


GType ti_calypso_percent_cpmb_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentCPMBClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_cpmb_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentCPMB), 0, (GInstanceInitFunc) ti_calypso_percent_cpmb_instance_init, NULL };
	ti_calypso_percent_cpmb_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentCPMB", &g_define_type_info, 0);
	return ti_calypso_percent_cpmb_type_id;
}


GType ti_calypso_percent_cpri_status_get_type (void) {
	static volatile gsize ti_calypso_percent_cpri_status_type_id__volatile = 0;
	if (g_once_init_enter (&ti_calypso_percent_cpri_status_type_id__volatile)) {
		static const GEnumValue values[] = {{TI_CALYPSO_PERCENT_CPRI_STATUS_DISABLED, "TI_CALYPSO_PERCENT_CPRI_STATUS_DISABLED", "disabled"}, {TI_CALYPSO_PERCENT_CPRI_STATUS_ENABLED, "TI_CALYPSO_PERCENT_CPRI_STATUS_ENABLED", "enabled"}, {TI_CALYPSO_PERCENT_CPRI_STATUS_UNKNOWN, "TI_CALYPSO_PERCENT_CPRI_STATUS_UNKNOWN", "unknown"}, {0, NULL, NULL}};
		GType ti_calypso_percent_cpri_status_type_id;
		ti_calypso_percent_cpri_status_type_id = g_enum_register_static ("TiCalypsoPercentCPRIStatus", values);
		g_once_init_leave (&ti_calypso_percent_cpri_status_type_id__volatile, ti_calypso_percent_cpri_status_type_id);
	}
	return ti_calypso_percent_cpri_status_type_id__volatile;
}


TiCalypsoPercentCPRI* ti_calypso_percent_cpri_construct (GType object_type) {
	TiCalypsoPercentCPRI * self = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCPRI*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%CPRI: (?P<tel>[012]),(?P<pdp>[012])", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch1_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally1;
	__catch1_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
	return self;
}


TiCalypsoPercentCPRI* ti_calypso_percent_cpri_new (void) {
	return ti_calypso_percent_cpri_construct (TI_CALYPSO_TYPE_PERCENT_CPRI);
}


static void ti_calypso_percent_cpri_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentCPRI * self;
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCPRI*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_cpri_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;
		}
	}
	_tmp1_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "tel");
	self->telcipher = (TiCalypsoPercentCPRIStatus) _tmp1_;
	_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "pdp");
	self->pdpcipher = (TiCalypsoPercentCPRIStatus) _tmp2_;
}


static void ti_calypso_percent_cpri_class_init (TiCalypsoPercentCPRIClass * klass) {
	ti_calypso_percent_cpri_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_cpri_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_cpri_finalize;
}


static void ti_calypso_percent_cpri_instance_init (TiCalypsoPercentCPRI * self) {
}


static void ti_calypso_percent_cpri_finalize (GObject* obj) {
	TiCalypsoPercentCPRI * self;
	self = TI_CALYPSO_PERCENT_CPRI (obj);
	G_OBJECT_CLASS (ti_calypso_percent_cpri_parent_class)->finalize (obj);
}


/**
 * %CPRI: GSM / PDP cipher indication
 **/
GType ti_calypso_percent_cpri_get_type (void) {
	return ti_calypso_percent_cpri_type_id;
}


GType ti_calypso_percent_cpri_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentCPRIClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_cpri_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentCPRI), 0, (GInstanceInitFunc) ti_calypso_percent_cpri_instance_init, NULL };
	ti_calypso_percent_cpri_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentCPRI", &g_define_type_info, 0);
	return ti_calypso_percent_cpri_type_id;
}


TiCalypsoPercentCSTAT* ti_calypso_percent_cstat_construct (GType object_type) {
	TiCalypsoPercentCSTAT * self = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCSTAT*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%CSTAT: (?P<subsystem>[A-Z]+), (?P<ready>[01])", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch2_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally2;
	__catch2_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
	return self;
}


TiCalypsoPercentCSTAT* ti_calypso_percent_cstat_new (void) {
	return ti_calypso_percent_cstat_construct (TI_CALYPSO_TYPE_PERCENT_CSTAT);
}


static void ti_calypso_percent_cstat_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentCSTAT * self;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCSTAT*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_cstat_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;
		}
	}
	_tmp1_ = fso_gsm_abstract_at_command_to_string ((FsoGsmAbstractAtCommand*) self, "subsystem");
	_g_free0 (self->subsystem);
	self->subsystem = _tmp1_;
	_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "ready");
	self->ready = _tmp2_ == 1;
}


static void ti_calypso_percent_cstat_class_init (TiCalypsoPercentCSTATClass * klass) {
	ti_calypso_percent_cstat_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_cstat_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_cstat_finalize;
}


static void ti_calypso_percent_cstat_instance_init (TiCalypsoPercentCSTAT * self) {
}


static void ti_calypso_percent_cstat_finalize (GObject* obj) {
	TiCalypsoPercentCSTAT * self;
	self = TI_CALYPSO_PERCENT_CSTAT (obj);
	_g_free0 (self->subsystem);
	G_OBJECT_CLASS (ti_calypso_percent_cstat_parent_class)->finalize (obj);
}


/**
 * %CSTAT: Subsystem readyness indication
 **/
GType ti_calypso_percent_cstat_get_type (void) {
	return ti_calypso_percent_cstat_type_id;
}


GType ti_calypso_percent_cstat_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentCSTATClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_cstat_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentCSTAT), 0, (GInstanceInitFunc) ti_calypso_percent_cstat_instance_init, NULL };
	ti_calypso_percent_cstat_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentCSTAT", &g_define_type_info, 0);
	return ti_calypso_percent_cstat_type_id;
}


TiCalypsoPercentCSQ* ti_calypso_percent_csq_construct (GType object_type) {
	TiCalypsoPercentCSQ * self = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCSQ*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%CSQ: (?P<signal>\\d+), (?:\\d+), \\d", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch3_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally3;
	__catch3_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
	return self;
}


TiCalypsoPercentCSQ* ti_calypso_percent_csq_new (void) {
	return ti_calypso_percent_csq_construct (TI_CALYPSO_TYPE_PERCENT_CSQ);
}


static void ti_calypso_percent_csq_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentCSQ * self;
	const gchar* _tmp0_;
	FsoGsmConstants* _tmp1_ = NULL;
	FsoGsmConstants* _tmp2_;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentCSQ*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_csq_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;
		}
	}
	_tmp1_ = fso_gsm_constants_instance ();
	_tmp2_ = _tmp1_;
	_tmp3_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "signal");
	_tmp4_ = fso_gsm_constants_networkSignalToPercentage (_tmp2_, _tmp3_);
	self->strength = _tmp4_;
	_fso_gsm_constants_unref0 (_tmp2_);
}


static void ti_calypso_percent_csq_class_init (TiCalypsoPercentCSQClass * klass) {
	ti_calypso_percent_csq_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_csq_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_csq_finalize;
}


static void ti_calypso_percent_csq_instance_init (TiCalypsoPercentCSQ * self) {
}


static void ti_calypso_percent_csq_finalize (GObject* obj) {
	TiCalypsoPercentCSQ * self;
	self = TI_CALYPSO_PERCENT_CSQ (obj);
	G_OBJECT_CLASS (ti_calypso_percent_csq_parent_class)->finalize (obj);
}


/**
 * %CSQ: Signal strength indication
 **/
GType ti_calypso_percent_csq_get_type (void) {
	return ti_calypso_percent_csq_type_id;
}


GType ti_calypso_percent_csq_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentCSQClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_csq_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentCSQ), 0, (GInstanceInitFunc) ti_calypso_percent_csq_instance_init, NULL };
	ti_calypso_percent_csq_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentCSQ", &g_define_type_info, 0);
	return ti_calypso_percent_csq_type_id;
}


TiCalypsoPercentEM21* ti_calypso_percent_em21_construct (GType object_type) {
	TiCalypsoPercentEM21 * self = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentEM21*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%EM: (?P<arfcn>\\d+),(?P<c1>\\d+),(?P<c2>\\d+),(?P<rxlev>\\d+),(?P<bsi" \
"c>\\d+),(?P<cid>\\d+),(?P<dsc>\\d+),(?P<txlev>\\d+),(?P<tn>\\d+),(?P<r" \
"lt>\\d+),(?P<tav>\\d+),(?P<rxlev_f>\\d+),(?P<rxlev_s>\\d+),(?P<rxqual_" \
"f>\\d+),(?P<rxqual_s>\\d+),(?P<lac>\\d+),(?P<cba>\\d+),(?P<cbq>\\d+),(" \
"?P<ctype>\\d+),(?P<vocoder>\\d+)", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch4_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally4;
	__catch4_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
	return self;
}


TiCalypsoPercentEM21* ti_calypso_percent_em21_new (void) {
	return ti_calypso_percent_em21_construct (TI_CALYPSO_TYPE_PERCENT_EM21);
}


static void ti_calypso_percent_em21_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentEM21 * self;
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	gint _tmp11_ = 0;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentEM21*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em21_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;
		}
	}
	_tmp1_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "arfcn");
	self->arfcn = _tmp1_;
	_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "c1");
	self->c1 = _tmp2_;
	_tmp3_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "c2");
	self->c2 = _tmp3_;
	_tmp4_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rxlev");
	self->rxlev = _tmp4_;
	_tmp5_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "bsic");
	self->bsic = _tmp5_;
	_tmp6_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "cid");
	self->cid = _tmp6_;
	_tmp7_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "dsc");
	self->dsc = _tmp7_;
	_tmp8_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "txlev");
	self->txlev = _tmp8_;
	_tmp9_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "tn");
	self->tn = _tmp9_;
	_tmp10_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rlt");
	self->rlt = _tmp10_;
	_tmp11_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "tav");
	self->tav = _tmp11_;
	_tmp12_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rxlev_f");
	self->rxlev_f = _tmp12_;
	_tmp13_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rxlev_s");
	self->rxlev_s = _tmp13_;
	_tmp14_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rxqual_f");
	self->rxqual_f = _tmp14_;
	_tmp15_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "rxqual_s");
	self->rxqual_s = _tmp15_;
	_tmp16_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "lac");
	self->lac = _tmp16_;
	_tmp17_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "cba");
	self->cba = _tmp17_;
	_tmp18_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "cbq");
	self->cbq = _tmp18_;
	_tmp19_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "ctype");
	self->ctype = _tmp19_;
	_tmp20_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "vocoder");
	self->vocoder = _tmp20_;
}


gchar* ti_calypso_percent_em21_query (TiCalypsoPercentEM21* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("%EM=2,1");
	result = _tmp0_;
	return result;
}


static void ti_calypso_percent_em21_class_init (TiCalypsoPercentEM21Class * klass) {
	ti_calypso_percent_em21_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_em21_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_em21_finalize;
}


static void ti_calypso_percent_em21_instance_init (TiCalypsoPercentEM21 * self) {
}


static void ti_calypso_percent_em21_finalize (GObject* obj) {
	TiCalypsoPercentEM21 * self;
	self = TI_CALYPSO_PERCENT_EM21 (obj);
	G_OBJECT_CLASS (ti_calypso_percent_em21_parent_class)->finalize (obj);
}


/**
 * %EM=2,1: Engineering Mode: Serving Cell Information
 **/
GType ti_calypso_percent_em21_get_type (void) {
	return ti_calypso_percent_em21_type_id;
}


GType ti_calypso_percent_em21_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentEM21Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_em21_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentEM21), 0, (GInstanceInitFunc) ti_calypso_percent_em21_instance_init, NULL };
	ti_calypso_percent_em21_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentEM21", &g_define_type_info, 0);
	return ti_calypso_percent_em21_type_id;
}


TiCalypsoPercentEM23* ti_calypso_percent_em23_construct (GType object_type) {
	TiCalypsoPercentEM23 * self = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentEM23*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("(?P<val1>\\d+),(?P<val2>\\d+),(?P<val3>\\d+),(?P<val4>\\d+),(?P<val5>\\" \
"d+),(?P<val6>\\d+)", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch5_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally5;
	__catch5_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__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 NULL;
	}
	((FsoGsmAbstractAtCommand*) self)->length = 1 + 16;
	return self;
}


TiCalypsoPercentEM23* ti_calypso_percent_em23_new (void) {
	return ti_calypso_percent_em23_construct (TI_CALYPSO_TYPE_PERCENT_EM23);
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _result_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static void ti_calypso_percent_em23_real_parseMulti (FsoGsmAbstractAtCommand* base, gchar** response, int response_length1, GError** error) {
	TiCalypsoPercentEM23 * self;
	gchar** _tmp0_;
	gint _tmp0__length1;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gchar** _tmp14_;
	gint _tmp14__length1;
	const gchar* _tmp15_;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gchar** _tmp22_;
	gint _tmp22__length1;
	const gchar* _tmp23_;
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gint _tmp28_ = 0;
	gint _tmp29_ = 0;
	gchar** _tmp30_;
	gint _tmp30__length1;
	const gchar* _tmp31_;
	gint _tmp32_ = 0;
	gint _tmp33_ = 0;
	gint _tmp34_ = 0;
	gint _tmp35_ = 0;
	gint _tmp36_ = 0;
	gint _tmp37_ = 0;
	gchar** _tmp38_;
	gint _tmp38__length1;
	const gchar* _tmp39_;
	gint _tmp40_ = 0;
	gint _tmp41_ = 0;
	gint _tmp42_ = 0;
	gint _tmp43_ = 0;
	gint _tmp44_ = 0;
	gint _tmp45_ = 0;
	gchar** _tmp46_;
	gint _tmp46__length1;
	const gchar* _tmp47_;
	gint _tmp48_ = 0;
	gint _tmp49_ = 0;
	gint _tmp50_ = 0;
	gint _tmp51_ = 0;
	gint _tmp52_ = 0;
	gint _tmp53_ = 0;
	gchar** _tmp54_;
	gint _tmp54__length1;
	const gchar* _tmp55_;
	gint _tmp56_ = 0;
	gint _tmp57_ = 0;
	gint _tmp58_ = 0;
	gint _tmp59_ = 0;
	gint _tmp60_ = 0;
	gint _tmp61_ = 0;
	gchar** _tmp62_;
	gint _tmp62__length1;
	const gchar* _tmp63_;
	gint _tmp64_ = 0;
	gint _tmp65_ = 0;
	gint _tmp66_ = 0;
	gint _tmp67_ = 0;
	gint _tmp68_ = 0;
	gint _tmp69_ = 0;
	gchar** _tmp70_;
	gint _tmp70__length1;
	const gchar* _tmp71_;
	gint _tmp72_ = 0;
	gint _tmp73_ = 0;
	gint _tmp74_ = 0;
	gint _tmp75_ = 0;
	gint _tmp76_ = 0;
	gint _tmp77_ = 0;
	gchar** _tmp78_;
	gint _tmp78__length1;
	const gchar* _tmp79_;
	gint _tmp80_ = 0;
	gint _tmp81_ = 0;
	gint _tmp82_ = 0;
	gint _tmp83_ = 0;
	gint _tmp84_ = 0;
	gint _tmp85_ = 0;
	gchar** _tmp86_;
	gint _tmp86__length1;
	const gchar* _tmp87_;
	gint _tmp88_ = 0;
	gint _tmp89_ = 0;
	gint _tmp90_ = 0;
	gint _tmp91_ = 0;
	gint _tmp92_ = 0;
	gint _tmp93_ = 0;
	gchar** _tmp94_;
	gint _tmp94__length1;
	const gchar* _tmp95_;
	gint _tmp96_ = 0;
	gint _tmp97_ = 0;
	gint _tmp98_ = 0;
	gint _tmp99_ = 0;
	gint _tmp100_ = 0;
	gint _tmp101_ = 0;
	gchar** _tmp102_;
	gint _tmp102__length1;
	const gchar* _tmp103_;
	gint _tmp104_ = 0;
	gint _tmp105_ = 0;
	gint _tmp106_ = 0;
	gint _tmp107_ = 0;
	gint _tmp108_ = 0;
	gint _tmp109_ = 0;
	gchar** _tmp110_;
	gint _tmp110__length1;
	const gchar* _tmp111_;
	gint _tmp112_ = 0;
	gint _tmp113_ = 0;
	gint _tmp114_ = 0;
	gint _tmp115_ = 0;
	gint _tmp116_ = 0;
	gint _tmp117_ = 0;
	gchar** _tmp118_;
	gint _tmp118__length1;
	const gchar* _tmp119_;
	gint _tmp120_ = 0;
	gint _tmp121_ = 0;
	gint _tmp122_ = 0;
	gint _tmp123_ = 0;
	gint _tmp124_ = 0;
	gint _tmp125_ = 0;
	gchar** _tmp126_;
	gint _tmp126__length1;
	const gchar* _tmp127_;
	gint _tmp128_ = 0;
	gint _tmp129_ = 0;
	gint _tmp130_ = 0;
	gint _tmp131_ = 0;
	gint _tmp132_ = 0;
	gint _tmp133_ = 0;
	gchar** _tmp134_;
	gint _tmp134__length1;
	const gchar* _tmp135_;
	gint _tmp136_ = 0;
	gint _tmp137_ = 0;
	gint _tmp138_ = 0;
	gint _tmp139_ = 0;
	gint _tmp140_ = 0;
	gint _tmp141_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentEM23*) base;
	_tmp0_ = response;
	_tmp0__length1 = response_length1;
	_tmp1_ = _tmp0_[0];
	_tmp2_ = g_str_has_prefix (_tmp1_, "%EM: ");
	if (!_tmp2_) {
		gchar** _tmp3_;
		gint _tmp3__length1;
		const gchar* _tmp4_;
		_tmp3_ = response;
		_tmp3__length1 = response_length1;
		_tmp4_ = _tmp3_[0];
		FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp4_, &_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;
			}
		}
	} else {
		gchar** _tmp5_;
		gint _tmp5__length1;
		const gchar* _tmp6_;
		gchar** _tmp7_;
		gchar** _tmp8_ = NULL;
		gchar** line0;
		gint line0_length1;
		gint _line0_size_;
		gchar** _tmp9_;
		gint _tmp9__length1;
		const gchar* _tmp10_;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_;
		gint _tmp13_ = 0;
		_tmp5_ = response;
		_tmp5__length1 = response_length1;
		_tmp6_ = _tmp5_[0];
		_tmp8_ = _tmp7_ = g_strsplit (_tmp6_, ":", 0);
		line0 = _tmp8_;
		line0_length1 = _vala_array_length (_tmp7_);
		_line0_size_ = line0_length1;
		_tmp9_ = line0;
		_tmp9__length1 = line0_length1;
		_tmp10_ = _tmp9_[1];
		_tmp11_ = string_strip (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = atoi (_tmp12_);
		self->valid = _tmp13_;
		_g_free0 (_tmp12_);
		line0 = (_vala_array_free (line0, line0_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp14_ = response;
	_tmp14__length1 = response_length1;
	_tmp15_ = _tmp14_[1];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp15_, &_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;
		}
	}
	_tmp16_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp17_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp18_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp19_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp20_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp21_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->arfcn, &self->arfcn_length1, _tmp16_, _tmp17_, _tmp18_, _tmp19_, _tmp20_, _tmp21_);
	_tmp22_ = response;
	_tmp22__length1 = response_length1;
	_tmp23_ = _tmp22_[2];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp23_, &_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;
		}
	}
	_tmp24_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp25_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp26_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp27_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp28_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp29_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->c1, &self->c1_length1, _tmp24_, _tmp25_, _tmp26_, _tmp27_, _tmp28_, _tmp29_);
	_tmp30_ = response;
	_tmp30__length1 = response_length1;
	_tmp31_ = _tmp30_[3];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp31_, &_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;
		}
	}
	_tmp32_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp33_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp34_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp35_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp36_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp37_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->c2, &self->c2_length1, _tmp32_, _tmp33_, _tmp34_, _tmp35_, _tmp36_, _tmp37_);
	_tmp38_ = response;
	_tmp38__length1 = response_length1;
	_tmp39_ = _tmp38_[4];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp39_, &_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;
		}
	}
	_tmp40_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp41_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp42_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp43_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp44_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp45_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->rxlev, &self->rxlev_length1, _tmp40_, _tmp41_, _tmp42_, _tmp43_, _tmp44_, _tmp45_);
	_tmp46_ = response;
	_tmp46__length1 = response_length1;
	_tmp47_ = _tmp46_[5];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp47_, &_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;
		}
	}
	_tmp48_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp49_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp50_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp51_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp52_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp53_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->bsic, &self->bsic_length1, _tmp48_, _tmp49_, _tmp50_, _tmp51_, _tmp52_, _tmp53_);
	_tmp54_ = response;
	_tmp54__length1 = response_length1;
	_tmp55_ = _tmp54_[6];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp55_, &_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;
		}
	}
	_tmp56_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp57_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp58_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp59_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp60_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp61_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->cid, &self->cid_length1, _tmp56_, _tmp57_, _tmp58_, _tmp59_, _tmp60_, _tmp61_);
	_tmp62_ = response;
	_tmp62__length1 = response_length1;
	_tmp63_ = _tmp62_[7];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp63_, &_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;
		}
	}
	_tmp64_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp65_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp66_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp67_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp68_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp69_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->lac, &self->lac_length1, _tmp64_, _tmp65_, _tmp66_, _tmp67_, _tmp68_, _tmp69_);
	_tmp70_ = response;
	_tmp70__length1 = response_length1;
	_tmp71_ = _tmp70_[8];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp71_, &_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;
		}
	}
	_tmp72_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp73_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp74_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp75_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp76_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp77_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->foffset, &self->foffset_length1, _tmp72_, _tmp73_, _tmp74_, _tmp75_, _tmp76_, _tmp77_);
	_tmp78_ = response;
	_tmp78__length1 = response_length1;
	_tmp79_ = _tmp78_[9];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp79_, &_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;
		}
	}
	_tmp80_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp81_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp82_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp83_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp84_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp85_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->timea, &self->timea_length1, _tmp80_, _tmp81_, _tmp82_, _tmp83_, _tmp84_, _tmp85_);
	_tmp86_ = response;
	_tmp86__length1 = response_length1;
	_tmp87_ = _tmp86_[10];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp87_, &_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;
		}
	}
	_tmp88_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp89_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp90_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp91_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp92_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp93_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->cba, &self->cba_length1, _tmp88_, _tmp89_, _tmp90_, _tmp91_, _tmp92_, _tmp93_);
	_tmp94_ = response;
	_tmp94__length1 = response_length1;
	_tmp95_ = _tmp94_[11];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp95_, &_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;
		}
	}
	_tmp96_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp97_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp98_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp99_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp100_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp101_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->cbq, &self->cbq_length1, _tmp96_, _tmp97_, _tmp98_, _tmp99_, _tmp100_, _tmp101_);
	_tmp102_ = response;
	_tmp102__length1 = response_length1;
	_tmp103_ = _tmp102_[12];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp103_, &_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;
		}
	}
	_tmp104_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp105_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp106_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp107_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp108_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp109_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->ctype, &self->ctype_length1, _tmp104_, _tmp105_, _tmp106_, _tmp107_, _tmp108_, _tmp109_);
	_tmp110_ = response;
	_tmp110__length1 = response_length1;
	_tmp111_ = _tmp110_[13];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp111_, &_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;
		}
	}
	_tmp112_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp113_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp114_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp115_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp116_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp117_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->rac, &self->rac_length1, _tmp112_, _tmp113_, _tmp114_, _tmp115_, _tmp116_, _tmp117_);
	_tmp118_ = response;
	_tmp118__length1 = response_length1;
	_tmp119_ = _tmp118_[14];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp119_, &_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;
		}
	}
	_tmp120_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp121_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp122_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp123_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp124_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp125_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->roffset, &self->roffset_length1, _tmp120_, _tmp121_, _tmp122_, _tmp123_, _tmp124_, _tmp125_);
	_tmp126_ = response;
	_tmp126__length1 = response_length1;
	_tmp127_ = _tmp126_[15];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp127_, &_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;
		}
	}
	_tmp128_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp129_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp130_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp131_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp132_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp133_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->toffset, &self->toffset_length1, _tmp128_, _tmp129_, _tmp130_, _tmp131_, _tmp132_, _tmp133_);
	_tmp134_ = response;
	_tmp134__length1 = response_length1;
	_tmp135_ = _tmp134_[16];
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_em23_parent_class)->parse (FSO_GSM_ABSTRACT_AT_COMMAND (self), _tmp135_, &_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;
		}
	}
	_tmp136_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val1");
	_tmp137_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val2");
	_tmp138_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val3");
	_tmp139_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val4");
	_tmp140_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val5");
	_tmp141_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "val6");
	ti_calypso_percent_em23_fillArray (self, &self->rxlevam, &self->rxlevam_length1, _tmp136_, _tmp137_, _tmp138_, _tmp139_, _tmp140_, _tmp141_);
}


static void ti_calypso_percent_em23_fillArray (TiCalypsoPercentEM23* self, gint** array, int* array_length1, gint v1, gint v2, gint v3, gint v4, gint v5, gint v6) {
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gint* _tmp6_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = v1;
	_tmp1_ = v2;
	_tmp2_ = v3;
	_tmp3_ = v4;
	_tmp4_ = v5;
	_tmp5_ = v6;
	_tmp6_ = g_new0 (gint, 6);
	_tmp6_[0] = _tmp0_;
	_tmp6_[1] = _tmp1_;
	_tmp6_[2] = _tmp2_;
	_tmp6_[3] = _tmp3_;
	_tmp6_[4] = _tmp4_;
	_tmp6_[5] = _tmp5_;
	*array = (g_free (*array), NULL);
	*array = _tmp6_;
	*array_length1 = 6;
}


gchar* ti_calypso_percent_em23_query (TiCalypsoPercentEM23* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("%EM=2,3");
	result = _tmp0_;
	return result;
}


static void ti_calypso_percent_em23_class_init (TiCalypsoPercentEM23Class * klass) {
	ti_calypso_percent_em23_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parseMulti = ti_calypso_percent_em23_real_parseMulti;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_em23_finalize;
}


static void ti_calypso_percent_em23_instance_init (TiCalypsoPercentEM23 * self) {
}


static void ti_calypso_percent_em23_finalize (GObject* obj) {
	TiCalypsoPercentEM23 * self;
	self = TI_CALYPSO_PERCENT_EM23 (obj);
	self->arfcn = (g_free (self->arfcn), NULL);
	self->c1 = (g_free (self->c1), NULL);
	self->c2 = (g_free (self->c2), NULL);
	self->rxlev = (g_free (self->rxlev), NULL);
	self->bsic = (g_free (self->bsic), NULL);
	self->cid = (g_free (self->cid), NULL);
	self->lac = (g_free (self->lac), NULL);
	self->foffset = (g_free (self->foffset), NULL);
	self->timea = (g_free (self->timea), NULL);
	self->cba = (g_free (self->cba), NULL);
	self->cbq = (g_free (self->cbq), NULL);
	self->ctype = (g_free (self->ctype), NULL);
	self->rac = (g_free (self->rac), NULL);
	self->roffset = (g_free (self->roffset), NULL);
	self->toffset = (g_free (self->toffset), NULL);
	self->rxlevam = (g_free (self->rxlevam), NULL);
	G_OBJECT_CLASS (ti_calypso_percent_em23_parent_class)->finalize (obj);
}


/**
 * %EM=2,3: Engineering Mode: Neighbour Cell Information
 **/
GType ti_calypso_percent_em23_get_type (void) {
	return ti_calypso_percent_em23_type_id;
}


GType ti_calypso_percent_em23_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentEM23Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_em23_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentEM23), 0, (GInstanceInitFunc) ti_calypso_percent_em23_instance_init, NULL };
	ti_calypso_percent_em23_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentEM23", &g_define_type_info, 0);
	return ti_calypso_percent_em23_type_id;
}


TiCalypsoPercentPVRF* ti_calypso_percent_pvrf_construct (GType object_type) {
	TiCalypsoPercentPVRF * self = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentPVRF*) fso_gsm_abstract_at_command_construct (object_type);
	{
		GRegex* _tmp0_;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("%PVRF: (?P<pin>\\d+), (?P<pin2>\\d+), (?P<puk>\\d+), (?P<puk2>\\d+), (" \
"?P<locked>\\d+), (?P<na4>-?\\d+)", 0, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch6_g_regex_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 NULL;
		}
		_g_regex_unref0 (((FsoGsmAbstractAtCommand*) self)->re);
		((FsoGsmAbstractAtCommand*) self)->re = _tmp1_;
	}
	goto __finally6;
	__catch6_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally6:
	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 NULL;
	}
	_tmp2_ = g_strdup ("%PVRF: ");
	_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;
}


TiCalypsoPercentPVRF* ti_calypso_percent_pvrf_new (void) {
	return ti_calypso_percent_pvrf_construct (TI_CALYPSO_TYPE_PERCENT_PVRF);
}


static void ti_calypso_percent_pvrf_real_parse (FsoGsmAbstractAtCommand* base, const gchar* response, GError** error) {
	TiCalypsoPercentPVRF * self;
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GError * _inner_error_ = NULL;
	self = (TiCalypsoPercentPVRF*) base;
	g_return_if_fail (response != NULL);
	_tmp0_ = response;
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (ti_calypso_percent_pvrf_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;
		}
	}
	_tmp1_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "pin");
	self->pin = _tmp1_;
	_tmp2_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "pin2");
	self->pin2 = _tmp2_;
	_tmp3_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "puk");
	self->puk = _tmp3_;
	_tmp4_ = fso_gsm_abstract_at_command_to_int ((FsoGsmAbstractAtCommand*) self, "puk2");
	self->puk2 = _tmp4_;
}


gchar* ti_calypso_percent_pvrf_query (TiCalypsoPercentPVRF* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("%PVRF?");
	result = _tmp0_;
	return result;
}


static void ti_calypso_percent_pvrf_class_init (TiCalypsoPercentPVRFClass * klass) {
	ti_calypso_percent_pvrf_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_ABSTRACT_AT_COMMAND_CLASS (klass)->parse = ti_calypso_percent_pvrf_real_parse;
	G_OBJECT_CLASS (klass)->finalize = ti_calypso_percent_pvrf_finalize;
}


static void ti_calypso_percent_pvrf_instance_init (TiCalypsoPercentPVRF * self) {
}


static void ti_calypso_percent_pvrf_finalize (GObject* obj) {
	TiCalypsoPercentPVRF * self;
	self = TI_CALYPSO_PERCENT_PVRF (obj);
	G_OBJECT_CLASS (ti_calypso_percent_pvrf_parent_class)->finalize (obj);
}


/**
 * %PVRF: SIM authentication counters
 **/
GType ti_calypso_percent_pvrf_get_type (void) {
	return ti_calypso_percent_pvrf_type_id;
}


GType ti_calypso_percent_pvrf_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (TiCalypsoPercentPVRFClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ti_calypso_percent_pvrf_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TiCalypsoPercentPVRF), 0, (GInstanceInitFunc) ti_calypso_percent_pvrf_instance_init, NULL };
	ti_calypso_percent_pvrf_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_ABSTRACT_AT_COMMAND, "TiCalypsoPercentPVRF", &g_define_type_info, 0);
	return ti_calypso_percent_pvrf_type_id;
}


/**
 * Register all custom commands
 **/
void ti_calypso_registerCustomAtCommands (GeeHashMap* table) {
	GeeHashMap* _tmp0_;
	TiCalypsoPercentCPMB* _tmp1_;
	TiCalypsoPercentCPMB* _tmp2_;
	GeeHashMap* _tmp3_;
	TiCalypsoPercentCPRI* _tmp4_;
	TiCalypsoPercentCPRI* _tmp5_;
	GeeHashMap* _tmp6_;
	TiCalypsoPercentCSTAT* _tmp7_;
	TiCalypsoPercentCSTAT* _tmp8_;
	GeeHashMap* _tmp9_;
	TiCalypsoPercentCSQ* _tmp10_;
	TiCalypsoPercentCSQ* _tmp11_;
	GeeHashMap* _tmp12_;
	TiCalypsoPercentEM21* _tmp13_;
	TiCalypsoPercentEM21* _tmp14_;
	GeeHashMap* _tmp15_;
	TiCalypsoPercentEM23* _tmp16_;
	TiCalypsoPercentEM23* _tmp17_;
	GeeHashMap* _tmp18_;
	TiCalypsoPercentPVRF* _tmp19_;
	TiCalypsoPercentPVRF* _tmp20_;
	g_return_if_fail (table != NULL);
	_tmp0_ = table;
	_tmp1_ = ti_calypso_percent_cpmb_new ();
	_tmp2_ = _tmp1_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, "%CPMB", (FsoGsmAtCommand*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = table;
	_tmp4_ = ti_calypso_percent_cpri_new ();
	_tmp5_ = _tmp4_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, "%CPRI", (FsoGsmAtCommand*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = table;
	_tmp7_ = ti_calypso_percent_cstat_new ();
	_tmp8_ = _tmp7_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, "%CSTAT", (FsoGsmAtCommand*) _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = table;
	_tmp10_ = ti_calypso_percent_csq_new ();
	_tmp11_ = _tmp10_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, "%CSQ", (FsoGsmAtCommand*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = table;
	_tmp13_ = ti_calypso_percent_em21_new ();
	_tmp14_ = _tmp13_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, "%EM21", (FsoGsmAtCommand*) _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = table;
	_tmp16_ = ti_calypso_percent_em23_new ();
	_tmp17_ = _tmp16_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, "%EM23", (FsoGsmAtCommand*) _tmp17_);
	_g_object_unref0 (_tmp17_);
	_tmp18_ = table;
	_tmp19_ = ti_calypso_percent_pvrf_new ();
	_tmp20_ = _tmp19_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp18_, "%PVRF", (FsoGsmAtCommand*) _tmp20_);
	_g_object_unref0 (_tmp20_);
}


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



