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

/*
 * Copyright (C) 2011 Simon Busch <morphis@gravedo.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 <gio/gio.h>
#include <freesmartphone.h>
#include <stdlib.h>
#include <string.h>
#include <radio.h>
#include <fsotransport.h>
#include <fsobasics.h>


#define TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY (samsung_device_get_functionality_get_type ())
#define SAMSUNG_DEVICE_GET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY, SamsungDeviceGetFunctionality))
#define SAMSUNG_DEVICE_GET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY, SamsungDeviceGetFunctionalityClass))
#define IS_SAMSUNG_DEVICE_GET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY))
#define IS_SAMSUNG_DEVICE_GET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY))
#define SAMSUNG_DEVICE_GET_FUNCTIONALITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY, SamsungDeviceGetFunctionalityClass))

typedef struct _SamsungDeviceGetFunctionality SamsungDeviceGetFunctionality;
typedef struct _SamsungDeviceGetFunctionalityClass SamsungDeviceGetFunctionalityClass;
typedef struct _SamsungDeviceGetFunctionalityPrivate SamsungDeviceGetFunctionalityPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _SamsungDeviceGetFunctionalityRunData SamsungDeviceGetFunctionalityRunData;

#define TYPE_SAMSUNG_DEVICE_GET_FEATURES (samsung_device_get_features_get_type ())
#define SAMSUNG_DEVICE_GET_FEATURES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAMSUNG_DEVICE_GET_FEATURES, SamsungDeviceGetFeatures))
#define SAMSUNG_DEVICE_GET_FEATURES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAMSUNG_DEVICE_GET_FEATURES, SamsungDeviceGetFeaturesClass))
#define IS_SAMSUNG_DEVICE_GET_FEATURES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAMSUNG_DEVICE_GET_FEATURES))
#define IS_SAMSUNG_DEVICE_GET_FEATURES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAMSUNG_DEVICE_GET_FEATURES))
#define SAMSUNG_DEVICE_GET_FEATURES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAMSUNG_DEVICE_GET_FEATURES, SamsungDeviceGetFeaturesClass))

typedef struct _SamsungDeviceGetFeatures SamsungDeviceGetFeatures;
typedef struct _SamsungDeviceGetFeaturesClass SamsungDeviceGetFeaturesClass;
typedef struct _SamsungDeviceGetFeaturesPrivate SamsungDeviceGetFeaturesPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _SamsungDeviceGetFeaturesRunData SamsungDeviceGetFeaturesRunData;

#define TYPE_SAMSUNG_DEVICE_GET_INFORMATION (samsung_device_get_information_get_type ())
#define SAMSUNG_DEVICE_GET_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAMSUNG_DEVICE_GET_INFORMATION, SamsungDeviceGetInformation))
#define SAMSUNG_DEVICE_GET_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAMSUNG_DEVICE_GET_INFORMATION, SamsungDeviceGetInformationClass))
#define IS_SAMSUNG_DEVICE_GET_INFORMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAMSUNG_DEVICE_GET_INFORMATION))
#define IS_SAMSUNG_DEVICE_GET_INFORMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAMSUNG_DEVICE_GET_INFORMATION))
#define SAMSUNG_DEVICE_GET_INFORMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAMSUNG_DEVICE_GET_INFORMATION, SamsungDeviceGetInformationClass))

typedef struct _SamsungDeviceGetInformation SamsungDeviceGetInformation;
typedef struct _SamsungDeviceGetInformationClass SamsungDeviceGetInformationClass;
typedef struct _SamsungDeviceGetInformationPrivate SamsungDeviceGetInformationPrivate;

#define SAMSUNG_TYPE_IPC_CHANNEL (samsung_ipc_channel_get_type ())
#define SAMSUNG_IPC_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAMSUNG_TYPE_IPC_CHANNEL, SamsungIpcChannel))
#define SAMSUNG_IPC_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAMSUNG_TYPE_IPC_CHANNEL, SamsungIpcChannelClass))
#define SAMSUNG_IS_IPC_CHANNEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAMSUNG_TYPE_IPC_CHANNEL))
#define SAMSUNG_IS_IPC_CHANNEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAMSUNG_TYPE_IPC_CHANNEL))
#define SAMSUNG_IPC_CHANNEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAMSUNG_TYPE_IPC_CHANNEL, SamsungIpcChannelClass))

typedef struct _SamsungIpcChannel SamsungIpcChannel;
typedef struct _SamsungIpcChannelClass SamsungIpcChannelClass;
typedef struct _SamsungDeviceGetInformationRunData SamsungDeviceGetInformationRunData;

#define TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS (samsung_device_get_power_status_get_type ())
#define SAMSUNG_DEVICE_GET_POWER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS, SamsungDeviceGetPowerStatus))
#define SAMSUNG_DEVICE_GET_POWER_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS, SamsungDeviceGetPowerStatusClass))
#define IS_SAMSUNG_DEVICE_GET_POWER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS))
#define IS_SAMSUNG_DEVICE_GET_POWER_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS))
#define SAMSUNG_DEVICE_GET_POWER_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS, SamsungDeviceGetPowerStatusClass))

typedef struct _SamsungDeviceGetPowerStatus SamsungDeviceGetPowerStatus;
typedef struct _SamsungDeviceGetPowerStatusClass SamsungDeviceGetPowerStatusClass;
typedef struct _SamsungDeviceGetPowerStatusPrivate SamsungDeviceGetPowerStatusPrivate;
typedef struct _SamsungDeviceGetPowerStatusRunData SamsungDeviceGetPowerStatusRunData;

#define TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY (samsung_device_set_functionality_get_type ())
#define SAMSUNG_DEVICE_SET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY, SamsungDeviceSetFunctionality))
#define SAMSUNG_DEVICE_SET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY, SamsungDeviceSetFunctionalityClass))
#define IS_SAMSUNG_DEVICE_SET_FUNCTIONALITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY))
#define IS_SAMSUNG_DEVICE_SET_FUNCTIONALITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY))
#define SAMSUNG_DEVICE_SET_FUNCTIONALITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY, SamsungDeviceSetFunctionalityClass))

typedef struct _SamsungDeviceSetFunctionality SamsungDeviceSetFunctionality;
typedef struct _SamsungDeviceSetFunctionalityClass SamsungDeviceSetFunctionalityClass;
typedef struct _SamsungDeviceSetFunctionalityPrivate SamsungDeviceSetFunctionalityPrivate;
typedef struct _SamsungDeviceSetFunctionalityRunData SamsungDeviceSetFunctionalityRunData;

struct _SamsungDeviceGetFunctionality {
	FsoGsmDeviceGetFunctionality parent_instance;
	SamsungDeviceGetFunctionalityPrivate * priv;
};

struct _SamsungDeviceGetFunctionalityClass {
	FsoGsmDeviceGetFunctionalityClass parent_class;
};

struct _SamsungDeviceGetFunctionalityRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SamsungDeviceGetFunctionality* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	FsoGsmModem* _tmp2_;
	FsoGsmModemData* _tmp3_;
	FsoGsmModemData* _tmp4_;
	gboolean _tmp5_;
	FsoGsmModem* _tmp6_;
	FsoGsmModemData* _tmp7_;
	FsoGsmModemData* _tmp8_;
	const gchar* _tmp9_;
};

struct _SamsungDeviceGetFeatures {
	FsoGsmDeviceGetFeatures parent_instance;
	SamsungDeviceGetFeaturesPrivate * priv;
};

struct _SamsungDeviceGetFeaturesClass {
	FsoGsmDeviceGetFeaturesClass parent_class;
};

struct _SamsungDeviceGetFeaturesRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SamsungDeviceGetFeatures* self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* _tmp3_;
	FsoGsmModem* _tmp4_;
	FsoGsmModemData* _tmp5_;
	FsoGsmModemData* data;
	GHashTable* _tmp6_;
	GHashTable* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	GVariant* _tmp10_;
	GHashTable* _tmp11_;
	GHashTable* _tmp12_;
	gchar* _tmp13_;
	gboolean _tmp14_;
	GVariant* _tmp15_;
	GHashTable* _tmp16_;
	GHashTable* _tmp17_;
	gchar* _tmp18_;
	gboolean _tmp19_;
	GVariant* _tmp20_;
	GHashTable* _tmp21_;
	GHashTable* _tmp22_;
	gchar* _tmp23_;
	gboolean _tmp24_;
	GVariant* _tmp25_;
	GHashTable* _tmp26_;
	GHashTable* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	GVariant* _tmp30_;
	GHashTable* _tmp31_;
	GHashTable* _tmp32_;
	gchar* _tmp33_;
	const gchar* _tmp34_;
	GVariant* _tmp35_;
};

struct _SamsungDeviceGetInformation {
	FsoGsmDeviceGetInformation parent_instance;
	SamsungDeviceGetInformationPrivate * priv;
};

struct _SamsungDeviceGetInformationClass {
	FsoGsmDeviceGetInformationClass parent_class;
};

struct _SamsungDeviceGetInformationRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SamsungDeviceGetInformation* self;
	struct ipc_message_info* response;
	FsoGsmModem* _tmp0_;
	FsoGsmChannel* _tmp1_;
	SamsungIpcChannel* channel;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GHashTable* _tmp4_;
	GHashTable* _tmp5_;
	GHashTable* _tmp6_;
	GHashTable* _tmp7_;
	gchar* _tmp8_;
	GVariant* _tmp9_;
	GHashTable* _tmp10_;
	GHashTable* _tmp11_;
	gchar* _tmp12_;
	GVariant* _tmp13_;
	SamsungIpcChannel* _tmp14_;
	guint8* _tmp15_;
	guint8* _tmp16_;
	gint _tmp16__length1;
	struct ipc_message_info* _tmp17_;
	struct ipc_message_info* _tmp18_;
	struct ipc_message_info* _tmp19_;
	guint8* _tmp20_;
	gint _tmp20__length1;
	struct ipc_misc_me_version* message;
	FsoFrameworkLogger* _tmp21_;
	gboolean _tmp22_;
	FsoFrameworkLogger* _tmp23_;
	struct ipc_misc_me_version* _tmp24_;
	guint8* _tmp25_;
	gint _tmp25__length1;
	const gchar* _tmp26_;
	struct ipc_misc_me_version* _tmp27_;
	guint8* _tmp28_;
	gint _tmp28__length1;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gboolean _tmp32_;
	FsoFrameworkLogger* _tmp33_;
	struct ipc_misc_me_version* _tmp34_;
	guint8* _tmp35_;
	gint _tmp35__length1;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gboolean _tmp39_;
	FsoFrameworkLogger* _tmp40_;
	struct ipc_misc_me_version* _tmp41_;
	guint8* _tmp42_;
	gint _tmp42__length1;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gboolean _tmp46_;
	GHashTable* _tmp47_;
	GHashTable* _tmp48_;
	gchar* _tmp49_;
	struct ipc_misc_me_version* _tmp50_;
	guint8* _tmp51_;
	gint _tmp51__length1;
	GVariant* _tmp52_;
	GHashTable* _tmp53_;
	GHashTable* _tmp54_;
	gchar* _tmp55_;
	struct ipc_misc_me_version* _tmp56_;
	guint8* _tmp57_;
	gint _tmp57__length1;
	GVariant* _tmp58_;
	GHashTable* _tmp59_;
	GHashTable* _tmp60_;
	gchar* _tmp61_;
	struct ipc_misc_me_version* _tmp62_;
	guint8* _tmp63_;
	gint _tmp63__length1;
	GVariant* _tmp64_;
	GHashTable* _tmp65_;
	GHashTable* _tmp66_;
	gchar* _tmp67_;
	struct ipc_misc_me_version* _tmp68_;
	guint8* _tmp69_;
	gint _tmp69__length1;
	GVariant* _tmp70_;
};

struct _SamsungDeviceGetPowerStatus {
	FsoGsmDeviceGetPowerStatus parent_instance;
	SamsungDeviceGetPowerStatusPrivate * priv;
};

struct _SamsungDeviceGetPowerStatusClass {
	FsoGsmDeviceGetPowerStatusClass parent_class;
};

struct _SamsungDeviceGetPowerStatusRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SamsungDeviceGetPowerStatus* self;
	FsoGsmModem* _tmp0_;
	FsoGsmChannel* _tmp1_;
	SamsungIpcChannel* channel;
};

struct _SamsungDeviceSetFunctionality {
	FsoGsmDeviceSetFunctionality parent_instance;
	SamsungDeviceSetFunctionalityPrivate * priv;
};

struct _SamsungDeviceSetFunctionalityClass {
	FsoGsmDeviceSetFunctionalityClass parent_class;
};

struct _SamsungDeviceSetFunctionalityRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	SamsungDeviceSetFunctionality* self;
	gchar* level;
	gboolean autoregister;
	gchar* pin;
	FsoGsmModem* _tmp0_;
	FsoGsmChannel* _tmp1_;
	SamsungIpcChannel* channel;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_;
	GError* _tmp6_;
	SamsungIpcChannel* _tmp7_;
	SamsungIpcChannel* _tmp8_;
	GError* _tmp9_;
	FsoGsmModem* _tmp10_;
	FsoGsmModemData* _tmp11_;
	FsoGsmModemData* data;
	FsoGsmModemData* _tmp12_;
	gboolean _tmp13_;
	const gchar* _tmp14_;
	FsoGsmModemData* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	FsoGsmModem* _tmp18_;
	FsoGsmWatchDog* _tmp19_;
	FsoGsmWatchDog* _tmp20_;
	GError * _inner_error_;
};


static gpointer samsung_device_get_functionality_parent_class = NULL;
static GType samsung_device_get_functionality_type_id = 0;
static gpointer samsung_device_get_features_parent_class = NULL;
static GType samsung_device_get_features_type_id = 0;
static gpointer samsung_device_get_information_parent_class = NULL;
static GType samsung_device_get_information_type_id = 0;
static gpointer samsung_device_get_power_status_parent_class = NULL;
static GType samsung_device_get_power_status_type_id = 0;
static gpointer samsung_device_set_functionality_parent_class = NULL;
static GType samsung_device_set_functionality_type_id = 0;

GType samsung_device_get_functionality_get_type (void) G_GNUC_CONST;
GType samsung_device_get_functionality_register_type (GTypeModule * module);
enum  {
	SAMSUNG_DEVICE_GET_FUNCTIONALITY_DUMMY_PROPERTY
};
static void samsung_device_get_functionality_real_run_data_free (gpointer _data);
static void samsung_device_get_functionality_real_run (FsoGsmDeviceGetFunctionality* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean samsung_device_get_functionality_real_run_co (SamsungDeviceGetFunctionalityRunData* _data_);
gchar* gatherFunctionalityLevel (void);
SamsungDeviceGetFunctionality* samsung_device_get_functionality_new (void);
SamsungDeviceGetFunctionality* samsung_device_get_functionality_construct (GType object_type);
GType samsung_device_get_features_get_type (void) G_GNUC_CONST;
GType samsung_device_get_features_register_type (GTypeModule * module);
enum  {
	SAMSUNG_DEVICE_GET_FEATURES_DUMMY_PROPERTY
};
static void samsung_device_get_features_real_run_data_free (gpointer _data);
static void samsung_device_get_features_real_run (FsoGsmDeviceGetFeatures* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean samsung_device_get_features_real_run_co (SamsungDeviceGetFeaturesRunData* _data_);
static void _g_free0_ (gpointer var);
static void _g_variant_unref0_ (gpointer var);
static GVariant* _variant_new5 (gboolean value);
static GVariant* _variant_new6 (gboolean value);
static GVariant* _variant_new7 (gboolean value);
static GVariant* _variant_new8 (gboolean value);
static GVariant* _variant_new9 (const gchar* value);
static GVariant* _variant_new10 (const gchar* value);
SamsungDeviceGetFeatures* samsung_device_get_features_new (void);
SamsungDeviceGetFeatures* samsung_device_get_features_construct (GType object_type);
GType samsung_device_get_information_get_type (void) G_GNUC_CONST;
GType samsung_device_get_information_register_type (GTypeModule * module);
enum  {
	SAMSUNG_DEVICE_GET_INFORMATION_DUMMY_PROPERTY
};
static void samsung_device_get_information_real_run_data_free (gpointer _data);
static void samsung_device_get_information_real_run (FsoGsmDeviceGetInformation* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean samsung_device_get_information_real_run_co (SamsungDeviceGetInformationRunData* _data_);
GType samsung_ipc_channel_get_type (void) G_GNUC_CONST;
GType samsung_ipc_channel_register_type (GTypeModule * module);
static GVariant* _variant_new11 (const gchar* value);
static GVariant* _variant_new12 (const gchar* value);
void samsung_ipc_channel_enqueue_async (SamsungIpcChannel* self, int type, unsigned short command, guint8* data, int data_length1, gint retry, gint timeout, GAsyncReadyCallback _callback_, gpointer _user_data_);
struct ipc_message_info* samsung_ipc_channel_enqueue_finish (SamsungIpcChannel* self, GAsyncResult* _res_);
static void samsung_device_get_information_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static GVariant* _variant_new13 (const gchar* value);
static GVariant* _variant_new14 (const gchar* value);
static GVariant* _variant_new15 (const gchar* value);
static GVariant* _variant_new16 (const gchar* value);
SamsungDeviceGetInformation* samsung_device_get_information_new (void);
SamsungDeviceGetInformation* samsung_device_get_information_construct (GType object_type);
GType samsung_device_get_power_status_get_type (void) G_GNUC_CONST;
GType samsung_device_get_power_status_register_type (GTypeModule * module);
enum  {
	SAMSUNG_DEVICE_GET_POWER_STATUS_DUMMY_PROPERTY
};
static void samsung_device_get_power_status_real_run_data_free (gpointer _data);
static void samsung_device_get_power_status_real_run (FsoGsmDeviceGetPowerStatus* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean samsung_device_get_power_status_real_run_co (SamsungDeviceGetPowerStatusRunData* _data_);
SamsungDeviceGetPowerStatus* samsung_device_get_power_status_new (void);
SamsungDeviceGetPowerStatus* samsung_device_get_power_status_construct (GType object_type);
GType samsung_device_set_functionality_get_type (void) G_GNUC_CONST;
GType samsung_device_set_functionality_register_type (GTypeModule * module);
enum  {
	SAMSUNG_DEVICE_SET_FUNCTIONALITY_DUMMY_PROPERTY
};
static void samsung_device_set_functionality_real_run_data_free (gpointer _data);
static void samsung_device_set_functionality_real_run (FsoGsmDeviceSetFunctionality* base, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean samsung_device_set_functionality_real_run_co (SamsungDeviceSetFunctionalityRunData* _data_);
void samsung_ipc_channel_update_modem_power_state (SamsungIpcChannel* self, gint16 state, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean samsung_ipc_channel_update_modem_power_state_finish (SamsungIpcChannel* self, GAsyncResult* _res_);
SamsungDeviceSetFunctionality* samsung_device_set_functionality_new (void);
SamsungDeviceSetFunctionality* samsung_device_set_functionality_construct (GType object_type);


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


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


static void samsung_device_get_functionality_real_run (FsoGsmDeviceGetFunctionality* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SamsungDeviceGetFunctionality * self;
	SamsungDeviceGetFunctionalityRunData* _data_;
	SamsungDeviceGetFunctionality* _tmp0_;
	self = (SamsungDeviceGetFunctionality*) base;
	_data_ = g_slice_new0 (SamsungDeviceGetFunctionalityRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, samsung_device_get_functionality_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, samsung_device_get_functionality_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	samsung_device_get_functionality_real_run_co (_data_);
}


static void samsung_device_get_functionality_real_run_finish (FsoGsmDeviceGetFunctionality* base, GAsyncResult* _res_, GError** error) {
	SamsungDeviceGetFunctionalityRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean samsung_device_get_functionality_real_run_co (SamsungDeviceGetFunctionalityRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gatherFunctionalityLevel ();
	_data_->_tmp1_ = _data_->_tmp0_;
	fso_gsm_device_get_functionality_set_level ((FsoGsmDeviceGetFunctionality*) _data_->self, _data_->_tmp1_);
	_g_free0 (_data_->_tmp1_);
	_data_->_tmp2_ = fso_gsm_theModem;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = fso_gsm_modem_data (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->_tmp4_->keepRegistration;
	fso_gsm_device_get_functionality_set_autoregister ((FsoGsmDeviceGetFunctionality*) _data_->self, _data_->_tmp5_);
	_g_object_unref0 (_data_->_tmp4_);
	_data_->_tmp6_ = fso_gsm_theModem;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = fso_gsm_modem_data (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _data_->_tmp8_->simPin;
	fso_gsm_device_get_functionality_set_pin ((FsoGsmDeviceGetFunctionality*) _data_->self, _data_->_tmp9_);
	_g_object_unref0 (_data_->_tmp8_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


SamsungDeviceGetFunctionality* samsung_device_get_functionality_construct (GType object_type) {
	SamsungDeviceGetFunctionality * self = NULL;
	self = (SamsungDeviceGetFunctionality*) fso_gsm_device_get_functionality_construct (object_type);
	return self;
}


SamsungDeviceGetFunctionality* samsung_device_get_functionality_new (void) {
	return samsung_device_get_functionality_construct (TYPE_SAMSUNG_DEVICE_GET_FUNCTIONALITY);
}


static void samsung_device_get_functionality_class_init (SamsungDeviceGetFunctionalityClass * klass) {
	samsung_device_get_functionality_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_DEVICE_GET_FUNCTIONALITY_CLASS (klass)->run = samsung_device_get_functionality_real_run;
	FSO_GSM_DEVICE_GET_FUNCTIONALITY_CLASS (klass)->run_finish = samsung_device_get_functionality_real_run_finish;
}


static void samsung_device_get_functionality_instance_init (SamsungDeviceGetFunctionality * self) {
}


GType samsung_device_get_functionality_get_type (void) {
	return samsung_device_get_functionality_type_id;
}


GType samsung_device_get_functionality_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SamsungDeviceGetFunctionalityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) samsung_device_get_functionality_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SamsungDeviceGetFunctionality), 0, (GInstanceInitFunc) samsung_device_get_functionality_instance_init, NULL };
	samsung_device_get_functionality_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_DEVICE_GET_FUNCTIONALITY, "SamsungDeviceGetFunctionality", &g_define_type_info, 0);
	return samsung_device_get_functionality_type_id;
}


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


static void samsung_device_get_features_real_run (FsoGsmDeviceGetFeatures* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SamsungDeviceGetFeatures * self;
	SamsungDeviceGetFeaturesRunData* _data_;
	SamsungDeviceGetFeatures* _tmp0_;
	self = (SamsungDeviceGetFeatures*) base;
	_data_ = g_slice_new0 (SamsungDeviceGetFeaturesRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, samsung_device_get_features_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, samsung_device_get_features_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	samsung_device_get_features_real_run_co (_data_);
}


static void samsung_device_get_features_real_run_finish (FsoGsmDeviceGetFeatures* base, GAsyncResult* _res_, GError** error) {
	SamsungDeviceGetFeaturesRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


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


static GVariant* _variant_new5 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static GVariant* _variant_new6 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static GVariant* _variant_new7 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


static GVariant* _variant_new8 (gboolean value) {
	return g_variant_ref_sink (g_variant_new_boolean (value));
}


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


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


static gboolean samsung_device_get_features_real_run_co (SamsungDeviceGetFeaturesRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_str_hash;
	_data_->_tmp1_ = g_str_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, _g_variant_unref0_);
	_data_->_tmp3_ = _data_->_tmp2_;
	fso_gsm_device_get_features_set_features ((FsoGsmDeviceGetFeatures*) _data_->self, _data_->_tmp3_);
	_g_hash_table_unref0 (_data_->_tmp3_);
	_data_->_tmp4_ = fso_gsm_theModem;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = fso_gsm_modem_data (_data_->_tmp4_);
	_data_->data = _data_->_tmp5_;
	_data_->_tmp6_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = g_strdup ("gsm");
	_data_->_tmp9_ = _data_->data->supportsGSM;
	_data_->_tmp10_ = _variant_new5 (_data_->_tmp9_);
	g_hash_table_insert (_data_->_tmp7_, _data_->_tmp8_, _data_->_tmp10_);
	_data_->_tmp11_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = g_strdup ("voice");
	_data_->_tmp14_ = _data_->data->supportsVoice;
	_data_->_tmp15_ = _variant_new6 (_data_->_tmp14_);
	g_hash_table_insert (_data_->_tmp12_, _data_->_tmp13_, _data_->_tmp15_);
	_data_->_tmp16_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp17_ = _data_->_tmp16_;
	_data_->_tmp18_ = g_strdup ("cdma");
	_data_->_tmp19_ = _data_->data->supportsCDMA;
	_data_->_tmp20_ = _variant_new7 (_data_->_tmp19_);
	g_hash_table_insert (_data_->_tmp17_, _data_->_tmp18_, _data_->_tmp20_);
	_data_->_tmp21_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp22_ = _data_->_tmp21_;
	_data_->_tmp23_ = g_strdup ("csd");
	_data_->_tmp24_ = _data_->data->supportsCSD;
	_data_->_tmp25_ = _variant_new8 (_data_->_tmp24_);
	g_hash_table_insert (_data_->_tmp22_, _data_->_tmp23_, _data_->_tmp25_);
	_data_->_tmp26_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = g_strdup ("fax");
	_data_->_tmp29_ = _data_->data->supportsFAX;
	_data_->_tmp30_ = _variant_new9 (_data_->_tmp29_);
	g_hash_table_insert (_data_->_tmp27_, _data_->_tmp28_, _data_->_tmp30_);
	_data_->_tmp31_ = fso_gsm_device_get_features_get_features ((FsoGsmDeviceGetFeatures*) _data_->self);
	_data_->_tmp32_ = _data_->_tmp31_;
	_data_->_tmp33_ = g_strdup ("pdp");
	_data_->_tmp34_ = _data_->data->supportsPDP;
	_data_->_tmp35_ = _variant_new10 (_data_->_tmp34_);
	g_hash_table_insert (_data_->_tmp32_, _data_->_tmp33_, _data_->_tmp35_);
	_g_object_unref0 (_data_->data);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


SamsungDeviceGetFeatures* samsung_device_get_features_construct (GType object_type) {
	SamsungDeviceGetFeatures * self = NULL;
	self = (SamsungDeviceGetFeatures*) fso_gsm_device_get_features_construct (object_type);
	return self;
}


SamsungDeviceGetFeatures* samsung_device_get_features_new (void) {
	return samsung_device_get_features_construct (TYPE_SAMSUNG_DEVICE_GET_FEATURES);
}


static void samsung_device_get_features_class_init (SamsungDeviceGetFeaturesClass * klass) {
	samsung_device_get_features_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_DEVICE_GET_FEATURES_CLASS (klass)->run = samsung_device_get_features_real_run;
	FSO_GSM_DEVICE_GET_FEATURES_CLASS (klass)->run_finish = samsung_device_get_features_real_run_finish;
}


static void samsung_device_get_features_instance_init (SamsungDeviceGetFeatures * self) {
}


GType samsung_device_get_features_get_type (void) {
	return samsung_device_get_features_type_id;
}


GType samsung_device_get_features_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SamsungDeviceGetFeaturesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) samsung_device_get_features_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SamsungDeviceGetFeatures), 0, (GInstanceInitFunc) samsung_device_get_features_instance_init, NULL };
	samsung_device_get_features_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_DEVICE_GET_FEATURES, "SamsungDeviceGetFeatures", &g_define_type_info, 0);
	return samsung_device_get_features_type_id;
}


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


static void samsung_device_get_information_real_run (FsoGsmDeviceGetInformation* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SamsungDeviceGetInformation * self;
	SamsungDeviceGetInformationRunData* _data_;
	SamsungDeviceGetInformation* _tmp0_;
	self = (SamsungDeviceGetInformation*) base;
	_data_ = g_slice_new0 (SamsungDeviceGetInformationRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, samsung_device_get_information_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, samsung_device_get_information_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	samsung_device_get_information_real_run_co (_data_);
}


static void samsung_device_get_information_real_run_finish (FsoGsmDeviceGetInformation* base, GAsyncResult* _res_, GError** error) {
	SamsungDeviceGetInformationRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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


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


static void samsung_device_get_information_run_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	SamsungDeviceGetInformationRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	samsung_device_get_information_real_run_co (_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 GVariant* _variant_new13 (const gchar* value) {
	return g_variant_ref_sink (g_variant_new_string (value));
}


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


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


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


static gboolean samsung_device_get_information_real_run_co (SamsungDeviceGetInformationRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->response = NULL;
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = fso_gsm_modem_channel (_data_->_tmp0_, "main");
	_data_->channel = SAMSUNG_IS_IPC_CHANNEL (_data_->_tmp1_) ? ((SamsungIpcChannel*) _data_->_tmp1_) : NULL;
	_data_->_tmp2_ = g_str_hash;
	_data_->_tmp3_ = g_str_equal;
	_data_->_tmp4_ = g_hash_table_new_full (_data_->_tmp2_, _data_->_tmp3_, _g_free0_, _g_variant_unref0_);
	_data_->_tmp5_ = _data_->_tmp4_;
	fso_gsm_device_get_information_set_info ((FsoGsmDeviceGetInformation*) _data_->self, _data_->_tmp5_);
	_g_hash_table_unref0 (_data_->_tmp5_);
	_data_->_tmp6_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = g_strdup ("model");
	_data_->_tmp9_ = _variant_new11 ("Samsung Nexus S");
	g_hash_table_insert (_data_->_tmp7_, _data_->_tmp8_, _data_->_tmp9_);
	_data_->_tmp10_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = g_strdup ("manufacturer");
	_data_->_tmp13_ = _variant_new12 ("Samsung");
	g_hash_table_insert (_data_->_tmp11_, _data_->_tmp12_, _data_->_tmp13_);
	_data_->_tmp14_ = _data_->channel;
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = g_new0 (guint8, 1);
	_data_->_tmp15_[0] = (guint8) 0xff;
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp16__length1 = 1;
	_data_->_state_ = 1;
	samsung_ipc_channel_enqueue_async (_data_->_tmp14_, IPC_TYPE_GET, IPC_MISC_ME_VERSION, _data_->_tmp16_, 1, 0, 5, samsung_device_get_information_run_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = samsung_ipc_channel_enqueue_finish (_data_->_tmp14_, _data_->_res_);
	_data_->response = _data_->_tmp17_;
	_data_->_tmp16_ = (g_free (_data_->_tmp16_), NULL);
	_data_->_tmp18_ = _data_->response;
	if (_data_->_tmp18_ != NULL) {
		_data_->_tmp19_ = _data_->response;
		_data_->_tmp20_ = (*_data_->_tmp19_).data;
		_data_->_tmp20__length1 = (*_data_->_tmp19_).length;
		_data_->message = (struct ipc_misc_me_version*) _data_->_tmp20_;
		_data_->_tmp21_ = fso_framework_theLogger;
		_data_->_tmp22_ = FALSE;
		_data_->_tmp22_ = fso_framework_logger_debug (_data_->_tmp21_, "Baseband software version info:");
		g_assert (_data_->_tmp22_);
		_data_->_tmp23_ = fso_framework_theLogger;
		_data_->_tmp24_ = _data_->message;
		_data_->_tmp25_ = (*_data_->_tmp24_).sw_version;
		_data_->_tmp25__length1 = -1;
		_data_->_tmp26_ = NULL;
		_data_->_tmp26_ = string_to_string ((const gchar*) _data_->_tmp25_);
		_data_->_tmp27_ = _data_->message;
		_data_->_tmp28_ = (*_data_->_tmp27_).hw_version;
		_data_->_tmp28__length1 = -1;
		_data_->_tmp29_ = NULL;
		_data_->_tmp29_ = string_to_string ((const gchar*) _data_->_tmp28_);
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = g_strconcat (" sw_version = ", _data_->_tmp26_, ", hw_version = ", _data_->_tmp29_, NULL);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_tmp32_ = FALSE;
		_data_->_tmp32_ = fso_framework_logger_debug (_data_->_tmp23_, _data_->_tmp31_);
		g_assert (_data_->_tmp32_);
		_g_free0 (_data_->_tmp31_);
		_data_->_tmp33_ = fso_framework_theLogger;
		_data_->_tmp34_ = _data_->message;
		_data_->_tmp35_ = (*_data_->_tmp34_).cal_date;
		_data_->_tmp35__length1 = -1;
		_data_->_tmp36_ = NULL;
		_data_->_tmp36_ = string_to_string ((const gchar*) _data_->_tmp35_);
		_data_->_tmp37_ = NULL;
		_data_->_tmp37_ = g_strconcat (" cal_date = ", _data_->_tmp36_, NULL);
		_data_->_tmp38_ = _data_->_tmp37_;
		_data_->_tmp39_ = FALSE;
		_data_->_tmp39_ = fso_framework_logger_debug (_data_->_tmp33_, _data_->_tmp38_);
		g_assert (_data_->_tmp39_);
		_g_free0 (_data_->_tmp38_);
		_data_->_tmp40_ = fso_framework_theLogger;
		_data_->_tmp41_ = _data_->message;
		_data_->_tmp42_ = (*_data_->_tmp41_).misc;
		_data_->_tmp42__length1 = -1;
		_data_->_tmp43_ = NULL;
		_data_->_tmp43_ = string_to_string ((const gchar*) _data_->_tmp42_);
		_data_->_tmp44_ = NULL;
		_data_->_tmp44_ = g_strconcat (" misc = ", _data_->_tmp43_, NULL);
		_data_->_tmp45_ = _data_->_tmp44_;
		_data_->_tmp46_ = FALSE;
		_data_->_tmp46_ = fso_framework_logger_debug (_data_->_tmp40_, _data_->_tmp45_);
		g_assert (_data_->_tmp46_);
		_g_free0 (_data_->_tmp45_);
		_data_->_tmp47_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
		_data_->_tmp48_ = _data_->_tmp47_;
		_data_->_tmp49_ = g_strdup ("sw-version");
		_data_->_tmp50_ = _data_->message;
		_data_->_tmp51_ = (*_data_->_tmp50_).sw_version;
		_data_->_tmp51__length1 = -1;
		_data_->_tmp52_ = _variant_new13 ((const gchar*) _data_->_tmp51_);
		g_hash_table_insert (_data_->_tmp48_, _data_->_tmp49_, _data_->_tmp52_);
		_data_->_tmp53_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
		_data_->_tmp54_ = _data_->_tmp53_;
		_data_->_tmp55_ = g_strdup ("hw-version");
		_data_->_tmp56_ = _data_->message;
		_data_->_tmp57_ = (*_data_->_tmp56_).hw_version;
		_data_->_tmp57__length1 = -1;
		_data_->_tmp58_ = _variant_new14 ((const gchar*) _data_->_tmp57_);
		g_hash_table_insert (_data_->_tmp54_, _data_->_tmp55_, _data_->_tmp58_);
		_data_->_tmp59_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
		_data_->_tmp60_ = _data_->_tmp59_;
		_data_->_tmp61_ = g_strdup ("cal-date");
		_data_->_tmp62_ = _data_->message;
		_data_->_tmp63_ = (*_data_->_tmp62_).cal_date;
		_data_->_tmp63__length1 = -1;
		_data_->_tmp64_ = _variant_new15 ((const gchar*) _data_->_tmp63_);
		g_hash_table_insert (_data_->_tmp60_, _data_->_tmp61_, _data_->_tmp64_);
		_data_->_tmp65_ = fso_gsm_device_get_information_get_info ((FsoGsmDeviceGetInformation*) _data_->self);
		_data_->_tmp66_ = _data_->_tmp65_;
		_data_->_tmp67_ = g_strdup ("misc");
		_data_->_tmp68_ = _data_->message;
		_data_->_tmp69_ = (*_data_->_tmp68_).misc;
		_data_->_tmp69__length1 = -1;
		_data_->_tmp70_ = _variant_new16 ((const gchar*) _data_->_tmp69_);
		g_hash_table_insert (_data_->_tmp66_, _data_->_tmp67_, _data_->_tmp70_);
	}
	_g_object_unref0 (_data_->channel);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


SamsungDeviceGetInformation* samsung_device_get_information_construct (GType object_type) {
	SamsungDeviceGetInformation * self = NULL;
	self = (SamsungDeviceGetInformation*) fso_gsm_device_get_information_construct (object_type);
	return self;
}


SamsungDeviceGetInformation* samsung_device_get_information_new (void) {
	return samsung_device_get_information_construct (TYPE_SAMSUNG_DEVICE_GET_INFORMATION);
}


static void samsung_device_get_information_class_init (SamsungDeviceGetInformationClass * klass) {
	samsung_device_get_information_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_DEVICE_GET_INFORMATION_CLASS (klass)->run = samsung_device_get_information_real_run;
	FSO_GSM_DEVICE_GET_INFORMATION_CLASS (klass)->run_finish = samsung_device_get_information_real_run_finish;
}


static void samsung_device_get_information_instance_init (SamsungDeviceGetInformation * self) {
}


GType samsung_device_get_information_get_type (void) {
	return samsung_device_get_information_type_id;
}


GType samsung_device_get_information_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SamsungDeviceGetInformationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) samsung_device_get_information_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SamsungDeviceGetInformation), 0, (GInstanceInitFunc) samsung_device_get_information_instance_init, NULL };
	samsung_device_get_information_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_DEVICE_GET_INFORMATION, "SamsungDeviceGetInformation", &g_define_type_info, 0);
	return samsung_device_get_information_type_id;
}


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


static void samsung_device_get_power_status_real_run (FsoGsmDeviceGetPowerStatus* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SamsungDeviceGetPowerStatus * self;
	SamsungDeviceGetPowerStatusRunData* _data_;
	SamsungDeviceGetPowerStatus* _tmp0_;
	self = (SamsungDeviceGetPowerStatus*) base;
	_data_ = g_slice_new0 (SamsungDeviceGetPowerStatusRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, samsung_device_get_power_status_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, samsung_device_get_power_status_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	samsung_device_get_power_status_real_run_co (_data_);
}


static void samsung_device_get_power_status_real_run_finish (FsoGsmDeviceGetPowerStatus* base, GAsyncResult* _res_, GError** error) {
	SamsungDeviceGetPowerStatusRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean samsung_device_get_power_status_real_run_co (SamsungDeviceGetPowerStatusRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = fso_gsm_modem_channel (_data_->_tmp0_, "main");
	_data_->channel = SAMSUNG_IS_IPC_CHANNEL (_data_->_tmp1_) ? ((SamsungIpcChannel*) _data_->_tmp1_) : NULL;
	fso_gsm_device_get_power_status_set_status ((FsoGsmDeviceGetPowerStatus*) _data_->self, FREE_SMARTPHONE_DEVICE_POWER_STATUS_UNKNOWN);
	_g_object_unref0 (_data_->channel);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


SamsungDeviceGetPowerStatus* samsung_device_get_power_status_construct (GType object_type) {
	SamsungDeviceGetPowerStatus * self = NULL;
	self = (SamsungDeviceGetPowerStatus*) fso_gsm_device_get_power_status_construct (object_type);
	return self;
}


SamsungDeviceGetPowerStatus* samsung_device_get_power_status_new (void) {
	return samsung_device_get_power_status_construct (TYPE_SAMSUNG_DEVICE_GET_POWER_STATUS);
}


static void samsung_device_get_power_status_class_init (SamsungDeviceGetPowerStatusClass * klass) {
	samsung_device_get_power_status_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_DEVICE_GET_POWER_STATUS_CLASS (klass)->run = samsung_device_get_power_status_real_run;
	FSO_GSM_DEVICE_GET_POWER_STATUS_CLASS (klass)->run_finish = samsung_device_get_power_status_real_run_finish;
}


static void samsung_device_get_power_status_instance_init (SamsungDeviceGetPowerStatus * self) {
}


GType samsung_device_get_power_status_get_type (void) {
	return samsung_device_get_power_status_type_id;
}


GType samsung_device_get_power_status_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SamsungDeviceGetPowerStatusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) samsung_device_get_power_status_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SamsungDeviceGetPowerStatus), 0, (GInstanceInitFunc) samsung_device_get_power_status_instance_init, NULL };
	samsung_device_get_power_status_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_DEVICE_GET_POWER_STATUS, "SamsungDeviceGetPowerStatus", &g_define_type_info, 0);
	return samsung_device_get_power_status_type_id;
}


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


static void samsung_device_set_functionality_real_run (FsoGsmDeviceSetFunctionality* base, const gchar* level, gboolean autoregister, const gchar* pin, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	SamsungDeviceSetFunctionality * self;
	SamsungDeviceSetFunctionalityRunData* _data_;
	SamsungDeviceSetFunctionality* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	self = (SamsungDeviceSetFunctionality*) base;
	_data_ = g_slice_new0 (SamsungDeviceSetFunctionalityRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, samsung_device_set_functionality_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, samsung_device_set_functionality_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = level;
	_tmp2_ = g_strdup (_tmp1_);
	_data_->level = _tmp2_;
	_tmp3_ = autoregister;
	_data_->autoregister = _tmp3_;
	_tmp4_ = pin;
	_tmp5_ = g_strdup (_tmp4_);
	_data_->pin = _tmp5_;
	samsung_device_set_functionality_real_run_co (_data_);
}


static void samsung_device_set_functionality_real_run_finish (FsoGsmDeviceSetFunctionality* base, GAsyncResult* _res_, GError** error) {
	SamsungDeviceSetFunctionalityRunData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean samsung_device_set_functionality_real_run_co (SamsungDeviceSetFunctionalityRunData* _data_) {
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	static GQuark _tmp4_label2 = 0;
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = fso_gsm_theModem;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = fso_gsm_modem_channel (_data_->_tmp0_, "main");
	_data_->channel = SAMSUNG_IS_IPC_CHANNEL (_data_->_tmp1_) ? ((SamsungIpcChannel*) _data_->_tmp1_) : NULL;
	_data_->_tmp2_ = _data_->level;
	_data_->_tmp5_ = 0U;
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp5_ = (NULL == _data_->_tmp3_) ? 0 : g_quark_from_string (_data_->_tmp3_);
	if (_data_->_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("minimal")))) {
		switch (0) {
			default:
			{
				_data_->_tmp6_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_UNSUPPORTED, "Setting functionality to minimal is not supported");
				_data_->_inner_error_ = _data_->_tmp6_;
				if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
					g_error_free (_data_->_inner_error_);
					_g_object_unref0 (_data_->channel);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				} else {
					_g_object_unref0 (_data_->channel);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("airplane")))) {
		switch (0) {
			default:
			{
				_data_->_tmp7_ = _data_->channel;
				samsung_ipc_channel_update_modem_power_state (_data_->_tmp7_, IPC_PWR_PHONE_STATE_LPM, NULL, NULL);
				break;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string ("full")))) {
		switch (0) {
			default:
			{
				_data_->_tmp8_ = _data_->channel;
				samsung_ipc_channel_update_modem_power_state (_data_->_tmp8_, IPC_PWR_PHONE_STATE_NORMAL, NULL, NULL);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				_data_->_tmp9_ = g_error_new_literal (FREE_SMARTPHONE_ERROR, FREE_SMARTPHONE_ERROR_INVALID_PARAMETER, "Functionality needs to be one of \"minimal\", \"airplane\", or \"full\"" \
".");
				_data_->_inner_error_ = _data_->_tmp9_;
				if ((_data_->_inner_error_->domain == FREE_SMARTPHONE_GSM_ERROR) || (_data_->_inner_error_->domain == FREE_SMARTPHONE_ERROR)) {
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
					g_error_free (_data_->_inner_error_);
					_g_object_unref0 (_data_->channel);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				} else {
					_g_object_unref0 (_data_->channel);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
					g_clear_error (&_data_->_inner_error_);
					return FALSE;
				}
			}
		}
	}
	_data_->_tmp10_ = fso_gsm_theModem;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = fso_gsm_modem_data (_data_->_tmp10_);
	_data_->data = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->data;
	_data_->_tmp13_ = _data_->autoregister;
	_data_->_tmp12_->keepRegistration = _data_->_tmp13_;
	_data_->_tmp14_ = _data_->pin;
	if (g_strcmp0 (_data_->_tmp14_, "") != 0) {
		_data_->_tmp15_ = _data_->data;
		_data_->_tmp16_ = _data_->pin;
		_data_->_tmp17_ = g_strdup (_data_->_tmp16_);
		_g_free0 (_data_->_tmp15_->simPin);
		_data_->_tmp15_->simPin = _data_->_tmp17_;
		_data_->_tmp18_ = fso_gsm_theModem;
		_data_->_tmp19_ = fso_gsm_modem_get_watchdog (_data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		fso_gsm_watch_dog_resetUnlockMarker (_data_->_tmp20_);
	}
	_g_object_unref0 (_data_->data);
	_g_object_unref0 (_data_->channel);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


SamsungDeviceSetFunctionality* samsung_device_set_functionality_construct (GType object_type) {
	SamsungDeviceSetFunctionality * self = NULL;
	self = (SamsungDeviceSetFunctionality*) fso_gsm_device_set_functionality_construct (object_type);
	return self;
}


SamsungDeviceSetFunctionality* samsung_device_set_functionality_new (void) {
	return samsung_device_set_functionality_construct (TYPE_SAMSUNG_DEVICE_SET_FUNCTIONALITY);
}


static void samsung_device_set_functionality_class_init (SamsungDeviceSetFunctionalityClass * klass) {
	samsung_device_set_functionality_parent_class = g_type_class_peek_parent (klass);
	FSO_GSM_DEVICE_SET_FUNCTIONALITY_CLASS (klass)->run = samsung_device_set_functionality_real_run;
	FSO_GSM_DEVICE_SET_FUNCTIONALITY_CLASS (klass)->run_finish = samsung_device_set_functionality_real_run_finish;
}


static void samsung_device_set_functionality_instance_init (SamsungDeviceSetFunctionality * self) {
}


GType samsung_device_set_functionality_get_type (void) {
	return samsung_device_set_functionality_type_id;
}


GType samsung_device_set_functionality_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SamsungDeviceSetFunctionalityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) samsung_device_set_functionality_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SamsungDeviceSetFunctionality), 0, (GInstanceInitFunc) samsung_device_set_functionality_instance_init, NULL };
	samsung_device_set_functionality_type_id = g_type_module_register_type (module, FSO_GSM_TYPE_DEVICE_SET_FUNCTIONALITY, "SamsungDeviceSetFunctionality", &g_define_type_info, 0);
	return samsung_device_set_functionality_type_id;
}



