/* org-ofono.c generated by valac 0.27.1.3-6129, the Vala compiler
 * generated from org-ofono.vala, do not modify */

/*
 * Copyright (C) 2012 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *          Jeremy Whiting <jeremy.whiting@collabora.co.uk>
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>


#define ORG_OFONO_TYPE_MODEM_PROPERTIES (org_ofono_modem_properties_get_type ())
typedef struct _orgofonoModemProperties orgofonoModemProperties;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

#define ORG_OFONO_TYPE_MANAGER (org_ofono_manager_get_type ())
#define ORG_OFONO_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_OFONO_TYPE_MANAGER, orgofonoManager))
#define ORG_OFONO_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_OFONO_TYPE_MANAGER))
#define ORG_OFONO_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ORG_OFONO_TYPE_MANAGER, orgofonoManagerIface))

typedef struct _orgofonoManager orgofonoManager;
typedef struct _orgofonoManagerIface orgofonoManagerIface;

#define ORG_OFONO_TYPE_MANAGER_PROXY (org_ofono_manager_proxy_get_type ())
typedef GDBusProxy orgofonoManagerProxy;
typedef GDBusProxyClass orgofonoManagerProxyClass;

#define ORG_OFONO_TYPE_PHONEBOOK (org_ofono_phonebook_get_type ())
#define ORG_OFONO_PHONEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_OFONO_TYPE_PHONEBOOK, orgofonoPhonebook))
#define ORG_OFONO_IS_PHONEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_OFONO_TYPE_PHONEBOOK))
#define ORG_OFONO_PHONEBOOK_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ORG_OFONO_TYPE_PHONEBOOK, orgofonoPhonebookIface))

typedef struct _orgofonoPhonebook orgofonoPhonebook;
typedef struct _orgofonoPhonebookIface orgofonoPhonebookIface;

#define ORG_OFONO_TYPE_PHONEBOOK_PROXY (org_ofono_phonebook_proxy_get_type ())
typedef GDBusProxy orgofonoPhonebookProxy;
typedef GDBusProxyClass orgofonoPhonebookProxyClass;

#define ORG_OFONO_TYPE_SIM_MANAGER (org_ofono_sim_manager_get_type ())
#define ORG_OFONO_SIM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_OFONO_TYPE_SIM_MANAGER, orgofonoSimManager))
#define ORG_OFONO_IS_SIM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_OFONO_TYPE_SIM_MANAGER))
#define ORG_OFONO_SIM_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ORG_OFONO_TYPE_SIM_MANAGER, orgofonoSimManagerIface))

typedef struct _orgofonoSimManager orgofonoSimManager;
typedef struct _orgofonoSimManagerIface orgofonoSimManagerIface;

#define ORG_OFONO_TYPE_SIM_MANAGER_PROXY (org_ofono_sim_manager_proxy_get_type ())
typedef GDBusProxy orgofonoSimManagerProxy;
typedef GDBusProxyClass orgofonoSimManagerProxyClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _orgofonoModemProperties {
	char* path;
	GHashTable* properties;
};

struct _orgofonoManagerIface {
	GTypeInterface parent_iface;
	orgofonoModemProperties* (*GetModems) (orgofonoManager* self, int* result_length1, GError** error);
};

struct _orgofonoPhonebookIface {
	GTypeInterface parent_iface;
	gchar* (*Import) (orgofonoPhonebook* self, GError** error);
};

struct _orgofonoSimManagerIface {
	GTypeInterface parent_iface;
	GHashTable* (*GetProperties) (orgofonoSimManager* self, GError** error);
};



GType org_ofono_modem_properties_get_type (void) G_GNUC_CONST;
orgofonoModemProperties* org_ofono_modem_properties_dup (const orgofonoModemProperties* self);
void org_ofono_modem_properties_free (orgofonoModemProperties* self);
void org_ofono_modem_properties_copy (const orgofonoModemProperties* self, orgofonoModemProperties* dest);
void org_ofono_modem_properties_destroy (orgofonoModemProperties* self);
GType org_ofono_manager_proxy_get_type (void) G_GNUC_CONST;
guint org_ofono_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType org_ofono_manager_get_type (void) G_GNUC_CONST;
orgofonoModemProperties* org_ofono_manager_GetModems (orgofonoManager* self, int* result_length1, GError** error);
static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void org_ofono_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
static void _dbus_handle_org_ofono_manager_modem_added (orgofonoManager* self, GVariant* parameters);
static void _dbus_handle_org_ofono_manager_modem_removed (orgofonoManager* self, GVariant* parameters);
static orgofonoModemProperties* org_ofono_manager_proxy_GetModems (orgofonoManager* self, int* result_length1, GError** error);
static void org_ofono_manager_proxy_org_ofono_manager_interface_init (orgofonoManagerIface* iface);
static void _vala_orgofonoModemProperties_array_free (orgofonoModemProperties* array, gint array_length);
static void _dbus_org_ofono_manager_GetModems (orgofonoManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void org_ofono_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
static GVariant* org_ofono_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
static gboolean org_ofono_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
static void _dbus_org_ofono_manager_modem_added (GObject* _sender, const char* path, GHashTable* properties, gpointer* _data);
static void _dbus_org_ofono_manager_modem_removed (GObject* _sender, const char* path, gpointer* _data);
static void _org_ofono_manager_unregister_object (gpointer user_data);
GType org_ofono_phonebook_proxy_get_type (void) G_GNUC_CONST;
guint org_ofono_phonebook_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType org_ofono_phonebook_get_type (void) G_GNUC_CONST;
gchar* org_ofono_phonebook_Import (orgofonoPhonebook* self, GError** error);
static void org_ofono_phonebook_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
static gchar* org_ofono_phonebook_proxy_Import (orgofonoPhonebook* self, GError** error);
static void org_ofono_phonebook_proxy_org_ofono_phonebook_interface_init (orgofonoPhonebookIface* iface);
static void _dbus_org_ofono_phonebook_Import (orgofonoPhonebook* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void org_ofono_phonebook_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
static GVariant* org_ofono_phonebook_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
static gboolean org_ofono_phonebook_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
static void _org_ofono_phonebook_unregister_object (gpointer user_data);
GType org_ofono_sim_manager_proxy_get_type (void) G_GNUC_CONST;
guint org_ofono_sim_manager_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType org_ofono_sim_manager_get_type (void) G_GNUC_CONST;
GHashTable* org_ofono_sim_manager_GetProperties (orgofonoSimManager* self, GError** error);
static void g_cclosure_user_marshal_VOID__STRING_VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void org_ofono_sim_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
static void _dbus_handle_org_ofono_sim_manager_property_changed (orgofonoSimManager* self, GVariant* parameters);
static GHashTable* org_ofono_sim_manager_proxy_GetProperties (orgofonoSimManager* self, GError** error);
static void org_ofono_sim_manager_proxy_org_ofono_sim_manager_interface_init (orgofonoSimManagerIface* iface);
static void _dbus_org_ofono_sim_manager_GetProperties (orgofonoSimManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void org_ofono_sim_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
static GVariant* org_ofono_sim_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
static gboolean org_ofono_sim_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
static void _dbus_org_ofono_sim_manager_property_changed (GObject* _sender, const gchar* property, GVariant* value, gpointer* _data);
static void _org_ofono_sim_manager_unregister_object (gpointer user_data);

static const GDBusArgInfo _org_ofono_manager_dbus_arg_info_GetModems_result = {-1, "result", "a(oa{sv})"};
static const GDBusArgInfo * const _org_ofono_manager_dbus_arg_info_GetModems_in[] = {NULL};
static const GDBusArgInfo * const _org_ofono_manager_dbus_arg_info_GetModems_out[] = {&_org_ofono_manager_dbus_arg_info_GetModems_result, NULL};
static const GDBusMethodInfo _org_ofono_manager_dbus_method_info_GetModems = {-1, "GetModems", (GDBusArgInfo **) (&_org_ofono_manager_dbus_arg_info_GetModems_in), (GDBusArgInfo **) (&_org_ofono_manager_dbus_arg_info_GetModems_out)};
static const GDBusMethodInfo * const _org_ofono_manager_dbus_method_info[] = {&_org_ofono_manager_dbus_method_info_GetModems, NULL};
static const GDBusArgInfo _org_ofono_manager_dbus_arg_info_modem_added_path = {-1, "path", "o"};
static const GDBusArgInfo _org_ofono_manager_dbus_arg_info_modem_added_properties = {-1, "properties", "a{sv}"};
static const GDBusArgInfo * const _org_ofono_manager_dbus_arg_info_modem_added[] = {&_org_ofono_manager_dbus_arg_info_modem_added_path, &_org_ofono_manager_dbus_arg_info_modem_added_properties, NULL};
static const GDBusSignalInfo _org_ofono_manager_dbus_signal_info_modem_added = {-1, "ModemAdded", (GDBusArgInfo **) (&_org_ofono_manager_dbus_arg_info_modem_added)};
static const GDBusArgInfo _org_ofono_manager_dbus_arg_info_modem_removed_path = {-1, "path", "o"};
static const GDBusArgInfo * const _org_ofono_manager_dbus_arg_info_modem_removed[] = {&_org_ofono_manager_dbus_arg_info_modem_removed_path, NULL};
static const GDBusSignalInfo _org_ofono_manager_dbus_signal_info_modem_removed = {-1, "ModemRemoved", (GDBusArgInfo **) (&_org_ofono_manager_dbus_arg_info_modem_removed)};
static const GDBusSignalInfo * const _org_ofono_manager_dbus_signal_info[] = {&_org_ofono_manager_dbus_signal_info_modem_added, &_org_ofono_manager_dbus_signal_info_modem_removed, NULL};
static const GDBusPropertyInfo * const _org_ofono_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _org_ofono_manager_dbus_interface_info = {-1, "org.ofono.Manager", (GDBusMethodInfo **) (&_org_ofono_manager_dbus_method_info), (GDBusSignalInfo **) (&_org_ofono_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_org_ofono_manager_dbus_property_info)};
static const GDBusInterfaceVTable _org_ofono_manager_dbus_interface_vtable = {org_ofono_manager_dbus_interface_method_call, org_ofono_manager_dbus_interface_get_property, org_ofono_manager_dbus_interface_set_property};
static const GDBusArgInfo _org_ofono_phonebook_dbus_arg_info_Import_result = {-1, "result", "s"};
static const GDBusArgInfo * const _org_ofono_phonebook_dbus_arg_info_Import_in[] = {NULL};
static const GDBusArgInfo * const _org_ofono_phonebook_dbus_arg_info_Import_out[] = {&_org_ofono_phonebook_dbus_arg_info_Import_result, NULL};
static const GDBusMethodInfo _org_ofono_phonebook_dbus_method_info_Import = {-1, "Import", (GDBusArgInfo **) (&_org_ofono_phonebook_dbus_arg_info_Import_in), (GDBusArgInfo **) (&_org_ofono_phonebook_dbus_arg_info_Import_out)};
static const GDBusMethodInfo * const _org_ofono_phonebook_dbus_method_info[] = {&_org_ofono_phonebook_dbus_method_info_Import, NULL};
static const GDBusSignalInfo * const _org_ofono_phonebook_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _org_ofono_phonebook_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _org_ofono_phonebook_dbus_interface_info = {-1, "org.ofono.Phonebook", (GDBusMethodInfo **) (&_org_ofono_phonebook_dbus_method_info), (GDBusSignalInfo **) (&_org_ofono_phonebook_dbus_signal_info), (GDBusPropertyInfo **) (&_org_ofono_phonebook_dbus_property_info)};
static const GDBusInterfaceVTable _org_ofono_phonebook_dbus_interface_vtable = {org_ofono_phonebook_dbus_interface_method_call, org_ofono_phonebook_dbus_interface_get_property, org_ofono_phonebook_dbus_interface_set_property};
static const GDBusArgInfo _org_ofono_sim_manager_dbus_arg_info_GetProperties_result = {-1, "result", "a{sv}"};
static const GDBusArgInfo * const _org_ofono_sim_manager_dbus_arg_info_GetProperties_in[] = {NULL};
static const GDBusArgInfo * const _org_ofono_sim_manager_dbus_arg_info_GetProperties_out[] = {&_org_ofono_sim_manager_dbus_arg_info_GetProperties_result, NULL};
static const GDBusMethodInfo _org_ofono_sim_manager_dbus_method_info_GetProperties = {-1, "GetProperties", (GDBusArgInfo **) (&_org_ofono_sim_manager_dbus_arg_info_GetProperties_in), (GDBusArgInfo **) (&_org_ofono_sim_manager_dbus_arg_info_GetProperties_out)};
static const GDBusMethodInfo * const _org_ofono_sim_manager_dbus_method_info[] = {&_org_ofono_sim_manager_dbus_method_info_GetProperties, NULL};
static const GDBusArgInfo _org_ofono_sim_manager_dbus_arg_info_property_changed_property = {-1, "property", "s"};
static const GDBusArgInfo _org_ofono_sim_manager_dbus_arg_info_property_changed_value = {-1, "value", "v"};
static const GDBusArgInfo * const _org_ofono_sim_manager_dbus_arg_info_property_changed[] = {&_org_ofono_sim_manager_dbus_arg_info_property_changed_property, &_org_ofono_sim_manager_dbus_arg_info_property_changed_value, NULL};
static const GDBusSignalInfo _org_ofono_sim_manager_dbus_signal_info_property_changed = {-1, "PropertyChanged", (GDBusArgInfo **) (&_org_ofono_sim_manager_dbus_arg_info_property_changed)};
static const GDBusSignalInfo * const _org_ofono_sim_manager_dbus_signal_info[] = {&_org_ofono_sim_manager_dbus_signal_info_property_changed, NULL};
static const GDBusPropertyInfo * const _org_ofono_sim_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _org_ofono_sim_manager_dbus_interface_info = {-1, "org.ofono.SimManager", (GDBusMethodInfo **) (&_org_ofono_sim_manager_dbus_method_info), (GDBusSignalInfo **) (&_org_ofono_sim_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_org_ofono_sim_manager_dbus_property_info)};
static const GDBusInterfaceVTable _org_ofono_sim_manager_dbus_interface_vtable = {org_ofono_sim_manager_dbus_interface_method_call, org_ofono_sim_manager_dbus_interface_get_property, org_ofono_sim_manager_dbus_interface_set_property};

static gpointer _g_hash_table_ref0 (gpointer self) {
	return self ? g_hash_table_ref (self) : NULL;
}


void org_ofono_modem_properties_copy (const orgofonoModemProperties* self, orgofonoModemProperties* dest) {
	const char* _tmp0_ = NULL;
	char* _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	GHashTable* _tmp3_ = NULL;
	_tmp0_ = (*self).path;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).path);
	(*dest).path = _tmp1_;
	_tmp2_ = (*self).properties;
	_tmp3_ = _g_hash_table_ref0 (_tmp2_);
	_g_hash_table_unref0 ((*dest).properties);
	(*dest).properties = _tmp3_;
}


void org_ofono_modem_properties_destroy (orgofonoModemProperties* self) {
	_g_free0 ((*self).path);
	_g_hash_table_unref0 ((*self).properties);
}


orgofonoModemProperties* org_ofono_modem_properties_dup (const orgofonoModemProperties* self) {
	orgofonoModemProperties* dup;
	dup = g_new0 (orgofonoModemProperties, 1);
	org_ofono_modem_properties_copy (self, dup);
	return dup;
}


void org_ofono_modem_properties_free (orgofonoModemProperties* self) {
	org_ofono_modem_properties_destroy (self);
	g_free (self);
}


GType org_ofono_modem_properties_get_type (void) {
	static volatile gsize org_ofono_modem_properties_type_id__volatile = 0;
	if (g_once_init_enter (&org_ofono_modem_properties_type_id__volatile)) {
		GType org_ofono_modem_properties_type_id;
		org_ofono_modem_properties_type_id = g_boxed_type_register_static ("orgofonoModemProperties", (GBoxedCopyFunc) org_ofono_modem_properties_dup, (GBoxedFreeFunc) org_ofono_modem_properties_free);
		g_once_init_leave (&org_ofono_modem_properties_type_id__volatile, org_ofono_modem_properties_type_id);
	}
	return org_ofono_modem_properties_type_id__volatile;
}


orgofonoModemProperties* org_ofono_manager_GetModems (orgofonoManager* self, int* result_length1, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return ORG_OFONO_MANAGER_GET_INTERFACE (self)->GetModems (self, result_length1, error);
}


static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), data2);
}


static void org_ofono_manager_base_init (orgofonoManagerIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_signal_new ("modem_added", ORG_OFONO_TYPE_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_HASH_TABLE);
		g_signal_new ("modem_removed", ORG_OFONO_TYPE_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	}
}


GType org_ofono_manager_get_type (void) {
	static volatile gsize org_ofono_manager_type_id__volatile = 0;
	if (g_once_init_enter (&org_ofono_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (orgofonoManagerIface), (GBaseInitFunc) org_ofono_manager_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType org_ofono_manager_type_id;
		org_ofono_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "orgofonoManager", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (org_ofono_manager_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (org_ofono_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) org_ofono_manager_proxy_get_type);
		g_type_set_qdata (org_ofono_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.ofono.Manager");
		g_type_set_qdata (org_ofono_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_org_ofono_manager_dbus_interface_info));
		g_type_set_qdata (org_ofono_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) org_ofono_manager_register_object);
		g_once_init_leave (&org_ofono_manager_type_id__volatile, org_ofono_manager_type_id);
	}
	return org_ofono_manager_type_id__volatile;
}


G_DEFINE_TYPE_EXTENDED (orgofonoManagerProxy, org_ofono_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ORG_OFONO_TYPE_MANAGER, org_ofono_manager_proxy_org_ofono_manager_interface_init) )
static void org_ofono_manager_proxy_class_init (orgofonoManagerProxyClass* klass) {
	G_DBUS_PROXY_CLASS (klass)->g_signal = org_ofono_manager_proxy_g_signal;
}


static void _dbus_handle_org_ofono_manager_modem_added (orgofonoManager* self, GVariant* parameters) {
	GVariantIter _arguments_iter;
	char* path = NULL;
	GVariant* _tmp0_;
	GHashTable* properties = NULL;
	GVariant* _tmp1_;
	GHashTable* _tmp2_;
	GVariantIter _tmp3_;
	GVariant* _tmp4_;
	GVariant* _tmp5_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	path = g_variant_dup_string (_tmp0_, NULL);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp2_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp3_, _tmp1_);
	while (g_variant_iter_loop (&_tmp3_, "{?*}", &_tmp4_, &_tmp5_)) {
		g_hash_table_insert (_tmp2_, g_variant_dup_string (_tmp4_, NULL), g_variant_get_variant (_tmp5_));
	}
	properties = _tmp2_;
	g_variant_unref (_tmp1_);
	g_signal_emit_by_name (self, "modem-added", path, properties);
	_g_free0 (path);
	_g_hash_table_unref0 (properties);
}


static void _dbus_handle_org_ofono_manager_modem_removed (orgofonoManager* self, GVariant* parameters) {
	GVariantIter _arguments_iter;
	char* path = NULL;
	GVariant* _tmp6_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	path = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	g_signal_emit_by_name (self, "modem-removed", path);
	_g_free0 (path);
}


static void org_ofono_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
	if (strcmp (signal_name, "ModemAdded") == 0) {
		_dbus_handle_org_ofono_manager_modem_added ((orgofonoManager*) proxy, parameters);
	} else if (strcmp (signal_name, "ModemRemoved") == 0) {
		_dbus_handle_org_ofono_manager_modem_removed ((orgofonoManager*) proxy, parameters);
	}
}


static void org_ofono_manager_proxy_init (orgofonoManagerProxy* self) {
}


static orgofonoModemProperties* org_ofono_manager_proxy_GetModems (orgofonoManager* self, int* result_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	orgofonoModemProperties* _result;
	int _result_length1;
	GVariant* _tmp7_;
	orgofonoModemProperties* _tmp8_;
	int _tmp8__length;
	int _tmp8__size;
	int _tmp8__length1;
	GVariantIter _tmp9_;
	GVariant* _tmp10_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.ofono.Manager", "GetModems");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp7_ = g_variant_iter_next_value (&_reply_iter);
	_tmp8_ = g_new (orgofonoModemProperties, 5);
	_tmp8__length = 0;
	_tmp8__size = 4;
	_tmp8__length1 = 0;
	g_variant_iter_init (&_tmp9_, _tmp7_);
	for (; (_tmp10_ = g_variant_iter_next_value (&_tmp9_)) != NULL; _tmp8__length1++) {
		orgofonoModemProperties _tmp11_;
		GVariantIter _tmp12_;
		GVariant* _tmp13_;
		GVariant* _tmp14_;
		GHashTable* _tmp15_;
		GVariantIter _tmp16_;
		GVariant* _tmp17_;
		GVariant* _tmp18_;
		if (_tmp8__size == _tmp8__length) {
			_tmp8__size = 2 * _tmp8__size;
			_tmp8_ = g_renew (orgofonoModemProperties, _tmp8_, _tmp8__size + 1);
		}
		g_variant_iter_init (&_tmp12_, _tmp10_);
		_tmp13_ = g_variant_iter_next_value (&_tmp12_);
		_tmp11_.path = g_variant_dup_string (_tmp13_, NULL);
		g_variant_unref (_tmp13_);
		_tmp14_ = g_variant_iter_next_value (&_tmp12_);
		_tmp15_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
		g_variant_iter_init (&_tmp16_, _tmp14_);
		while (g_variant_iter_loop (&_tmp16_, "{?*}", &_tmp17_, &_tmp18_)) {
			g_hash_table_insert (_tmp15_, g_variant_dup_string (_tmp17_, NULL), g_variant_get_variant (_tmp18_));
		}
		_tmp11_.properties = _tmp15_;
		g_variant_unref (_tmp14_);
		_tmp8_[_tmp8__length++] = _tmp11_;
		g_variant_unref (_tmp10_);
	}
	_result_length1 = _tmp8__length1;
	_result = _tmp8_;
	g_variant_unref (_tmp7_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}


static void org_ofono_manager_proxy_org_ofono_manager_interface_init (orgofonoManagerIface* iface) {
	iface->GetModems = org_ofono_manager_proxy_GetModems;
}


static void _vala_orgofonoModemProperties_array_free (orgofonoModemProperties* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			org_ofono_modem_properties_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void _dbus_org_ofono_manager_GetModems (orgofonoManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	orgofonoModemProperties* result;
	int result_length1 = 0;
	orgofonoModemProperties* _tmp19_;
	GVariantBuilder _tmp20_;
	int _tmp21_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = org_ofono_manager_GetModems (self, &result_length1, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_tmp19_ = result;
	g_variant_builder_init (&_tmp20_, G_VARIANT_TYPE ("a(oa{sv})"));
	for (_tmp21_ = 0; _tmp21_ < result_length1; _tmp21_++) {
		GVariantBuilder _tmp22_;
		GVariantBuilder _tmp23_;
		GHashTableIter _tmp24_;
		gpointer _tmp25_;
		gpointer _tmp26_;
		g_variant_builder_init (&_tmp22_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp22_, g_variant_new_object_path ((*_tmp19_).path));
		g_hash_table_iter_init (&_tmp24_, (*_tmp19_).properties);
		g_variant_builder_init (&_tmp23_, G_VARIANT_TYPE ("a{sv}"));
		while (g_hash_table_iter_next (&_tmp24_, &_tmp25_, &_tmp26_)) {
			gchar* _key;
			GVariant* _value;
			_key = (gchar*) _tmp25_;
			_value = (GVariant*) _tmp26_;
			g_variant_builder_add (&_tmp23_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
		}
		g_variant_builder_add_value (&_tmp22_, g_variant_builder_end (&_tmp23_));
		g_variant_builder_add_value (&_tmp20_, g_variant_builder_end (&_tmp22_));
		_tmp19_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp20_));
	result = (_vala_orgofonoModemProperties_array_free (result, result_length1), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void org_ofono_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "GetModems") == 0) {
		_dbus_org_ofono_manager_GetModems (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}


static GVariant* org_ofono_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}


static gboolean org_ofono_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}


static void _dbus_org_ofono_manager_modem_added (GObject* _sender, const char* path, GHashTable* properties, gpointer* _data) {
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp27_;
	GHashTableIter _tmp28_;
	gpointer _tmp29_;
	gpointer _tmp30_;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (path));
	g_hash_table_iter_init (&_tmp28_, properties);
	g_variant_builder_init (&_tmp27_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp28_, &_tmp29_, &_tmp30_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp29_;
		_value = (GVariant*) _tmp30_;
		g_variant_builder_add (&_tmp27_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp27_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.ofono.Manager", "ModemAdded", _arguments, NULL);
}


static void _dbus_org_ofono_manager_modem_removed (GObject* _sender, const char* path, gpointer* _data) {
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (path));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.ofono.Manager", "ModemRemoved", _arguments, NULL);
}


guint org_ofono_manager_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_org_ofono_manager_dbus_interface_info), &_org_ofono_manager_dbus_interface_vtable, data, _org_ofono_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "modem-added", (GCallback) _dbus_org_ofono_manager_modem_added, data);
	g_signal_connect (object, "modem-removed", (GCallback) _dbus_org_ofono_manager_modem_removed, data);
	return result;
}


static void _org_ofono_manager_unregister_object (gpointer user_data) {
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_org_ofono_manager_modem_added, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_org_ofono_manager_modem_removed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}


gchar* org_ofono_phonebook_Import (orgofonoPhonebook* self, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return ORG_OFONO_PHONEBOOK_GET_INTERFACE (self)->Import (self, error);
}


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


GType org_ofono_phonebook_get_type (void) {
	static volatile gsize org_ofono_phonebook_type_id__volatile = 0;
	if (g_once_init_enter (&org_ofono_phonebook_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (orgofonoPhonebookIface), (GBaseInitFunc) org_ofono_phonebook_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType org_ofono_phonebook_type_id;
		org_ofono_phonebook_type_id = g_type_register_static (G_TYPE_INTERFACE, "orgofonoPhonebook", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (org_ofono_phonebook_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (org_ofono_phonebook_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) org_ofono_phonebook_proxy_get_type);
		g_type_set_qdata (org_ofono_phonebook_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.ofono.Phonebook");
		g_type_set_qdata (org_ofono_phonebook_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_org_ofono_phonebook_dbus_interface_info));
		g_type_set_qdata (org_ofono_phonebook_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) org_ofono_phonebook_register_object);
		g_once_init_leave (&org_ofono_phonebook_type_id__volatile, org_ofono_phonebook_type_id);
	}
	return org_ofono_phonebook_type_id__volatile;
}


G_DEFINE_TYPE_EXTENDED (orgofonoPhonebookProxy, org_ofono_phonebook_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ORG_OFONO_TYPE_PHONEBOOK, org_ofono_phonebook_proxy_org_ofono_phonebook_interface_init) )
static void org_ofono_phonebook_proxy_class_init (orgofonoPhonebookProxyClass* klass) {
	G_DBUS_PROXY_CLASS (klass)->g_signal = org_ofono_phonebook_proxy_g_signal;
}


static void org_ofono_phonebook_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
}


static void org_ofono_phonebook_proxy_init (orgofonoPhonebookProxy* self) {
}


static gchar* org_ofono_phonebook_proxy_Import (orgofonoPhonebook* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result;
	GVariant* _tmp31_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.ofono.Phonebook", "Import");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp31_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp31_, NULL);
	g_variant_unref (_tmp31_);
	g_object_unref (_reply_message);
	return _result;
}


static void org_ofono_phonebook_proxy_org_ofono_phonebook_interface_init (orgofonoPhonebookIface* iface) {
	iface->Import = org_ofono_phonebook_proxy_Import;
}


static void _dbus_org_ofono_phonebook_Import (orgofonoPhonebook* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = org_ofono_phonebook_Import (self, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void org_ofono_phonebook_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Import") == 0) {
		_dbus_org_ofono_phonebook_Import (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}


static GVariant* org_ofono_phonebook_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}


static gboolean org_ofono_phonebook_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}


guint org_ofono_phonebook_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_org_ofono_phonebook_dbus_interface_info), &_org_ofono_phonebook_dbus_interface_vtable, data, _org_ofono_phonebook_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}


static void _org_ofono_phonebook_unregister_object (gpointer user_data) {
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}


GHashTable* org_ofono_sim_manager_GetProperties (orgofonoSimManager* self, GError** error) {
	g_return_val_if_fail (self != NULL, NULL);
	return ORG_OFONO_SIM_MANAGER_GET_INTERFACE (self)->GetProperties (self, error);
}


static void g_cclosure_user_marshal_VOID__STRING_VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__STRING_VARIANT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_variant (param_values + 2), data2);
}


static void org_ofono_sim_manager_base_init (orgofonoSimManagerIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_signal_new ("property_changed", ORG_OFONO_TYPE_SIM_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_VARIANT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT);
	}
}


GType org_ofono_sim_manager_get_type (void) {
	static volatile gsize org_ofono_sim_manager_type_id__volatile = 0;
	if (g_once_init_enter (&org_ofono_sim_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (orgofonoSimManagerIface), (GBaseInitFunc) org_ofono_sim_manager_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType org_ofono_sim_manager_type_id;
		org_ofono_sim_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "orgofonoSimManager", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (org_ofono_sim_manager_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (org_ofono_sim_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) org_ofono_sim_manager_proxy_get_type);
		g_type_set_qdata (org_ofono_sim_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.ofono.SimManager");
		g_type_set_qdata (org_ofono_sim_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_org_ofono_sim_manager_dbus_interface_info));
		g_type_set_qdata (org_ofono_sim_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) org_ofono_sim_manager_register_object);
		g_once_init_leave (&org_ofono_sim_manager_type_id__volatile, org_ofono_sim_manager_type_id);
	}
	return org_ofono_sim_manager_type_id__volatile;
}


G_DEFINE_TYPE_EXTENDED (orgofonoSimManagerProxy, org_ofono_sim_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ORG_OFONO_TYPE_SIM_MANAGER, org_ofono_sim_manager_proxy_org_ofono_sim_manager_interface_init) )
static void org_ofono_sim_manager_proxy_class_init (orgofonoSimManagerProxyClass* klass) {
	G_DBUS_PROXY_CLASS (klass)->g_signal = org_ofono_sim_manager_proxy_g_signal;
}


static void _dbus_handle_org_ofono_sim_manager_property_changed (orgofonoSimManager* self, GVariant* parameters) {
	GVariantIter _arguments_iter;
	gchar* property = NULL;
	GVariant* _tmp32_;
	GVariant* value = NULL;
	GVariant* _tmp33_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp32_ = g_variant_iter_next_value (&_arguments_iter);
	property = g_variant_dup_string (_tmp32_, NULL);
	g_variant_unref (_tmp32_);
	_tmp33_ = g_variant_iter_next_value (&_arguments_iter);
	value = g_variant_get_variant (_tmp33_);
	g_variant_unref (_tmp33_);
	g_signal_emit_by_name (self, "property-changed", property, value);
	_g_free0 (property);
	_g_variant_unref0 (value);
}


static void org_ofono_sim_manager_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
	if (strcmp (signal_name, "PropertyChanged") == 0) {
		_dbus_handle_org_ofono_sim_manager_property_changed ((orgofonoSimManager*) proxy, parameters);
	}
}


static void org_ofono_sim_manager_proxy_init (orgofonoSimManagerProxy* self) {
}


static GHashTable* org_ofono_sim_manager_proxy_GetProperties (orgofonoSimManager* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GHashTable* _result;
	GVariant* _tmp34_;
	GHashTable* _tmp35_;
	GVariantIter _tmp36_;
	GVariant* _tmp37_;
	GVariant* _tmp38_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.ofono.SimManager", "GetProperties");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp34_ = g_variant_iter_next_value (&_reply_iter);
	_tmp35_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp36_, _tmp34_);
	while (g_variant_iter_loop (&_tmp36_, "{?*}", &_tmp37_, &_tmp38_)) {
		g_hash_table_insert (_tmp35_, g_variant_dup_string (_tmp37_, NULL), g_variant_get_variant (_tmp38_));
	}
	_result = _tmp35_;
	g_variant_unref (_tmp34_);
	g_object_unref (_reply_message);
	return _result;
}


static void org_ofono_sim_manager_proxy_org_ofono_sim_manager_interface_init (orgofonoSimManagerIface* iface) {
	iface->GetProperties = org_ofono_sim_manager_proxy_GetProperties;
}


static void _dbus_org_ofono_sim_manager_GetProperties (orgofonoSimManager* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GHashTable* result;
	GVariantBuilder _tmp39_;
	GHashTableIter _tmp40_;
	gpointer _tmp41_;
	gpointer _tmp42_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = org_ofono_sim_manager_GetProperties (self, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_hash_table_iter_init (&_tmp40_, result);
	g_variant_builder_init (&_tmp39_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp40_, &_tmp41_, &_tmp42_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp41_;
		_value = (GVariant*) _tmp42_;
		g_variant_builder_add (&_tmp39_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp39_));
	_g_hash_table_unref0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void org_ofono_sim_manager_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "GetProperties") == 0) {
		_dbus_org_ofono_sim_manager_GetProperties (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}


static GVariant* org_ofono_sim_manager_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}


static gboolean org_ofono_sim_manager_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) {
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}


static void _dbus_org_ofono_sim_manager_property_changed (GObject* _sender, const gchar* property, GVariant* value, gpointer* _data) {
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (property));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (value));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.ofono.SimManager", "PropertyChanged", _arguments, NULL);
}


guint org_ofono_sim_manager_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) {
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_org_ofono_sim_manager_dbus_interface_info), &_org_ofono_sim_manager_dbus_interface_vtable, data, _org_ofono_sim_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "property-changed", (GCallback) _dbus_org_ofono_sim_manager_property_changed, data);
	return result;
}


static void _org_ofono_sim_manager_unregister_object (gpointer user_data) {
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_org_ofono_sim_manager_property_changed, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}



