/* org-freedesktop-dbus-mock.c generated by valac 0.29.3.10-b87a, the Vala compiler
 * generated from org-freedesktop-dbus-mock.vala, do not modify */

/*
 * Copyright (C) 2013 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:
 *       Philip Withnall <philip.withnall@collabora.co.uk>
 */

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


#define ORG_FREEDESKTOP_DBUS_TYPE_MOCK (org_freedesktop_dbus_mock_get_type ())
#define ORG_FREEDESKTOP_DBUS_MOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_FREEDESKTOP_DBUS_TYPE_MOCK, orgfreedesktopDBusMock))
#define ORG_FREEDESKTOP_DBUS_IS_MOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_FREEDESKTOP_DBUS_TYPE_MOCK))
#define ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ORG_FREEDESKTOP_DBUS_TYPE_MOCK, orgfreedesktopDBusMockIface))

typedef struct _orgfreedesktopDBusMock orgfreedesktopDBusMock;
typedef struct _orgfreedesktopDBusMockIface orgfreedesktopDBusMockIface;

#define ORG_FREEDESKTOP_DBUS_TYPE_MOCK_PROXY (org_freedesktop_dbus_mock_proxy_get_type ())

#define ORG_FREEDESKTOP_DBUS_MOCK_TYPE_METHOD (org_freedesktop_dbus_mock_method_get_type ())
typedef struct _orgfreedesktopDBusMockMethod orgfreedesktopDBusMockMethod;

#define ORG_FREEDESKTOP_DBUS_MOCK_TYPE_CALL (org_freedesktop_dbus_mock_call_get_type ())
typedef struct _orgfreedesktopDBusMockCall orgfreedesktopDBusMockCall;

#define ORG_FREEDESKTOP_DBUS_MOCK_TYPE_METHOD_CALL (org_freedesktop_dbus_mock_method_call_get_type ())
typedef struct _orgfreedesktopDBusMockMethodCall orgfreedesktopDBusMockMethodCall;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef GDBusProxy orgfreedesktopDBusMockProxy;
typedef GDBusProxyClass orgfreedesktopDBusMockProxyClass;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))

struct _orgfreedesktopDBusMockMethod {
	gchar* name;
	gchar* in_sig;
	gchar* out_sig;
};

struct _orgfreedesktopDBusMockCall {
	guint64 call_time;
	gchar* method_name;
	GVariant** args;
	gint args_length1;
};

struct _orgfreedesktopDBusMockMethodCall {
	guint64 call_time;
	GVariant** args;
	gint args_length1;
};

struct _orgfreedesktopDBusMockIface {
	GTypeInterface parent_iface;
	void (*add_method) (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* in_sig, const gchar* out_sig, const gchar* code, GError** error);
	void (*add_methods) (orgfreedesktopDBusMock* self, const gchar* interface_name, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
	void (*add_object) (orgfreedesktopDBusMock* self, const gchar* path, const gchar* interface_name, GHashTable* properties, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
	void (*add_properties) (orgfreedesktopDBusMock* self, const gchar* interface_name, GHashTable* properties, GError** error);
	void (*add_property) (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, GVariant* val, GError** error);
	void (*add_template) (orgfreedesktopDBusMock* self, const gchar* template_name, GHashTable* template_params, GError** error);
	void (*clear_calls) (orgfreedesktopDBusMock* self, GError** error);
	void (*emit_signal) (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* signature, GVariant** args, int args_length1, GError** error);
	orgfreedesktopDBusMockCall* (*get_calls) (orgfreedesktopDBusMock* self, int* result_length1, GError** error);
	orgfreedesktopDBusMockMethodCall* (*get_method_calls) (orgfreedesktopDBusMock* self, const gchar* method, int* result_length1, GError** error);
	void (*remove_object) (orgfreedesktopDBusMock* self, const gchar* path, GError** error);
	void (*reset) (orgfreedesktopDBusMock* self, GError** error);
};



GType org_freedesktop_dbus_mock_proxy_get_type (void) G_GNUC_CONST;
guint org_freedesktop_dbus_mock_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType org_freedesktop_dbus_mock_method_get_type (void) G_GNUC_CONST;
orgfreedesktopDBusMockMethod* org_freedesktop_dbus_mock_method_dup (const orgfreedesktopDBusMockMethod* self);
void org_freedesktop_dbus_mock_method_free (orgfreedesktopDBusMockMethod* self);
void org_freedesktop_dbus_mock_method_copy (const orgfreedesktopDBusMockMethod* self, orgfreedesktopDBusMockMethod* dest);
void org_freedesktop_dbus_mock_method_destroy (orgfreedesktopDBusMockMethod* self);
GType org_freedesktop_dbus_mock_call_get_type (void) G_GNUC_CONST;
orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_call_dup (const orgfreedesktopDBusMockCall* self);
void org_freedesktop_dbus_mock_call_free (orgfreedesktopDBusMockCall* self);
void org_freedesktop_dbus_mock_call_copy (const orgfreedesktopDBusMockCall* self, orgfreedesktopDBusMockCall* dest);
void org_freedesktop_dbus_mock_call_destroy (orgfreedesktopDBusMockCall* self);
GType org_freedesktop_dbus_mock_method_call_get_type (void) G_GNUC_CONST;
orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_method_call_dup (const orgfreedesktopDBusMockMethodCall* self);
void org_freedesktop_dbus_mock_method_call_free (orgfreedesktopDBusMockMethodCall* self);
void org_freedesktop_dbus_mock_method_call_copy (const orgfreedesktopDBusMockMethodCall* self, orgfreedesktopDBusMockMethodCall* dest);
void org_freedesktop_dbus_mock_method_call_destroy (orgfreedesktopDBusMockMethodCall* self);
GType org_freedesktop_dbus_mock_get_type (void) G_GNUC_CONST;
void org_freedesktop_dbus_mock_add_method (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* in_sig, const gchar* out_sig, const gchar* code, GError** error);
void org_freedesktop_dbus_mock_add_methods (orgfreedesktopDBusMock* self, const gchar* interface_name, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
void org_freedesktop_dbus_mock_add_object (orgfreedesktopDBusMock* self, const gchar* path, const gchar* interface_name, GHashTable* properties, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
void org_freedesktop_dbus_mock_add_properties (orgfreedesktopDBusMock* self, const gchar* interface_name, GHashTable* properties, GError** error);
void org_freedesktop_dbus_mock_add_property (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, GVariant* val, GError** error);
void org_freedesktop_dbus_mock_add_template (orgfreedesktopDBusMock* self, const gchar* template_name, GHashTable* template_params, GError** error);
void org_freedesktop_dbus_mock_clear_calls (orgfreedesktopDBusMock* self, GError** error);
void org_freedesktop_dbus_mock_emit_signal (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* signature, GVariant** args, int args_length1, GError** error);
orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_get_calls (orgfreedesktopDBusMock* self, int* result_length1, GError** error);
orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_get_method_calls (orgfreedesktopDBusMock* self, const gchar* method, int* result_length1, GError** error);
void org_freedesktop_dbus_mock_remove_object (orgfreedesktopDBusMock* self, const gchar* path, GError** error);
void org_freedesktop_dbus_mock_reset (orgfreedesktopDBusMock* self, GError** error);
static void g_cclosure_user_marshal_VOID__STRING_POINTER_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static GVariant** _vala_array_dup2 (GVariant** self, int length);
static GVariant** _vala_array_dup3 (GVariant** self, int length);
static void org_freedesktop_dbus_mock_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters);
static void _dbus_handle_org_freedesktop_dbus_mock_method_called (orgfreedesktopDBusMock* self, GVariant* parameters);
static void org_freedesktop_dbus_mock_proxy_add_method (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* in_sig, const gchar* out_sig, const gchar* code, GError** error);
static void org_freedesktop_dbus_mock_proxy_add_methods (orgfreedesktopDBusMock* self, const gchar* interface_name, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
static void org_freedesktop_dbus_mock_proxy_add_object (orgfreedesktopDBusMock* self, const gchar* path, const gchar* interface_name, GHashTable* properties, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error);
static void org_freedesktop_dbus_mock_proxy_add_properties (orgfreedesktopDBusMock* self, const gchar* interface_name, GHashTable* properties, GError** error);
static void org_freedesktop_dbus_mock_proxy_add_property (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, GVariant* val, GError** error);
static void org_freedesktop_dbus_mock_proxy_add_template (orgfreedesktopDBusMock* self, const gchar* template_name, GHashTable* template_params, GError** error);
static void org_freedesktop_dbus_mock_proxy_clear_calls (orgfreedesktopDBusMock* self, GError** error);
static void org_freedesktop_dbus_mock_proxy_emit_signal (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* signature, GVariant** args, int args_length1, GError** error);
static orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_proxy_get_calls (orgfreedesktopDBusMock* self, int* result_length1, GError** error);
static orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_proxy_get_method_calls (orgfreedesktopDBusMock* self, const gchar* method, int* result_length1, GError** error);
static void org_freedesktop_dbus_mock_proxy_remove_object (orgfreedesktopDBusMock* self, const gchar* path, GError** error);
static void org_freedesktop_dbus_mock_proxy_reset (orgfreedesktopDBusMock* self, GError** error);
static void org_freedesktop_dbus_mock_proxy_org_freedesktop_dbus_mock_interface_init (orgfreedesktopDBusMockIface* iface);
static void _dbus_org_freedesktop_dbus_mock_add_method (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _vala_orgfreedesktopDBusMockMethod_array_free (orgfreedesktopDBusMockMethod* array, gint array_length);
static void _dbus_org_freedesktop_dbus_mock_add_methods (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_add_object (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_add_properties (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_add_property (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_add_template (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_clear_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_emit_signal (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _vala_orgfreedesktopDBusMockCall_array_free (orgfreedesktopDBusMockCall* array, gint array_length);
static void _dbus_org_freedesktop_dbus_mock_get_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _vala_orgfreedesktopDBusMockMethodCall_array_free (orgfreedesktopDBusMockMethodCall* array, gint array_length);
static void _dbus_org_freedesktop_dbus_mock_get_method_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_remove_object (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_dbus_mock_reset (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation);
static void org_freedesktop_dbus_mock_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_freedesktop_dbus_mock_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_freedesktop_dbus_mock_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_freedesktop_dbus_mock_method_called (GObject* _sender, const gchar* method_name, GVariant** args, int args_length1, gpointer* _data);
static void _org_freedesktop_dbus_mock_unregister_object (gpointer user_data);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);

static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_method_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_method_name = {-1, "name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_method_in_sig = {-1, "in_sig", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_method_out_sig = {-1, "out_sig", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_method_code = {-1, "code", "s"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_method_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_method_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_method_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_method_in_sig, &_org_freedesktop_dbus_mock_dbus_arg_info_add_method_out_sig, &_org_freedesktop_dbus_mock_dbus_arg_info_add_method_code, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_method_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_method = {-1, "AddMethod", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_method_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_method_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_methods_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_methods_methods = {-1, "methods", "a(sss)"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_methods_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_methods_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_methods_methods, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_methods_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_methods = {-1, "AddMethods", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_methods_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_methods_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_object_path = {-1, "path", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_object_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_object_properties = {-1, "properties", "a{sv}"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_object_methods = {-1, "methods", "a(sss)"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_object_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_object_path, &_org_freedesktop_dbus_mock_dbus_arg_info_add_object_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_object_properties, &_org_freedesktop_dbus_mock_dbus_arg_info_add_object_methods, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_object_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_object = {-1, "AddObject", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_object_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_object_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_properties_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_properties_properties = {-1, "properties", "a{sv}"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_properties_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_properties_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_properties_properties, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_properties_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_properties = {-1, "AddProperties", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_properties_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_properties_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_property_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_property_name = {-1, "name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_property_val = {-1, "val", "v"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_property_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_property_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_property_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_property_val, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_property_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_property = {-1, "AddProperty", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_property_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_property_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_template_template_name = {-1, "template_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_add_template_template_params = {-1, "template_params", "a{sv}"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_template_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_add_template_template_name, &_org_freedesktop_dbus_mock_dbus_arg_info_add_template_template_params, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_add_template_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_add_template = {-1, "AddTemplate", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_template_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_add_template_out)};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_clear_calls_in[] = {NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_clear_calls_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_clear_calls = {-1, "ClearCalls", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_clear_calls_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_clear_calls_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_interface_name = {-1, "interface_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_name = {-1, "name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_signature = {-1, "signature", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_args = {-1, "args", "av"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_interface_name, &_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_name, &_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_signature, &_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_args, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_emit_signal = {-1, "EmitSignal", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_emit_signal_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_get_calls_result = {-1, "result", "a(tsav)"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_get_calls_in[] = {NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_get_calls_out[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_get_calls_result, NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_get_calls = {-1, "GetCalls", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_get_calls_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_get_calls_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_method = {-1, "method", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_result = {-1, "result", "a(tav)"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_method, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_out[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_result, NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_get_method_calls = {-1, "GetMethodCalls", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_get_method_calls_out)};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_remove_object_path = {-1, "path", "s"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_remove_object_in[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_remove_object_path, NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_remove_object_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_remove_object = {-1, "RemoveObject", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_remove_object_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_remove_object_out)};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_reset_in[] = {NULL};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_reset_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_dbus_mock_dbus_method_info_reset = {-1, "Reset", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_reset_in), (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_reset_out)};
static const GDBusMethodInfo * const _org_freedesktop_dbus_mock_dbus_method_info[] = {&_org_freedesktop_dbus_mock_dbus_method_info_add_method, &_org_freedesktop_dbus_mock_dbus_method_info_add_methods, &_org_freedesktop_dbus_mock_dbus_method_info_add_object, &_org_freedesktop_dbus_mock_dbus_method_info_add_properties, &_org_freedesktop_dbus_mock_dbus_method_info_add_property, &_org_freedesktop_dbus_mock_dbus_method_info_add_template, &_org_freedesktop_dbus_mock_dbus_method_info_clear_calls, &_org_freedesktop_dbus_mock_dbus_method_info_emit_signal, &_org_freedesktop_dbus_mock_dbus_method_info_get_calls, &_org_freedesktop_dbus_mock_dbus_method_info_get_method_calls, &_org_freedesktop_dbus_mock_dbus_method_info_remove_object, &_org_freedesktop_dbus_mock_dbus_method_info_reset, NULL};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_method_called_method_name = {-1, "method_name", "s"};
static const GDBusArgInfo _org_freedesktop_dbus_mock_dbus_arg_info_method_called_args = {-1, "args", "av"};
static const GDBusArgInfo * const _org_freedesktop_dbus_mock_dbus_arg_info_method_called[] = {&_org_freedesktop_dbus_mock_dbus_arg_info_method_called_method_name, &_org_freedesktop_dbus_mock_dbus_arg_info_method_called_args, NULL};
static const GDBusSignalInfo _org_freedesktop_dbus_mock_dbus_signal_info_method_called = {-1, "MethodCalled", (GDBusArgInfo **) (&_org_freedesktop_dbus_mock_dbus_arg_info_method_called)};
static const GDBusSignalInfo * const _org_freedesktop_dbus_mock_dbus_signal_info[] = {&_org_freedesktop_dbus_mock_dbus_signal_info_method_called, NULL};
static const GDBusPropertyInfo * const _org_freedesktop_dbus_mock_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _org_freedesktop_dbus_mock_dbus_interface_info = {-1, "org.freedesktop.DBus.Mock", (GDBusMethodInfo **) (&_org_freedesktop_dbus_mock_dbus_method_info), (GDBusSignalInfo **) (&_org_freedesktop_dbus_mock_dbus_signal_info), (GDBusPropertyInfo **) (&_org_freedesktop_dbus_mock_dbus_property_info)};
static const GDBusInterfaceVTable _org_freedesktop_dbus_mock_dbus_interface_vtable = {org_freedesktop_dbus_mock_dbus_interface_method_call, org_freedesktop_dbus_mock_dbus_interface_get_property, org_freedesktop_dbus_mock_dbus_interface_set_property};

void org_freedesktop_dbus_mock_add_method (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* in_sig, const gchar* out_sig, const gchar* code, GError** error) {
#line 50 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 50 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_method (self, interface_name, name, in_sig, out_sig, code, error);
#line 241 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_add_methods (orgfreedesktopDBusMock* self, const gchar* interface_name, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error) {
#line 63 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 63 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_methods (self, interface_name, methods, methods_length1, error);
#line 250 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_add_object (orgfreedesktopDBusMock* self, const gchar* path, const gchar* interface_name, GHashTable* properties, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error) {
#line 67 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 67 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_object (self, path, interface_name, properties, methods, methods_length1, error);
#line 259 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_add_properties (orgfreedesktopDBusMock* self, const gchar* interface_name, GHashTable* properties, GError** error) {
#line 73 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 73 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_properties (self, interface_name, properties, error);
#line 268 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_add_property (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, GVariant* val, GError** error) {
#line 77 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 77 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_property (self, interface_name, name, val, error);
#line 277 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_add_template (orgfreedesktopDBusMock* self, const gchar* template_name, GHashTable* template_params, GError** error) {
#line 81 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 81 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->add_template (self, template_name, template_params, error);
#line 286 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_clear_calls (orgfreedesktopDBusMock* self, GError** error) {
#line 86 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 86 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->clear_calls (self, error);
#line 295 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_emit_signal (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* signature, GVariant** args, int args_length1, GError** error) {
#line 89 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 89 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->emit_signal (self, interface_name, name, signature, args, args_length1, error);
#line 304 "org-freedesktop-dbus-mock.c"
}


orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_get_calls (orgfreedesktopDBusMock* self, int* result_length1, GError** error) {
#line 102 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 102 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->get_calls (self, result_length1, error);
#line 313 "org-freedesktop-dbus-mock.c"
}


orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_get_method_calls (orgfreedesktopDBusMock* self, const gchar* method, int* result_length1, GError** error) {
#line 112 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 112 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->get_method_calls (self, method, result_length1, error);
#line 322 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_remove_object (orgfreedesktopDBusMock* self, const gchar* path, GError** error) {
#line 116 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 116 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->remove_object (self, path, error);
#line 331 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_reset (orgfreedesktopDBusMock* self, GError** error) {
#line 120 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (self != NULL);
#line 120 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	ORG_FREEDESKTOP_DBUS_MOCK_GET_INTERFACE (self)->reset (self, error);
#line 340 "org-freedesktop-dbus-mock.c"
}


static void g_cclosure_user_marshal_VOID__STRING_POINTER_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__STRING_POINTER_INT) (gpointer data1, const char* arg_1, gpointer arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_POINTER_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_return_if_fail (n_param_values == 4);
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		data1 = closure->data;
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		data2 = param_values->data[0].v_pointer;
#line 359 "org-freedesktop-dbus-mock.c"
	} else {
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		data1 = param_values->data[0].v_pointer;
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		data2 = closure->data;
#line 365 "org-freedesktop-dbus-mock.c"
	}
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	callback = (GMarshalFunc_VOID__STRING_POINTER_INT) (marshal_data ? marshal_data : cc->callback);
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	callback (data1, g_value_get_string (param_values + 1), g_value_get_pointer (param_values + 2), g_value_get_int (param_values + 3), data2);
#line 371 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_copy (const orgfreedesktopDBusMockMethod* self, orgfreedesktopDBusMockMethod* dest) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp0_ = (*self).name;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*dest).name);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).name = _tmp1_;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp2_ = (*self).in_sig;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*dest).in_sig);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).in_sig = _tmp3_;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp4_ = (*self).out_sig;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*dest).out_sig);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).out_sig = _tmp5_;
#line 406 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_destroy (orgfreedesktopDBusMockMethod* self) {
#line 57 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*self).name);
#line 58 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*self).in_sig);
#line 59 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*self).out_sig);
#line 417 "org-freedesktop-dbus-mock.c"
}


orgfreedesktopDBusMockMethod* org_freedesktop_dbus_mock_method_dup (const orgfreedesktopDBusMockMethod* self) {
	orgfreedesktopDBusMockMethod* dup;
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	dup = g_new0 (orgfreedesktopDBusMockMethod, 1);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_method_copy (self, dup);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return dup;
#line 429 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_free (orgfreedesktopDBusMockMethod* self) {
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_method_destroy (self);
#line 55 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_free (self);
#line 438 "org-freedesktop-dbus-mock.c"
}


GType org_freedesktop_dbus_mock_method_get_type (void) {
	static volatile gsize org_freedesktop_dbus_mock_method_type_id__volatile = 0;
	if (g_once_init_enter (&org_freedesktop_dbus_mock_method_type_id__volatile)) {
		GType org_freedesktop_dbus_mock_method_type_id;
		org_freedesktop_dbus_mock_method_type_id = g_boxed_type_register_static ("orgfreedesktopDBusMockMethod", (GBoxedCopyFunc) org_freedesktop_dbus_mock_method_dup, (GBoxedFreeFunc) org_freedesktop_dbus_mock_method_free);
		g_once_init_leave (&org_freedesktop_dbus_mock_method_type_id__volatile, org_freedesktop_dbus_mock_method_type_id);
	}
	return org_freedesktop_dbus_mock_method_type_id__volatile;
}


static gpointer _g_variant_ref0 (gpointer self) {
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return self ? g_variant_ref (self) : NULL;
#line 456 "org-freedesktop-dbus-mock.c"
}


static GVariant** _vala_array_dup2 (GVariant** self, int length) {
	GVariant** result;
	int i;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	result = g_new0 (GVariant*, length + 1);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	for (i = 0; i < length; i++) {
#line 467 "org-freedesktop-dbus-mock.c"
		GVariant* _tmp0_ = NULL;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		_tmp0_ = _g_variant_ref0 (self[i]);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		result[i] = _tmp0_;
#line 473 "org-freedesktop-dbus-mock.c"
	}
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return result;
#line 477 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_call_copy (const orgfreedesktopDBusMockCall* self, orgfreedesktopDBusMockCall* dest) {
	guint64 _tmp0_ = 0ULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GVariant** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	GVariant** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp0_ = (*self).call_time;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).call_time = _tmp0_;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp1_ = (*self).method_name;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*dest).method_name);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).method_name = _tmp2_;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp3_ = (*self).args;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp3__length1 = (*self).args_length1;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup2 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp4__length1 = _tmp3__length1;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args = (_vala_array_free ((*dest).args, (*dest).args_length1, (GDestroyNotify) g_variant_unref), NULL);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args = _tmp4_;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args_length1 = _tmp4__length1;
#line 515 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_call_destroy (orgfreedesktopDBusMockCall* self) {
#line 97 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_g_free0 ((*self).method_name);
#line 98 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*self).args = (_vala_array_free ((*self).args, (*self).args_length1, (GDestroyNotify) g_variant_unref), NULL);
#line 524 "org-freedesktop-dbus-mock.c"
}


orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_call_dup (const orgfreedesktopDBusMockCall* self) {
	orgfreedesktopDBusMockCall* dup;
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	dup = g_new0 (orgfreedesktopDBusMockCall, 1);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_call_copy (self, dup);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return dup;
#line 536 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_call_free (orgfreedesktopDBusMockCall* self) {
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_call_destroy (self);
#line 94 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_free (self);
#line 545 "org-freedesktop-dbus-mock.c"
}


GType org_freedesktop_dbus_mock_call_get_type (void) {
	static volatile gsize org_freedesktop_dbus_mock_call_type_id__volatile = 0;
	if (g_once_init_enter (&org_freedesktop_dbus_mock_call_type_id__volatile)) {
		GType org_freedesktop_dbus_mock_call_type_id;
		org_freedesktop_dbus_mock_call_type_id = g_boxed_type_register_static ("orgfreedesktopDBusMockCall", (GBoxedCopyFunc) org_freedesktop_dbus_mock_call_dup, (GBoxedFreeFunc) org_freedesktop_dbus_mock_call_free);
		g_once_init_leave (&org_freedesktop_dbus_mock_call_type_id__volatile, org_freedesktop_dbus_mock_call_type_id);
	}
	return org_freedesktop_dbus_mock_call_type_id__volatile;
}


static GVariant** _vala_array_dup3 (GVariant** self, int length) {
	GVariant** result;
	int i;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	result = g_new0 (GVariant*, length + 1);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	for (i = 0; i < length; i++) {
#line 567 "org-freedesktop-dbus-mock.c"
		GVariant* _tmp0_ = NULL;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		_tmp0_ = _g_variant_ref0 (self[i]);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		result[i] = _tmp0_;
#line 573 "org-freedesktop-dbus-mock.c"
	}
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return result;
#line 577 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_call_copy (const orgfreedesktopDBusMockMethodCall* self, orgfreedesktopDBusMockMethodCall* dest) {
	guint64 _tmp0_ = 0ULL;
	GVariant** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GVariant** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp0_ = (*self).call_time;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).call_time = _tmp0_;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp1_ = (*self).args;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp1__length1 = (*self).args_length1;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp2_ = (_tmp1_ != NULL) ? _vala_array_dup3 (_tmp1_, _tmp1__length1) : ((gpointer) _tmp1_);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	_tmp2__length1 = _tmp1__length1;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args = (_vala_array_free ((*dest).args, (*dest).args_length1, (GDestroyNotify) g_variant_unref), NULL);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args = _tmp2_;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*dest).args_length1 = _tmp2__length1;
#line 605 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_call_destroy (orgfreedesktopDBusMockMethodCall* self) {
#line 108 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	(*self).args = (_vala_array_free ((*self).args, (*self).args_length1, (GDestroyNotify) g_variant_unref), NULL);
#line 612 "org-freedesktop-dbus-mock.c"
}


orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_method_call_dup (const orgfreedesktopDBusMockMethodCall* self) {
	orgfreedesktopDBusMockMethodCall* dup;
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	dup = g_new0 (orgfreedesktopDBusMockMethodCall, 1);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_method_call_copy (self, dup);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	return dup;
#line 624 "org-freedesktop-dbus-mock.c"
}


void org_freedesktop_dbus_mock_method_call_free (orgfreedesktopDBusMockMethodCall* self) {
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	org_freedesktop_dbus_mock_method_call_destroy (self);
#line 105 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	g_free (self);
#line 633 "org-freedesktop-dbus-mock.c"
}


GType org_freedesktop_dbus_mock_method_call_get_type (void) {
	static volatile gsize org_freedesktop_dbus_mock_method_call_type_id__volatile = 0;
	if (g_once_init_enter (&org_freedesktop_dbus_mock_method_call_type_id__volatile)) {
		GType org_freedesktop_dbus_mock_method_call_type_id;
		org_freedesktop_dbus_mock_method_call_type_id = g_boxed_type_register_static ("orgfreedesktopDBusMockMethodCall", (GBoxedCopyFunc) org_freedesktop_dbus_mock_method_call_dup, (GBoxedFreeFunc) org_freedesktop_dbus_mock_method_call_free);
		g_once_init_leave (&org_freedesktop_dbus_mock_method_call_type_id__volatile, org_freedesktop_dbus_mock_method_call_type_id);
	}
	return org_freedesktop_dbus_mock_method_call_type_id__volatile;
}


static void org_freedesktop_dbus_mock_base_init (orgfreedesktopDBusMockIface * iface) {
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	static gboolean initialized = FALSE;
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
	if (!initialized) {
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		initialized = TRUE;
#line 41 "/opt/gnome3/source/folks/tests/lib/org-freedesktop-dbus-mock.vala"
		g_signal_new ("method_called", ORG_FREEDESKTOP_DBUS_TYPE_MOCK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_POINTER_INT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT);
#line 657 "org-freedesktop-dbus-mock.c"
	}
}


GType org_freedesktop_dbus_mock_get_type (void) {
	static volatile gsize org_freedesktop_dbus_mock_type_id__volatile = 0;
	if (g_once_init_enter (&org_freedesktop_dbus_mock_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (orgfreedesktopDBusMockIface), (GBaseInitFunc) org_freedesktop_dbus_mock_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType org_freedesktop_dbus_mock_type_id;
		org_freedesktop_dbus_mock_type_id = g_type_register_static (G_TYPE_INTERFACE, "orgfreedesktopDBusMock", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (org_freedesktop_dbus_mock_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (org_freedesktop_dbus_mock_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) org_freedesktop_dbus_mock_proxy_get_type);
		g_type_set_qdata (org_freedesktop_dbus_mock_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus.Mock");
		g_type_set_qdata (org_freedesktop_dbus_mock_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_org_freedesktop_dbus_mock_dbus_interface_info));
		g_type_set_qdata (org_freedesktop_dbus_mock_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) org_freedesktop_dbus_mock_register_object);
		g_once_init_leave (&org_freedesktop_dbus_mock_type_id__volatile, org_freedesktop_dbus_mock_type_id);
	}
	return org_freedesktop_dbus_mock_type_id__volatile;
}


G_DEFINE_TYPE_EXTENDED (orgfreedesktopDBusMockProxy, org_freedesktop_dbus_mock_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ORG_FREEDESKTOP_DBUS_TYPE_MOCK, org_freedesktop_dbus_mock_proxy_org_freedesktop_dbus_mock_interface_init) )
static void org_freedesktop_dbus_mock_proxy_class_init (orgfreedesktopDBusMockProxyClass* klass) {
	G_DBUS_PROXY_CLASS (klass)->g_signal = org_freedesktop_dbus_mock_proxy_g_signal;
}


static void _dbus_handle_org_freedesktop_dbus_mock_method_called (orgfreedesktopDBusMock* self, GVariant* parameters) {
	GVariantIter _arguments_iter;
	gchar* method_name = NULL;
	GVariant* _tmp0_;
	GVariant** args = NULL;
	int args_length1;
	GVariant* _tmp1_;
	GVariant** _tmp2_;
	int _tmp2__length;
	int _tmp2__size;
	int _tmp2__length1;
	GVariantIter _tmp3_;
	GVariant* _tmp4_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	method_name = g_variant_dup_string (_tmp0_, NULL);
	g_variant_unref (_tmp0_);
	args_length1 = 0;
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp2_ = g_new (GVariant*, 5);
	_tmp2__length = 0;
	_tmp2__size = 4;
	_tmp2__length1 = 0;
	g_variant_iter_init (&_tmp3_, _tmp1_);
	for (; (_tmp4_ = g_variant_iter_next_value (&_tmp3_)) != NULL; _tmp2__length1++) {
		if (_tmp2__size == _tmp2__length) {
			_tmp2__size = 2 * _tmp2__size;
			_tmp2_ = g_renew (GVariant*, _tmp2_, _tmp2__size + 1);
		}
		_tmp2_[_tmp2__length++] = g_variant_get_variant (_tmp4_);
		g_variant_unref (_tmp4_);
	}
	args_length1 = _tmp2__length1;
	_tmp2_[_tmp2__length] = NULL;
	args = _tmp2_;
	g_variant_unref (_tmp1_);
	g_signal_emit_by_name (self, "method-called", method_name, args, args_length1);
	_g_free0 (method_name);
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_variant_unref), NULL);
}


static void org_freedesktop_dbus_mock_proxy_g_signal (GDBusProxy* proxy, const gchar* sender_name, const gchar* signal_name, GVariant* parameters) {
	if (strcmp (signal_name, "MethodCalled") == 0) {
		_dbus_handle_org_freedesktop_dbus_mock_method_called ((orgfreedesktopDBusMock*) proxy, parameters);
	}
}


static void org_freedesktop_dbus_mock_proxy_init (orgfreedesktopDBusMockProxy* self) {
}


static void org_freedesktop_dbus_mock_proxy_add_method (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* in_sig, const gchar* out_sig, const gchar* code, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddMethod");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (in_sig));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (out_sig));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (code));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_add_methods (orgfreedesktopDBusMock* self, const gchar* interface_name, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	orgfreedesktopDBusMockMethod* _tmp5_;
	GVariantBuilder _tmp6_;
	int _tmp7_;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddMethods");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	_tmp5_ = methods;
	g_variant_builder_init (&_tmp6_, G_VARIANT_TYPE ("a(sss)"));
	for (_tmp7_ = 0; _tmp7_ < methods_length1; _tmp7_++) {
		GVariantBuilder _tmp8_;
		g_variant_builder_init (&_tmp8_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp8_, g_variant_new_string ((*_tmp5_).name));
		g_variant_builder_add_value (&_tmp8_, g_variant_new_string ((*_tmp5_).in_sig));
		g_variant_builder_add_value (&_tmp8_, g_variant_new_string ((*_tmp5_).out_sig));
		g_variant_builder_add_value (&_tmp6_, g_variant_builder_end (&_tmp8_));
		_tmp5_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp6_));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_add_object (orgfreedesktopDBusMock* self, const gchar* path, const gchar* interface_name, GHashTable* properties, orgfreedesktopDBusMockMethod* methods, int methods_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp9_;
	GHashTableIter _tmp10_;
	gpointer _tmp11_;
	gpointer _tmp12_;
	orgfreedesktopDBusMockMethod* _tmp13_;
	GVariantBuilder _tmp14_;
	int _tmp15_;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddObject");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	g_hash_table_iter_init (&_tmp10_, properties);
	g_variant_builder_init (&_tmp9_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp10_, &_tmp11_, &_tmp12_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp11_;
		_value = (GVariant*) _tmp12_;
		g_variant_builder_add (&_tmp9_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp9_));
	_tmp13_ = methods;
	g_variant_builder_init (&_tmp14_, G_VARIANT_TYPE ("a(sss)"));
	for (_tmp15_ = 0; _tmp15_ < methods_length1; _tmp15_++) {
		GVariantBuilder _tmp16_;
		g_variant_builder_init (&_tmp16_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp16_, g_variant_new_string ((*_tmp13_).name));
		g_variant_builder_add_value (&_tmp16_, g_variant_new_string ((*_tmp13_).in_sig));
		g_variant_builder_add_value (&_tmp16_, g_variant_new_string ((*_tmp13_).out_sig));
		g_variant_builder_add_value (&_tmp14_, g_variant_builder_end (&_tmp16_));
		_tmp13_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp14_));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_add_properties (orgfreedesktopDBusMock* self, const gchar* interface_name, GHashTable* properties, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp17_;
	GHashTableIter _tmp18_;
	gpointer _tmp19_;
	gpointer _tmp20_;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddProperties");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	g_hash_table_iter_init (&_tmp18_, properties);
	g_variant_builder_init (&_tmp17_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp18_, &_tmp19_, &_tmp20_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp19_;
		_value = (GVariant*) _tmp20_;
		g_variant_builder_add (&_tmp17_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp17_));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_add_property (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, GVariant* val, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddProperty");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_variant (val));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_add_template (orgfreedesktopDBusMock* self, const gchar* template_name, GHashTable* template_params, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp21_;
	GHashTableIter _tmp22_;
	gpointer _tmp23_;
	gpointer _tmp24_;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "AddTemplate");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (template_name));
	g_hash_table_iter_init (&_tmp22_, template_params);
	g_variant_builder_init (&_tmp21_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp22_, &_tmp23_, &_tmp24_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp23_;
		_value = (GVariant*) _tmp24_;
		g_variant_builder_add (&_tmp21_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp21_));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_clear_calls (orgfreedesktopDBusMock* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "ClearCalls");
	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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_emit_signal (orgfreedesktopDBusMock* self, const gchar* interface_name, const gchar* name, const gchar* signature, GVariant** args, int args_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariant** _tmp25_;
	GVariantBuilder _tmp26_;
	int _tmp27_;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "EmitSignal");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (interface_name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (signature));
	_tmp25_ = args;
	g_variant_builder_init (&_tmp26_, G_VARIANT_TYPE ("av"));
	for (_tmp27_ = 0; _tmp27_ < args_length1; _tmp27_++) {
		g_variant_builder_add_value (&_tmp26_, g_variant_new_variant (*_tmp25_));
		_tmp25_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp26_));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static orgfreedesktopDBusMockCall* org_freedesktop_dbus_mock_proxy_get_calls (orgfreedesktopDBusMock* self, int* result_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	orgfreedesktopDBusMockCall* _result;
	int _result_length1;
	GVariant* _tmp28_;
	orgfreedesktopDBusMockCall* _tmp29_;
	int _tmp29__length;
	int _tmp29__size;
	int _tmp29__length1;
	GVariantIter _tmp30_;
	GVariant* _tmp31_;
	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.freedesktop.DBus.Mock", "GetCalls");
	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;
	_tmp28_ = g_variant_iter_next_value (&_reply_iter);
	_tmp29_ = g_new (orgfreedesktopDBusMockCall, 5);
	_tmp29__length = 0;
	_tmp29__size = 4;
	_tmp29__length1 = 0;
	g_variant_iter_init (&_tmp30_, _tmp28_);
	for (; (_tmp31_ = g_variant_iter_next_value (&_tmp30_)) != NULL; _tmp29__length1++) {
		orgfreedesktopDBusMockCall _tmp32_;
		GVariantIter _tmp33_;
		GVariant* _tmp34_;
		GVariant* _tmp35_;
		GVariant* _tmp36_;
		GVariant** _tmp37_;
		int _tmp37__length;
		int _tmp37__size;
		int _tmp37__length1;
		GVariantIter _tmp38_;
		GVariant* _tmp39_;
		if (_tmp29__size == _tmp29__length) {
			_tmp29__size = 2 * _tmp29__size;
			_tmp29_ = g_renew (orgfreedesktopDBusMockCall, _tmp29_, _tmp29__size + 1);
		}
		g_variant_iter_init (&_tmp33_, _tmp31_);
		_tmp34_ = g_variant_iter_next_value (&_tmp33_);
		_tmp32_.call_time = g_variant_get_uint64 (_tmp34_);
		g_variant_unref (_tmp34_);
		_tmp35_ = g_variant_iter_next_value (&_tmp33_);
		_tmp32_.method_name = g_variant_dup_string (_tmp35_, NULL);
		g_variant_unref (_tmp35_);
		_tmp36_ = g_variant_iter_next_value (&_tmp33_);
		_tmp37_ = g_new (GVariant*, 5);
		_tmp37__length = 0;
		_tmp37__size = 4;
		_tmp37__length1 = 0;
		g_variant_iter_init (&_tmp38_, _tmp36_);
		for (; (_tmp39_ = g_variant_iter_next_value (&_tmp38_)) != NULL; _tmp37__length1++) {
			if (_tmp37__size == _tmp37__length) {
				_tmp37__size = 2 * _tmp37__size;
				_tmp37_ = g_renew (GVariant*, _tmp37_, _tmp37__size + 1);
			}
			_tmp37_[_tmp37__length++] = g_variant_get_variant (_tmp39_);
			g_variant_unref (_tmp39_);
		}
		_tmp32_.args_length1 = _tmp37__length1;
		_tmp37_[_tmp37__length] = NULL;
		_tmp32_.args = _tmp37_;
		g_variant_unref (_tmp36_);
		_tmp29_[_tmp29__length++] = _tmp32_;
		g_variant_unref (_tmp31_);
	}
	_result_length1 = _tmp29__length1;
	_result = _tmp29_;
	g_variant_unref (_tmp28_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}


static orgfreedesktopDBusMockMethodCall* org_freedesktop_dbus_mock_proxy_get_method_calls (orgfreedesktopDBusMock* self, const gchar* method, int* result_length1, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	orgfreedesktopDBusMockMethodCall* _result;
	int _result_length1;
	GVariant* _tmp40_;
	orgfreedesktopDBusMockMethodCall* _tmp41_;
	int _tmp41__length;
	int _tmp41__size;
	int _tmp41__length1;
	GVariantIter _tmp42_;
	GVariant* _tmp43_;
	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.freedesktop.DBus.Mock", "GetMethodCalls");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (method));
	_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;
	_tmp40_ = g_variant_iter_next_value (&_reply_iter);
	_tmp41_ = g_new (orgfreedesktopDBusMockMethodCall, 5);
	_tmp41__length = 0;
	_tmp41__size = 4;
	_tmp41__length1 = 0;
	g_variant_iter_init (&_tmp42_, _tmp40_);
	for (; (_tmp43_ = g_variant_iter_next_value (&_tmp42_)) != NULL; _tmp41__length1++) {
		orgfreedesktopDBusMockMethodCall _tmp44_;
		GVariantIter _tmp45_;
		GVariant* _tmp46_;
		GVariant* _tmp47_;
		GVariant** _tmp48_;
		int _tmp48__length;
		int _tmp48__size;
		int _tmp48__length1;
		GVariantIter _tmp49_;
		GVariant* _tmp50_;
		if (_tmp41__size == _tmp41__length) {
			_tmp41__size = 2 * _tmp41__size;
			_tmp41_ = g_renew (orgfreedesktopDBusMockMethodCall, _tmp41_, _tmp41__size + 1);
		}
		g_variant_iter_init (&_tmp45_, _tmp43_);
		_tmp46_ = g_variant_iter_next_value (&_tmp45_);
		_tmp44_.call_time = g_variant_get_uint64 (_tmp46_);
		g_variant_unref (_tmp46_);
		_tmp47_ = g_variant_iter_next_value (&_tmp45_);
		_tmp48_ = g_new (GVariant*, 5);
		_tmp48__length = 0;
		_tmp48__size = 4;
		_tmp48__length1 = 0;
		g_variant_iter_init (&_tmp49_, _tmp47_);
		for (; (_tmp50_ = g_variant_iter_next_value (&_tmp49_)) != NULL; _tmp48__length1++) {
			if (_tmp48__size == _tmp48__length) {
				_tmp48__size = 2 * _tmp48__size;
				_tmp48_ = g_renew (GVariant*, _tmp48_, _tmp48__size + 1);
			}
			_tmp48_[_tmp48__length++] = g_variant_get_variant (_tmp50_);
			g_variant_unref (_tmp50_);
		}
		_tmp44_.args_length1 = _tmp48__length1;
		_tmp48_[_tmp48__length] = NULL;
		_tmp44_.args = _tmp48_;
		g_variant_unref (_tmp47_);
		_tmp41_[_tmp41__length++] = _tmp44_;
		g_variant_unref (_tmp43_);
	}
	_result_length1 = _tmp41__length1;
	_result = _tmp41_;
	g_variant_unref (_tmp40_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}


static void org_freedesktop_dbus_mock_proxy_remove_object (orgfreedesktopDBusMock* self, const gchar* path, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "RemoveObject");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path));
	_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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_reset (orgfreedesktopDBusMock* self, GError** error) {
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	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.freedesktop.DBus.Mock", "Reset");
	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;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}


static void org_freedesktop_dbus_mock_proxy_org_freedesktop_dbus_mock_interface_init (orgfreedesktopDBusMockIface* iface) {
	iface->add_method = org_freedesktop_dbus_mock_proxy_add_method;
	iface->add_methods = org_freedesktop_dbus_mock_proxy_add_methods;
	iface->add_object = org_freedesktop_dbus_mock_proxy_add_object;
	iface->add_properties = org_freedesktop_dbus_mock_proxy_add_properties;
	iface->add_property = org_freedesktop_dbus_mock_proxy_add_property;
	iface->add_template = org_freedesktop_dbus_mock_proxy_add_template;
	iface->clear_calls = org_freedesktop_dbus_mock_proxy_clear_calls;
	iface->emit_signal = org_freedesktop_dbus_mock_proxy_emit_signal;
	iface->get_calls = org_freedesktop_dbus_mock_proxy_get_calls;
	iface->get_method_calls = org_freedesktop_dbus_mock_proxy_get_method_calls;
	iface->remove_object = org_freedesktop_dbus_mock_proxy_remove_object;
	iface->reset = org_freedesktop_dbus_mock_proxy_reset;
}


static void _dbus_org_freedesktop_dbus_mock_add_method (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* interface_name = NULL;
	GVariant* _tmp51_;
	gchar* name = NULL;
	GVariant* _tmp52_;
	gchar* in_sig = NULL;
	GVariant* _tmp53_;
	gchar* out_sig = NULL;
	GVariant* _tmp54_;
	gchar* code = NULL;
	GVariant* _tmp55_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp51_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp51_, NULL);
	g_variant_unref (_tmp51_);
	_tmp52_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp52_, NULL);
	g_variant_unref (_tmp52_);
	_tmp53_ = g_variant_iter_next_value (&_arguments_iter);
	in_sig = g_variant_dup_string (_tmp53_, NULL);
	g_variant_unref (_tmp53_);
	_tmp54_ = g_variant_iter_next_value (&_arguments_iter);
	out_sig = g_variant_dup_string (_tmp54_, NULL);
	g_variant_unref (_tmp54_);
	_tmp55_ = g_variant_iter_next_value (&_arguments_iter);
	code = g_variant_dup_string (_tmp55_, NULL);
	g_variant_unref (_tmp55_);
	org_freedesktop_dbus_mock_add_method (self, interface_name, name, in_sig, out_sig, code, &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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (interface_name);
	_g_free0 (name);
	_g_free0 (in_sig);
	_g_free0 (out_sig);
	_g_free0 (code);
	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 _vala_orgfreedesktopDBusMockMethod_array_free (orgfreedesktopDBusMockMethod* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			org_freedesktop_dbus_mock_method_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void _dbus_org_freedesktop_dbus_mock_add_methods (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* interface_name = NULL;
	GVariant* _tmp56_;
	orgfreedesktopDBusMockMethod* methods = NULL;
	int methods_length1 = 0;
	GVariant* _tmp57_;
	orgfreedesktopDBusMockMethod* _tmp58_;
	int _tmp58__length;
	int _tmp58__size;
	int _tmp58__length1;
	GVariantIter _tmp59_;
	GVariant* _tmp60_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp56_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp56_, NULL);
	g_variant_unref (_tmp56_);
	_tmp57_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp58_ = g_new (orgfreedesktopDBusMockMethod, 5);
	_tmp58__length = 0;
	_tmp58__size = 4;
	_tmp58__length1 = 0;
	g_variant_iter_init (&_tmp59_, _tmp57_);
	for (; (_tmp60_ = g_variant_iter_next_value (&_tmp59_)) != NULL; _tmp58__length1++) {
		orgfreedesktopDBusMockMethod _tmp61_;
		GVariantIter _tmp62_;
		GVariant* _tmp63_;
		GVariant* _tmp64_;
		GVariant* _tmp65_;
		if (_tmp58__size == _tmp58__length) {
			_tmp58__size = 2 * _tmp58__size;
			_tmp58_ = g_renew (orgfreedesktopDBusMockMethod, _tmp58_, _tmp58__size + 1);
		}
		g_variant_iter_init (&_tmp62_, _tmp60_);
		_tmp63_ = g_variant_iter_next_value (&_tmp62_);
		_tmp61_.name = g_variant_dup_string (_tmp63_, NULL);
		g_variant_unref (_tmp63_);
		_tmp64_ = g_variant_iter_next_value (&_tmp62_);
		_tmp61_.in_sig = g_variant_dup_string (_tmp64_, NULL);
		g_variant_unref (_tmp64_);
		_tmp65_ = g_variant_iter_next_value (&_tmp62_);
		_tmp61_.out_sig = g_variant_dup_string (_tmp65_, NULL);
		g_variant_unref (_tmp65_);
		_tmp58_[_tmp58__length++] = _tmp61_;
		g_variant_unref (_tmp60_);
	}
	methods_length1 = _tmp58__length1;
	methods = _tmp58_;
	g_variant_unref (_tmp57_);
	org_freedesktop_dbus_mock_add_methods (self, interface_name, methods, methods_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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (interface_name);
	methods = (_vala_orgfreedesktopDBusMockMethod_array_free (methods, methods_length1), NULL);
	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 _dbus_org_freedesktop_dbus_mock_add_object (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* path = NULL;
	GVariant* _tmp66_;
	gchar* interface_name = NULL;
	GVariant* _tmp67_;
	GHashTable* properties = NULL;
	GVariant* _tmp68_;
	GHashTable* _tmp69_;
	GVariantIter _tmp70_;
	GVariant* _tmp71_;
	GVariant* _tmp72_;
	orgfreedesktopDBusMockMethod* methods = NULL;
	int methods_length1 = 0;
	GVariant* _tmp73_;
	orgfreedesktopDBusMockMethod* _tmp74_;
	int _tmp74__length;
	int _tmp74__size;
	int _tmp74__length1;
	GVariantIter _tmp75_;
	GVariant* _tmp76_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp66_ = g_variant_iter_next_value (&_arguments_iter);
	path = g_variant_dup_string (_tmp66_, NULL);
	g_variant_unref (_tmp66_);
	_tmp67_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp67_, NULL);
	g_variant_unref (_tmp67_);
	_tmp68_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp69_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp70_, _tmp68_);
	while (g_variant_iter_loop (&_tmp70_, "{?*}", &_tmp71_, &_tmp72_)) {
		g_hash_table_insert (_tmp69_, g_variant_dup_string (_tmp71_, NULL), g_variant_get_variant (_tmp72_));
	}
	properties = _tmp69_;
	g_variant_unref (_tmp68_);
	_tmp73_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp74_ = g_new (orgfreedesktopDBusMockMethod, 5);
	_tmp74__length = 0;
	_tmp74__size = 4;
	_tmp74__length1 = 0;
	g_variant_iter_init (&_tmp75_, _tmp73_);
	for (; (_tmp76_ = g_variant_iter_next_value (&_tmp75_)) != NULL; _tmp74__length1++) {
		orgfreedesktopDBusMockMethod _tmp77_;
		GVariantIter _tmp78_;
		GVariant* _tmp79_;
		GVariant* _tmp80_;
		GVariant* _tmp81_;
		if (_tmp74__size == _tmp74__length) {
			_tmp74__size = 2 * _tmp74__size;
			_tmp74_ = g_renew (orgfreedesktopDBusMockMethod, _tmp74_, _tmp74__size + 1);
		}
		g_variant_iter_init (&_tmp78_, _tmp76_);
		_tmp79_ = g_variant_iter_next_value (&_tmp78_);
		_tmp77_.name = g_variant_dup_string (_tmp79_, NULL);
		g_variant_unref (_tmp79_);
		_tmp80_ = g_variant_iter_next_value (&_tmp78_);
		_tmp77_.in_sig = g_variant_dup_string (_tmp80_, NULL);
		g_variant_unref (_tmp80_);
		_tmp81_ = g_variant_iter_next_value (&_tmp78_);
		_tmp77_.out_sig = g_variant_dup_string (_tmp81_, NULL);
		g_variant_unref (_tmp81_);
		_tmp74_[_tmp74__length++] = _tmp77_;
		g_variant_unref (_tmp76_);
	}
	methods_length1 = _tmp74__length1;
	methods = _tmp74_;
	g_variant_unref (_tmp73_);
	org_freedesktop_dbus_mock_add_object (self, path, interface_name, properties, methods, methods_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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (path);
	_g_free0 (interface_name);
	_g_hash_table_unref0 (properties);
	methods = (_vala_orgfreedesktopDBusMockMethod_array_free (methods, methods_length1), NULL);
	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 _dbus_org_freedesktop_dbus_mock_add_properties (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* interface_name = NULL;
	GVariant* _tmp82_;
	GHashTable* properties = NULL;
	GVariant* _tmp83_;
	GHashTable* _tmp84_;
	GVariantIter _tmp85_;
	GVariant* _tmp86_;
	GVariant* _tmp87_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp82_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp82_, NULL);
	g_variant_unref (_tmp82_);
	_tmp83_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp84_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp85_, _tmp83_);
	while (g_variant_iter_loop (&_tmp85_, "{?*}", &_tmp86_, &_tmp87_)) {
		g_hash_table_insert (_tmp84_, g_variant_dup_string (_tmp86_, NULL), g_variant_get_variant (_tmp87_));
	}
	properties = _tmp84_;
	g_variant_unref (_tmp83_);
	org_freedesktop_dbus_mock_add_properties (self, interface_name, properties, &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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (interface_name);
	_g_hash_table_unref0 (properties);
	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 _dbus_org_freedesktop_dbus_mock_add_property (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* interface_name = NULL;
	GVariant* _tmp88_;
	gchar* name = NULL;
	GVariant* _tmp89_;
	GVariant* val = NULL;
	GVariant* _tmp90_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp88_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp88_, NULL);
	g_variant_unref (_tmp88_);
	_tmp89_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp89_, NULL);
	g_variant_unref (_tmp89_);
	_tmp90_ = g_variant_iter_next_value (&_arguments_iter);
	val = g_variant_get_variant (_tmp90_);
	g_variant_unref (_tmp90_);
	org_freedesktop_dbus_mock_add_property (self, interface_name, name, val, &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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (interface_name);
	_g_free0 (name);
	_g_variant_unref0 (val);
	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 _dbus_org_freedesktop_dbus_mock_add_template (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* template_name = NULL;
	GVariant* _tmp91_;
	GHashTable* template_params = NULL;
	GVariant* _tmp92_;
	GHashTable* _tmp93_;
	GVariantIter _tmp94_;
	GVariant* _tmp95_;
	GVariant* _tmp96_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp91_ = g_variant_iter_next_value (&_arguments_iter);
	template_name = g_variant_dup_string (_tmp91_, NULL);
	g_variant_unref (_tmp91_);
	_tmp92_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp93_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp94_, _tmp92_);
	while (g_variant_iter_loop (&_tmp94_, "{?*}", &_tmp95_, &_tmp96_)) {
		g_hash_table_insert (_tmp93_, g_variant_dup_string (_tmp95_, NULL), g_variant_get_variant (_tmp96_));
	}
	template_params = _tmp93_;
	g_variant_unref (_tmp92_);
	org_freedesktop_dbus_mock_add_template (self, template_name, template_params, &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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (template_name);
	_g_hash_table_unref0 (template_params);
	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 _dbus_org_freedesktop_dbus_mock_clear_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	org_freedesktop_dbus_mock_clear_calls (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);
	_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 _dbus_org_freedesktop_dbus_mock_emit_signal (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* interface_name = NULL;
	GVariant* _tmp97_;
	gchar* name = NULL;
	GVariant* _tmp98_;
	gchar* signature = NULL;
	GVariant* _tmp99_;
	GVariant** args = NULL;
	int args_length1 = 0;
	GVariant* _tmp100_;
	GVariant** _tmp101_;
	int _tmp101__length;
	int _tmp101__size;
	int _tmp101__length1;
	GVariantIter _tmp102_;
	GVariant* _tmp103_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp97_ = g_variant_iter_next_value (&_arguments_iter);
	interface_name = g_variant_dup_string (_tmp97_, NULL);
	g_variant_unref (_tmp97_);
	_tmp98_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp98_, NULL);
	g_variant_unref (_tmp98_);
	_tmp99_ = g_variant_iter_next_value (&_arguments_iter);
	signature = g_variant_dup_string (_tmp99_, NULL);
	g_variant_unref (_tmp99_);
	_tmp100_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp101_ = g_new (GVariant*, 5);
	_tmp101__length = 0;
	_tmp101__size = 4;
	_tmp101__length1 = 0;
	g_variant_iter_init (&_tmp102_, _tmp100_);
	for (; (_tmp103_ = g_variant_iter_next_value (&_tmp102_)) != NULL; _tmp101__length1++) {
		if (_tmp101__size == _tmp101__length) {
			_tmp101__size = 2 * _tmp101__size;
			_tmp101_ = g_renew (GVariant*, _tmp101_, _tmp101__size + 1);
		}
		_tmp101_[_tmp101__length++] = g_variant_get_variant (_tmp103_);
		g_variant_unref (_tmp103_);
	}
	args_length1 = _tmp101__length1;
	_tmp101_[_tmp101__length] = NULL;
	args = _tmp101_;
	g_variant_unref (_tmp100_);
	org_freedesktop_dbus_mock_emit_signal (self, interface_name, name, signature, args, args_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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (interface_name);
	_g_free0 (name);
	_g_free0 (signature);
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_variant_unref), NULL);
	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 _vala_orgfreedesktopDBusMockCall_array_free (orgfreedesktopDBusMockCall* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			org_freedesktop_dbus_mock_call_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void _dbus_org_freedesktop_dbus_mock_get_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	orgfreedesktopDBusMockCall* result;
	int result_length1 = 0;
	orgfreedesktopDBusMockCall* _tmp104_;
	GVariantBuilder _tmp105_;
	int _tmp106_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = org_freedesktop_dbus_mock_get_calls (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);
	_tmp104_ = result;
	g_variant_builder_init (&_tmp105_, G_VARIANT_TYPE ("a(tsav)"));
	for (_tmp106_ = 0; _tmp106_ < result_length1; _tmp106_++) {
		GVariantBuilder _tmp107_;
		GVariant** _tmp108_;
		GVariantBuilder _tmp109_;
		int _tmp110_;
		g_variant_builder_init (&_tmp107_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp107_, g_variant_new_uint64 ((*_tmp104_).call_time));
		g_variant_builder_add_value (&_tmp107_, g_variant_new_string ((*_tmp104_).method_name));
		_tmp108_ = (*_tmp104_).args;
		g_variant_builder_init (&_tmp109_, G_VARIANT_TYPE ("av"));
		for (_tmp110_ = 0; _tmp110_ < (*_tmp104_).args_length1; _tmp110_++) {
			g_variant_builder_add_value (&_tmp109_, g_variant_new_variant (*_tmp108_));
			_tmp108_++;
		}
		g_variant_builder_add_value (&_tmp107_, g_variant_builder_end (&_tmp109_));
		g_variant_builder_add_value (&_tmp105_, g_variant_builder_end (&_tmp107_));
		_tmp104_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp105_));
	result = (_vala_orgfreedesktopDBusMockCall_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 _vala_orgfreedesktopDBusMockMethodCall_array_free (orgfreedesktopDBusMockMethodCall* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			org_freedesktop_dbus_mock_method_call_destroy (&array[i]);
		}
	}
	g_free (array);
}


static void _dbus_org_freedesktop_dbus_mock_get_method_calls (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* method = NULL;
	GVariant* _tmp111_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	orgfreedesktopDBusMockMethodCall* result;
	int result_length1 = 0;
	orgfreedesktopDBusMockMethodCall* _tmp112_;
	GVariantBuilder _tmp113_;
	int _tmp114_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp111_ = g_variant_iter_next_value (&_arguments_iter);
	method = g_variant_dup_string (_tmp111_, NULL);
	g_variant_unref (_tmp111_);
	result = org_freedesktop_dbus_mock_get_method_calls (self, method, &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);
	_tmp112_ = result;
	g_variant_builder_init (&_tmp113_, G_VARIANT_TYPE ("a(tav)"));
	for (_tmp114_ = 0; _tmp114_ < result_length1; _tmp114_++) {
		GVariantBuilder _tmp115_;
		GVariant** _tmp116_;
		GVariantBuilder _tmp117_;
		int _tmp118_;
		g_variant_builder_init (&_tmp115_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp115_, g_variant_new_uint64 ((*_tmp112_).call_time));
		_tmp116_ = (*_tmp112_).args;
		g_variant_builder_init (&_tmp117_, G_VARIANT_TYPE ("av"));
		for (_tmp118_ = 0; _tmp118_ < (*_tmp112_).args_length1; _tmp118_++) {
			g_variant_builder_add_value (&_tmp117_, g_variant_new_variant (*_tmp116_));
			_tmp116_++;
		}
		g_variant_builder_add_value (&_tmp115_, g_variant_builder_end (&_tmp117_));
		g_variant_builder_add_value (&_tmp113_, g_variant_builder_end (&_tmp115_));
		_tmp112_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp113_));
	result = (_vala_orgfreedesktopDBusMockMethodCall_array_free (result, result_length1), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (method);
	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 _dbus_org_freedesktop_dbus_mock_remove_object (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* path = NULL;
	GVariant* _tmp119_;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp119_ = g_variant_iter_next_value (&_arguments_iter);
	path = g_variant_dup_string (_tmp119_, NULL);
	g_variant_unref (_tmp119_);
	org_freedesktop_dbus_mock_remove_object (self, path, &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);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	_g_free0 (path);
	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 _dbus_org_freedesktop_dbus_mock_reset (orgfreedesktopDBusMock* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	org_freedesktop_dbus_mock_reset (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);
	_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_freedesktop_dbus_mock_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, "AddMethod") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_method (object, parameters, invocation);
	} else if (strcmp (method_name, "AddMethods") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_methods (object, parameters, invocation);
	} else if (strcmp (method_name, "AddObject") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_object (object, parameters, invocation);
	} else if (strcmp (method_name, "AddProperties") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_properties (object, parameters, invocation);
	} else if (strcmp (method_name, "AddProperty") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_property (object, parameters, invocation);
	} else if (strcmp (method_name, "AddTemplate") == 0) {
		_dbus_org_freedesktop_dbus_mock_add_template (object, parameters, invocation);
	} else if (strcmp (method_name, "ClearCalls") == 0) {
		_dbus_org_freedesktop_dbus_mock_clear_calls (object, parameters, invocation);
	} else if (strcmp (method_name, "EmitSignal") == 0) {
		_dbus_org_freedesktop_dbus_mock_emit_signal (object, parameters, invocation);
	} else if (strcmp (method_name, "GetCalls") == 0) {
		_dbus_org_freedesktop_dbus_mock_get_calls (object, parameters, invocation);
	} else if (strcmp (method_name, "GetMethodCalls") == 0) {
		_dbus_org_freedesktop_dbus_mock_get_method_calls (object, parameters, invocation);
	} else if (strcmp (method_name, "RemoveObject") == 0) {
		_dbus_org_freedesktop_dbus_mock_remove_object (object, parameters, invocation);
	} else if (strcmp (method_name, "Reset") == 0) {
		_dbus_org_freedesktop_dbus_mock_reset (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}


static GVariant* org_freedesktop_dbus_mock_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_freedesktop_dbus_mock_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_freedesktop_dbus_mock_method_called (GObject* _sender, const gchar* method_name, GVariant** args, int args_length1, gpointer* _data) {
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariant** _tmp120_;
	GVariantBuilder _tmp121_;
	int _tmp122_;
	_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 (method_name));
	_tmp120_ = args;
	g_variant_builder_init (&_tmp121_, G_VARIANT_TYPE ("av"));
	for (_tmp122_ = 0; _tmp122_ < args_length1; _tmp122_++) {
		g_variant_builder_add_value (&_tmp121_, g_variant_new_variant (*_tmp120_));
		_tmp120_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp121_));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus.Mock", "MethodCalled", _arguments, NULL);
}


guint org_freedesktop_dbus_mock_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_freedesktop_dbus_mock_dbus_interface_info), &_org_freedesktop_dbus_mock_dbus_interface_vtable, data, _org_freedesktop_dbus_mock_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "method-called", (GCallback) _dbus_org_freedesktop_dbus_mock_method_called, data);
	return result;
}


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


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


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



