/* data-source-registry.c generated by valac 0.56.19, the Vala compiler
 * generated from data-source-registry.vala, do not modify */

/*
 * Copyright © 2012 Collabora Ltd.
 *             By Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com>
 *
 * This program 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 program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_DISCONNECTED_SIGNAL,
	ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_ENABLED_SIGNAL,
	ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_REGISTERED_SIGNAL,
	ZEITGEIST_REMOTE_REGISTRY_NUM_SIGNALS
};
static guint zeitgeist_remote_registry_signals[ZEITGEIST_REMOTE_REGISTRY_NUM_SIGNALS] = {0};
typedef GDBusProxy ZeitgeistRemoteRegistryProxy;
typedef GDBusProxyClass ZeitgeistRemoteRegistryProxyClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ZeitgeistRemoteRegistryGetDataSourcesReadyData ZeitgeistRemoteRegistryGetDataSourcesReadyData;
typedef struct _ZeitgeistRemoteRegistryRegisterDataSourceReadyData ZeitgeistRemoteRegistryRegisterDataSourceReadyData;
typedef struct _ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData;
typedef struct _ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData;
enum  {
	ZEITGEIST_DATA_SOURCE_REGISTRY_0_PROPERTY,
	ZEITGEIST_DATA_SOURCE_REGISTRY_NUM_PROPERTIES
};
static GParamSpec* zeitgeist_data_source_registry_properties[ZEITGEIST_DATA_SOURCE_REGISTRY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _ZeitgeistDataSourceRegistryGetDataSourcesData ZeitgeistDataSourceRegistryGetDataSourcesData;
typedef struct _ZeitgeistDataSourceRegistryGetDataSourceFromIdData ZeitgeistDataSourceRegistryGetDataSourceFromIdData;
typedef struct _ZeitgeistDataSourceRegistryRegisterDataSourceData ZeitgeistDataSourceRegistryRegisterDataSourceData;
typedef struct _ZeitgeistDataSourceRegistrySetDataSourceEnabledData ZeitgeistDataSourceRegistrySetDataSourceEnabledData;
enum  {
	ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_DISCONNECTED_SIGNAL,
	ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_ENABLED_SIGNAL,
	ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_REGISTERED_SIGNAL,
	ZEITGEIST_DATA_SOURCE_REGISTRY_NUM_SIGNALS
};
static guint zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_NUM_SIGNALS] = {0};

struct _ZeitgeistRemoteRegistryGetDataSourcesReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _ZeitgeistRemoteRegistryRegisterDataSourceReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* unique_id;
	gchar* name;
	gchar* description;
	GVariant* event_templates;
};

struct _ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* unique_id;
	gboolean enabled;
};

struct _ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* unique_id;
};

struct _ZeitgeistDataSourceRegistryPrivate {
	ZeitgeistRemoteRegistry* proxy;
};

struct _ZeitgeistDataSourceRegistryGetDataSourcesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ZeitgeistDataSourceRegistry* self;
	GCancellable* cancellable;
	GPtrArray* result;
	GVariant* _result_;
	ZeitgeistRemoteRegistry* _tmp0_;
	GVariant* _tmp1_;
	GPtrArray* _tmp2_;
	GVariant* _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	GError* _inner_error0_;
};

struct _ZeitgeistDataSourceRegistryGetDataSourceFromIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ZeitgeistDataSourceRegistry* self;
	gchar* unique_id;
	GCancellable* cancellable;
	ZeitgeistDataSource* result;
	GVariant* _result_;
	ZeitgeistRemoteRegistry* _tmp0_;
	GVariant* _tmp1_;
	ZeitgeistDataSource* _tmp2_;
	GVariant* _tmp3_;
	ZeitgeistDataSource* _tmp4_;
	ZeitgeistDataSource* _tmp5_;
	GError* _inner_error0_;
};

struct _ZeitgeistDataSourceRegistryRegisterDataSourceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ZeitgeistDataSourceRegistry* self;
	ZeitgeistDataSource* data_source;
	GCancellable* cancellable;
	gboolean result;
	gboolean _tmp0_;
	ZeitgeistRemoteRegistry* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GPtrArray* _tmp8_;
	GPtrArray* _tmp9_;
	GVariant* _tmp10_;
	GVariant* _tmp11_;
	gboolean _tmp12_;
	GError* _inner_error0_;
};

struct _ZeitgeistDataSourceRegistrySetDataSourceEnabledData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ZeitgeistDataSourceRegistry* self;
	gchar* unique_id;
	gboolean enabled;
	GCancellable* cancellable;
	ZeitgeistRemoteRegistry* _tmp0_;
	GError* _inner_error0_;
};

static gint ZeitgeistDataSourceRegistry_private_offset;
static gpointer zeitgeist_data_source_registry_parent_class = NULL;

static void g_cclosure_user_marshal_VOID__STRING_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static GType zeitgeist_remote_registry_get_type_once (void);
static void zeitgeist_remote_registry_proxy_g_signal (GDBusProxy* proxy,
                                               const gchar* sender_name,
                                               const gchar* signal_name,
                                               GVariant* parameters);
static void _dbus_handle_zeitgeist_remote_registry_data_source_disconnected (ZeitgeistRemoteRegistry* self,
                                                                      GVariant* parameters);
static void _dbus_handle_zeitgeist_remote_registry_data_source_enabled (ZeitgeistRemoteRegistry* self,
                                                                 GVariant* parameters);
static void _dbus_handle_zeitgeist_remote_registry_data_source_registered (ZeitgeistRemoteRegistry* self,
                                                                    GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void zeitgeist_remote_registry_proxy_get_data_sources_async (ZeitgeistRemoteRegistry* self,
                                                             GCancellable* cancellable,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
static GVariant* zeitgeist_remote_registry_proxy_get_data_sources_finish (ZeitgeistRemoteRegistry* self,
                                                                   GAsyncResult* _res_,
                                                                   GError** error);
static void zeitgeist_remote_registry_proxy_register_data_source_async (ZeitgeistRemoteRegistry* self,
                                                                 const gchar* unique_id,
                                                                 const gchar* name,
                                                                 const gchar* description,
                                                                 GVariant* event_templates,
                                                                 GCancellable* cancellable,
                                                                 const char* sender,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static gboolean zeitgeist_remote_registry_proxy_register_data_source_finish (ZeitgeistRemoteRegistry* self,
                                                                      GAsyncResult* _res_,
                                                                      GError** error);
static void zeitgeist_remote_registry_proxy_set_data_source_enabled_async (ZeitgeistRemoteRegistry* self,
                                                                    const gchar* unique_id,
                                                                    gboolean enabled,
                                                                    GCancellable* cancellable,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static void zeitgeist_remote_registry_proxy_set_data_source_enabled_finish (ZeitgeistRemoteRegistry* self,
                                                                     GAsyncResult* _res_,
                                                                     GError** error);
static void zeitgeist_remote_registry_proxy_get_data_source_from_id_async (ZeitgeistRemoteRegistry* self,
                                                                    const gchar* unique_id,
                                                                    GCancellable* cancellable,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static GVariant* zeitgeist_remote_registry_proxy_get_data_source_from_id_finish (ZeitgeistRemoteRegistry* self,
                                                                          GAsyncResult* _res_,
                                                                          GError** error);
static void zeitgeist_remote_registry_proxy_zeitgeist_remote_registry_interface_init (ZeitgeistRemoteRegistryIface* iface);
static void _dbus_zeitgeist_remote_registry_get_data_sources (ZeitgeistRemoteRegistry* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_zeitgeist_remote_registry_get_data_sources_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_);
static void _dbus_zeitgeist_remote_registry_register_data_source (ZeitgeistRemoteRegistry* self,
                                                           GVariant* _parameters_,
                                                           GDBusMethodInvocation* invocation);
static void _dbus_zeitgeist_remote_registry_register_data_source_ready (GObject * source_object,
                                                                 GAsyncResult * _res_,
                                                                 gpointer _user_data_);
static void _dbus_zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self,
                                                              GVariant* _parameters_,
                                                              GDBusMethodInvocation* invocation);
static void _dbus_zeitgeist_remote_registry_set_data_source_enabled_ready (GObject * source_object,
                                                                    GAsyncResult * _res_,
                                                                    gpointer _user_data_);
static void _dbus_zeitgeist_remote_registry_get_data_source_from_id (ZeitgeistRemoteRegistry* self,
                                                              GVariant* _parameters_,
                                                              GDBusMethodInvocation* invocation);
static void _dbus_zeitgeist_remote_registry_get_data_source_from_id_ready (GObject * source_object,
                                                                    GAsyncResult * _res_,
                                                                    gpointer _user_data_);
static void zeitgeist_remote_registry_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* zeitgeist_remote_registry_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 zeitgeist_remote_registry_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_zeitgeist_remote_registry_data_source_disconnected (GObject* _sender,
                                                               GVariant* data_source,
                                                               gpointer* _data);
static void _dbus_zeitgeist_remote_registry_data_source_enabled (GObject* _sender,
                                                          const gchar* unique_id,
                                                          gboolean enabled,
                                                          gpointer* _data);
static void _dbus_zeitgeist_remote_registry_data_source_registered (GObject* _sender,
                                                             GVariant* data_source,
                                                             gpointer* _data);
static void _zeitgeist_remote_registry_unregister_object (gpointer user_data);
static void __lambda4_ (ZeitgeistDataSourceRegistry* self,
                 GObject* obj,
                 GAsyncResult* res);
static void ___lambda4__gasync_ready_callback (GObject* source_object,
                                        GAsyncResult* res,
                                        gpointer self);
static void zeitgeist_data_source_registry_real_on_connection_established (ZeitgeistQueuedProxyWrapper* base);
static void __lambda5_ (ZeitgeistDataSourceRegistry* self,
                 GVariant* data_source);
static void ___lambda5__zeitgeist_remote_registry_data_source_disconnected (ZeitgeistRemoteRegistry* _sender,
                                                                     GVariant* data_source,
                                                                     gpointer self);
static void __lambda6_ (ZeitgeistDataSourceRegistry* self,
                 const gchar* unique_id,
                 gboolean enabled);
static void ___lambda6__zeitgeist_remote_registry_data_source_enabled (ZeitgeistRemoteRegistry* _sender,
                                                                const gchar* unique_id,
                                                                gboolean enabled,
                                                                gpointer self);
static void __lambda7_ (ZeitgeistDataSourceRegistry* self,
                 GVariant* data_source);
static void ___lambda7__zeitgeist_remote_registry_data_source_registered (ZeitgeistRemoteRegistry* _sender,
                                                                   GVariant* data_source,
                                                                   gpointer self);
static void zeitgeist_data_source_registry_real_on_connection_lost (ZeitgeistQueuedProxyWrapper* base);
static void zeitgeist_data_source_registry_get_data_sources_data_free (gpointer _data);
static gboolean zeitgeist_data_source_registry_get_data_sources_co (ZeitgeistDataSourceRegistryGetDataSourcesData* _data_);
static void zeitgeist_data_source_registry_get_data_sources_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_);
static void zeitgeist_data_source_registry_get_data_source_from_id_data_free (gpointer _data);
static gboolean zeitgeist_data_source_registry_get_data_source_from_id_co (ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_);
static void zeitgeist_data_source_registry_get_data_source_from_id_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_);
static void zeitgeist_data_source_registry_register_data_source_data_free (gpointer _data);
static gboolean zeitgeist_data_source_registry_register_data_source_co (ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_);
static void zeitgeist_data_source_registry_register_data_source_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
static void zeitgeist_data_source_registry_set_data_source_enabled_data_free (gpointer _data);
static gboolean zeitgeist_data_source_registry_set_data_source_enabled_co (ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_);
static void zeitgeist_data_source_registry_set_data_source_enabled_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_);
static void zeitgeist_data_source_registry_finalize (GObject * obj);
static GType zeitgeist_data_source_registry_get_type_once (void);

static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_sources_result = {-1, "result", "a(sssa(asaasay)bxb)", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_get_data_sources_in[] = {NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_get_data_sources_out[] = {&_zeitgeist_remote_registry_dbus_arg_info_get_data_sources_result, NULL};
static const GDBusMethodInfo _zeitgeist_remote_registry_dbus_method_info_get_data_sources = {-1, "GetDataSources", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_get_data_sources_in), (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_get_data_sources_out), NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_unique_id = {-1, "unique_id", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_description = {-1, "description", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_event_templates = {-1, "event_templates", "a(asaasay)", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_register_data_source_in[] = {&_zeitgeist_remote_registry_dbus_arg_info_register_data_source_unique_id, &_zeitgeist_remote_registry_dbus_arg_info_register_data_source_name, &_zeitgeist_remote_registry_dbus_arg_info_register_data_source_description, &_zeitgeist_remote_registry_dbus_arg_info_register_data_source_event_templates, NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_register_data_source_out[] = {&_zeitgeist_remote_registry_dbus_arg_info_register_data_source_result, NULL};
static const GDBusMethodInfo _zeitgeist_remote_registry_dbus_method_info_register_data_source = {-1, "RegisterDataSource", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_register_data_source_in), (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_register_data_source_out), NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_unique_id = {-1, "unique_id", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_enabled = {-1, "enabled", "b", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_in[] = {&_zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_unique_id, &_zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_enabled, NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_out[] = {NULL};
static const GDBusMethodInfo _zeitgeist_remote_registry_dbus_method_info_set_data_source_enabled = {-1, "SetDataSourceEnabled", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_in), (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_out), NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_unique_id = {-1, "unique_id", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_result = {-1, "result", "(sssa(asaasay)bxb)", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_in[] = {&_zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_unique_id, NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_out[] = {&_zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_result, NULL};
static const GDBusMethodInfo _zeitgeist_remote_registry_dbus_method_info_get_data_source_from_id = {-1, "GetDataSourceFromId", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_in), (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_out), NULL};
static const GDBusMethodInfo * const _zeitgeist_remote_registry_dbus_method_info[] = {&_zeitgeist_remote_registry_dbus_method_info_get_data_sources, &_zeitgeist_remote_registry_dbus_method_info_register_data_source, &_zeitgeist_remote_registry_dbus_method_info_set_data_source_enabled, &_zeitgeist_remote_registry_dbus_method_info_get_data_source_from_id, NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_disconnected_data_source = {-1, "data_source", "(sssa(asaasay)bxb)", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_data_source_disconnected[] = {&_zeitgeist_remote_registry_dbus_arg_info_data_source_disconnected_data_source, NULL};
static const GDBusSignalInfo _zeitgeist_remote_registry_dbus_signal_info_data_source_disconnected = {-1, "DataSourceDisconnected", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_data_source_disconnected), NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_unique_id = {-1, "unique_id", "s", NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_enabled = {-1, "enabled", "b", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_data_source_enabled[] = {&_zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_unique_id, &_zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_enabled, NULL};
static const GDBusSignalInfo _zeitgeist_remote_registry_dbus_signal_info_data_source_enabled = {-1, "DataSourceEnabled", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_data_source_enabled), NULL};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_registered_data_source = {-1, "data_source", "(sssa(asaasay)bxb)", NULL};
static const GDBusArgInfo * const _zeitgeist_remote_registry_dbus_arg_info_data_source_registered[] = {&_zeitgeist_remote_registry_dbus_arg_info_data_source_registered_data_source, NULL};
static const GDBusSignalInfo _zeitgeist_remote_registry_dbus_signal_info_data_source_registered = {-1, "DataSourceRegistered", (GDBusArgInfo **) (&_zeitgeist_remote_registry_dbus_arg_info_data_source_registered), NULL};
static const GDBusSignalInfo * const _zeitgeist_remote_registry_dbus_signal_info[] = {&_zeitgeist_remote_registry_dbus_signal_info_data_source_disconnected, &_zeitgeist_remote_registry_dbus_signal_info_data_source_enabled, &_zeitgeist_remote_registry_dbus_signal_info_data_source_registered, NULL};
static const GDBusPropertyInfo * const _zeitgeist_remote_registry_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _zeitgeist_remote_registry_dbus_interface_info = {-1, "org.gnome.zeitgeist.DataSourceRegistry", (GDBusMethodInfo **) (&_zeitgeist_remote_registry_dbus_method_info), (GDBusSignalInfo **) (&_zeitgeist_remote_registry_dbus_signal_info), (GDBusPropertyInfo **) (&_zeitgeist_remote_registry_dbus_property_info), NULL};
static const GDBusInterfaceVTable _zeitgeist_remote_registry_dbus_interface_vtable = {zeitgeist_remote_registry_dbus_interface_method_call, zeitgeist_remote_registry_dbus_interface_get_property, zeitgeist_remote_registry_dbus_interface_set_property};

void
zeitgeist_remote_registry_get_data_sources (ZeitgeistRemoteRegistry* self,
                                            GCancellable* cancellable,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->get_data_sources) {
		_iface_->get_data_sources (self, cancellable, _callback_, _user_data_);
	}
}

GVariant*
zeitgeist_remote_registry_get_data_sources_finish (ZeitgeistRemoteRegistry* self,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->get_data_sources_finish) {
		return _iface_->get_data_sources_finish (self, _res_, error);
	}
	return NULL;
}

void
zeitgeist_remote_registry_register_data_source (ZeitgeistRemoteRegistry* self,
                                                const gchar* unique_id,
                                                const gchar* name,
                                                const gchar* description,
                                                GVariant* event_templates,
                                                GCancellable* cancellable,
                                                const char* sender,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->register_data_source) {
		_iface_->register_data_source (self, unique_id, name, description, event_templates, cancellable, sender, _callback_, _user_data_);
	}
}

gboolean
zeitgeist_remote_registry_register_data_source_finish (ZeitgeistRemoteRegistry* self,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->register_data_source_finish) {
		return _iface_->register_data_source_finish (self, _res_, error);
	}
	return FALSE;
}

void
zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self,
                                                   const gchar* unique_id,
                                                   gboolean enabled,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->set_data_source_enabled) {
		_iface_->set_data_source_enabled (self, unique_id, enabled, cancellable, _callback_, _user_data_);
	}
}

void
zeitgeist_remote_registry_set_data_source_enabled_finish (ZeitgeistRemoteRegistry* self,
                                                          GAsyncResult* _res_,
                                                          GError** error)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->set_data_source_enabled_finish) {
		_iface_->set_data_source_enabled_finish (self, _res_, error);
	}
}

void
zeitgeist_remote_registry_get_data_source_from_id (ZeitgeistRemoteRegistry* self,
                                                   const gchar* unique_id,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->get_data_source_from_id) {
		_iface_->get_data_source_from_id (self, unique_id, cancellable, _callback_, _user_data_);
	}
}

GVariant*
zeitgeist_remote_registry_get_data_source_from_id_finish (ZeitgeistRemoteRegistry* self,
                                                          GAsyncResult* _res_,
                                                          GError** error)
{
	ZeitgeistRemoteRegistryIface* _iface_;
	_iface_ = ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self);
	if (_iface_->get_data_source_from_id_finish) {
		return _iface_->get_data_source_from_id_finish (self, _res_, error);
	}
	return NULL;
}

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

static void
zeitgeist_remote_registry_default_init (ZeitgeistRemoteRegistryIface * iface,
                                        gpointer iface_data)
{
	zeitgeist_remote_registry_signals[ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_DISCONNECTED_SIGNAL] = g_signal_new ("data-source-disconnected", ZEITGEIST_TYPE_REMOTE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VARIANT, G_TYPE_NONE, 1, G_TYPE_VARIANT);
	zeitgeist_remote_registry_signals[ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_ENABLED_SIGNAL] = g_signal_new ("data-source-enabled", ZEITGEIST_TYPE_REMOTE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
	zeitgeist_remote_registry_signals[ZEITGEIST_REMOTE_REGISTRY_DATA_SOURCE_REGISTERED_SIGNAL] = g_signal_new ("data-source-registered", ZEITGEIST_TYPE_REMOTE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VARIANT, G_TYPE_NONE, 1, G_TYPE_VARIANT);
}

static GType
zeitgeist_remote_registry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ZeitgeistRemoteRegistryIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zeitgeist_remote_registry_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType zeitgeist_remote_registry_type_id;
	zeitgeist_remote_registry_type_id = g_type_register_static (G_TYPE_INTERFACE, "ZeitgeistRemoteRegistry", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (zeitgeist_remote_registry_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (zeitgeist_remote_registry_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) zeitgeist_remote_registry_proxy_get_type);
	g_type_set_qdata (zeitgeist_remote_registry_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.zeitgeist.DataSourceRegistry");
	g_type_set_qdata (zeitgeist_remote_registry_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_zeitgeist_remote_registry_dbus_interface_info));
	g_type_set_qdata (zeitgeist_remote_registry_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) zeitgeist_remote_registry_register_object);
	return zeitgeist_remote_registry_type_id;
}

GType
zeitgeist_remote_registry_get_type (void)
{
	static volatile gsize zeitgeist_remote_registry_type_id__once = 0;
	if (g_once_init_enter (&zeitgeist_remote_registry_type_id__once)) {
		GType zeitgeist_remote_registry_type_id;
		zeitgeist_remote_registry_type_id = zeitgeist_remote_registry_get_type_once ();
		g_once_init_leave (&zeitgeist_remote_registry_type_id__once, zeitgeist_remote_registry_type_id);
	}
	return zeitgeist_remote_registry_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (ZeitgeistRemoteRegistryProxy, zeitgeist_remote_registry_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ZEITGEIST_TYPE_REMOTE_REGISTRY, zeitgeist_remote_registry_proxy_zeitgeist_remote_registry_interface_init) )
static void
zeitgeist_remote_registry_proxy_class_init (ZeitgeistRemoteRegistryProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = zeitgeist_remote_registry_proxy_g_signal;
}

static void
_dbus_handle_zeitgeist_remote_registry_data_source_disconnected (ZeitgeistRemoteRegistry* self,
                                                                 GVariant* parameters)
{
	GVariantIter _arguments_iter;
	GVariant* data_source = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	data_source = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "data-source-disconnected", data_source);
	_g_variant_unref0 (data_source);
}

static void
_dbus_handle_zeitgeist_remote_registry_data_source_enabled (ZeitgeistRemoteRegistry* self,
                                                            GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* unique_id = NULL;
	GVariant* _tmp0_;
	gboolean enabled = FALSE;
	GVariant* _tmp1_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	unique_id = g_variant_dup_string (_tmp0_, NULL);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	enabled = g_variant_get_boolean (_tmp1_);
	g_variant_unref (_tmp1_);
	g_signal_emit_by_name (self, "data-source-enabled", unique_id, enabled);
	_g_free0 (unique_id);
}

static void
_dbus_handle_zeitgeist_remote_registry_data_source_registered (ZeitgeistRemoteRegistry* self,
                                                               GVariant* parameters)
{
	GVariantIter _arguments_iter;
	GVariant* data_source = NULL;
	g_variant_iter_init (&_arguments_iter, parameters);
	data_source = g_variant_iter_next_value (&_arguments_iter);
	g_signal_emit_by_name (self, "data-source-registered", data_source);
	_g_variant_unref0 (data_source);
}

static void
zeitgeist_remote_registry_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters)
{
	if (strcmp (signal_name, "DataSourceDisconnected") == 0) {
		_dbus_handle_zeitgeist_remote_registry_data_source_disconnected ((ZeitgeistRemoteRegistry*) proxy, parameters);
	} else if (strcmp (signal_name, "DataSourceEnabled") == 0) {
		_dbus_handle_zeitgeist_remote_registry_data_source_enabled ((ZeitgeistRemoteRegistry*) proxy, parameters);
	} else if (strcmp (signal_name, "DataSourceRegistered") == 0) {
		_dbus_handle_zeitgeist_remote_registry_data_source_registered ((ZeitgeistRemoteRegistry*) proxy, parameters);
	}
}

static void
zeitgeist_remote_registry_proxy_init (ZeitgeistRemoteRegistryProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_zeitgeist_remote_registry_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
zeitgeist_remote_registry_proxy_get_data_sources_async (ZeitgeistRemoteRegistry* self,
                                                        GCancellable* cancellable,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.zeitgeist.DataSourceRegistry", "GetDataSources");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, cancellable, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static GVariant*
zeitgeist_remote_registry_proxy_get_data_sources_finish (ZeitgeistRemoteRegistry* self,
                                                         GAsyncResult* _res_,
                                                         GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _result = NULL;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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 = g_variant_iter_next_value (&_reply_iter);
	g_object_unref (_reply_message);
	return _result;
}

static void
zeitgeist_remote_registry_proxy_register_data_source_async (ZeitgeistRemoteRegistry* self,
                                                            const gchar* unique_id,
                                                            const gchar* name,
                                                            const gchar* description,
                                                            GVariant* event_templates,
                                                            GCancellable* cancellable,
                                                            const char* sender,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.zeitgeist.DataSourceRegistry", "RegisterDataSource");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (unique_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (description));
	g_variant_builder_add_value (&_arguments_builder, event_templates);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, cancellable, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static gboolean
zeitgeist_remote_registry_proxy_register_data_source_finish (ZeitgeistRemoteRegistry* self,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp4_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		gboolean _tmp2_ = FALSE;
		return _tmp2_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp3_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp3_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp4_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp4_);
	g_variant_unref (_tmp4_);
	g_object_unref (_reply_message);
	return _result;
}

static void
zeitgeist_remote_registry_proxy_set_data_source_enabled_async (ZeitgeistRemoteRegistry* self,
                                                               const gchar* unique_id,
                                                               gboolean enabled,
                                                               GCancellable* cancellable,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.zeitgeist.DataSourceRegistry", "SetDataSourceEnabled");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (unique_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (enabled));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, cancellable, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
zeitgeist_remote_registry_proxy_set_data_source_enabled_finish (ZeitgeistRemoteRegistry* self,
                                                                GAsyncResult* _res_,
                                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
zeitgeist_remote_registry_proxy_get_data_source_from_id_async (ZeitgeistRemoteRegistry* self,
                                                               const gchar* unique_id,
                                                               GCancellable* cancellable,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.zeitgeist.DataSourceRegistry", "GetDataSourceFromId");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (unique_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, cancellable, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static GVariant*
zeitgeist_remote_registry_proxy_get_data_source_from_id_finish (ZeitgeistRemoteRegistry* self,
                                                                GAsyncResult* _res_,
                                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _result = NULL;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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 = g_variant_iter_next_value (&_reply_iter);
	g_object_unref (_reply_message);
	return _result;
}

static void
zeitgeist_remote_registry_proxy_zeitgeist_remote_registry_interface_init (ZeitgeistRemoteRegistryIface* iface)
{
	iface->get_data_sources = zeitgeist_remote_registry_proxy_get_data_sources_async;
	iface->get_data_sources_finish = zeitgeist_remote_registry_proxy_get_data_sources_finish;
	iface->register_data_source = zeitgeist_remote_registry_proxy_register_data_source_async;
	iface->register_data_source_finish = zeitgeist_remote_registry_proxy_register_data_source_finish;
	iface->set_data_source_enabled = zeitgeist_remote_registry_proxy_set_data_source_enabled_async;
	iface->set_data_source_enabled_finish = zeitgeist_remote_registry_proxy_set_data_source_enabled_finish;
	iface->get_data_source_from_id = zeitgeist_remote_registry_proxy_get_data_source_from_id_async;
	iface->get_data_source_from_id_finish = zeitgeist_remote_registry_proxy_get_data_source_from_id_finish;
}

static void
_dbus_zeitgeist_remote_registry_get_data_sources (ZeitgeistRemoteRegistry* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	ZeitgeistRemoteRegistryGetDataSourcesReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (ZeitgeistRemoteRegistryGetDataSourcesReadyData);
	_ready_data->_invocation_ = invocation;
	zeitgeist_remote_registry_get_data_sources (self, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_get_data_sources_ready, _ready_data);
}

static void
_dbus_zeitgeist_remote_registry_get_data_sources_ready (GObject * source_object,
                                                        GAsyncResult * _res_,
                                                        gpointer _user_data_)
{
	ZeitgeistRemoteRegistryGetDataSourcesReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = zeitgeist_remote_registry_get_data_sources_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, result);
	_g_variant_unref0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	g_slice_free (ZeitgeistRemoteRegistryGetDataSourcesReadyData, _ready_data);
}

static void
_dbus_zeitgeist_remote_registry_register_data_source (ZeitgeistRemoteRegistry* self,
                                                      GVariant* _parameters_,
                                                      GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	ZeitgeistRemoteRegistryRegisterDataSourceReadyData* _ready_data;
	GVariant* _tmp5_;
	GVariant* _tmp6_;
	GVariant* _tmp7_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (ZeitgeistRemoteRegistryRegisterDataSourceReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->unique_id = g_variant_dup_string (_tmp5_, NULL);
	g_variant_unref (_tmp5_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->name = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->description = g_variant_dup_string (_tmp7_, NULL);
	g_variant_unref (_tmp7_);
	_ready_data->event_templates = g_variant_iter_next_value (&_arguments_iter);
	zeitgeist_remote_registry_register_data_source (self, _ready_data->unique_id, _ready_data->name, _ready_data->description, _ready_data->event_templates, NULL, g_dbus_method_invocation_get_sender (invocation), (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_register_data_source_ready, _ready_data);
	_error:
	;
}

static void
_dbus_zeitgeist_remote_registry_register_data_source_ready (GObject * source_object,
                                                            GAsyncResult * _res_,
                                                            gpointer _user_data_)
{
	ZeitgeistRemoteRegistryRegisterDataSourceReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = zeitgeist_remote_registry_register_data_source_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->unique_id);
	_g_free0 (_ready_data->name);
	_g_free0 (_ready_data->description);
	_g_variant_unref0 (_ready_data->event_templates);
	g_slice_free (ZeitgeistRemoteRegistryRegisterDataSourceReadyData, _ready_data);
}

static void
_dbus_zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData* _ready_data;
	GVariant* _tmp8_;
	GVariant* _tmp9_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->unique_id = g_variant_dup_string (_tmp8_, NULL);
	g_variant_unref (_tmp8_);
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->enabled = g_variant_get_boolean (_tmp9_);
	g_variant_unref (_tmp9_);
	zeitgeist_remote_registry_set_data_source_enabled (self, _ready_data->unique_id, _ready_data->enabled, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_set_data_source_enabled_ready, _ready_data);
	_error:
	;
}

static void
_dbus_zeitgeist_remote_registry_set_data_source_enabled_ready (GObject * source_object,
                                                               GAsyncResult * _res_,
                                                               gpointer _user_data_)
{
	ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	zeitgeist_remote_registry_set_data_source_enabled_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_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);
	_error:
	_g_free0 (_ready_data->unique_id);
	g_slice_free (ZeitgeistRemoteRegistrySetDataSourceEnabledReadyData, _ready_data);
}

static void
_dbus_zeitgeist_remote_registry_get_data_source_from_id (ZeitgeistRemoteRegistry* self,
                                                         GVariant* _parameters_,
                                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData* _ready_data;
	GVariant* _tmp10_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp10_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->unique_id = g_variant_dup_string (_tmp10_, NULL);
	g_variant_unref (_tmp10_);
	zeitgeist_remote_registry_get_data_source_from_id (self, _ready_data->unique_id, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_get_data_source_from_id_ready, _ready_data);
	_error:
	;
}

static void
_dbus_zeitgeist_remote_registry_get_data_source_from_id_ready (GObject * source_object,
                                                               GAsyncResult * _res_,
                                                               gpointer _user_data_)
{
	ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = zeitgeist_remote_registry_get_data_source_from_id_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, result);
	_g_variant_unref0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->unique_id);
	g_slice_free (ZeitgeistRemoteRegistryGetDataSourceFromIdReadyData, _ready_data);
}

static void
zeitgeist_remote_registry_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, "GetDataSources") == 0) {
		_dbus_zeitgeist_remote_registry_get_data_sources (object, parameters, invocation);
	} else if (strcmp (method_name, "RegisterDataSource") == 0) {
		_dbus_zeitgeist_remote_registry_register_data_source (object, parameters, invocation);
	} else if (strcmp (method_name, "SetDataSourceEnabled") == 0) {
		_dbus_zeitgeist_remote_registry_set_data_source_enabled (object, parameters, invocation);
	} else if (strcmp (method_name, "GetDataSourceFromId") == 0) {
		_dbus_zeitgeist_remote_registry_get_data_source_from_id (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
zeitgeist_remote_registry_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)
{
	return NULL;
}

static gboolean
zeitgeist_remote_registry_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)
{
	return FALSE;
}

static void
_dbus_zeitgeist_remote_registry_data_source_disconnected (GObject* _sender,
                                                          GVariant* data_source,
                                                          gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, data_source);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.zeitgeist.DataSourceRegistry", "DataSourceDisconnected", _arguments, NULL);
}

static void
_dbus_zeitgeist_remote_registry_data_source_enabled (GObject* _sender,
                                                     const gchar* unique_id,
                                                     gboolean enabled,
                                                     gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (unique_id));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (enabled));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.zeitgeist.DataSourceRegistry", "DataSourceEnabled", _arguments, NULL);
}

static void
_dbus_zeitgeist_remote_registry_data_source_registered (GObject* _sender,
                                                        GVariant* data_source,
                                                        gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, data_source);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.gnome.zeitgeist.DataSourceRegistry", "DataSourceRegistered", _arguments, NULL);
}

guint
zeitgeist_remote_registry_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 *) (&_zeitgeist_remote_registry_dbus_interface_info), &_zeitgeist_remote_registry_dbus_interface_vtable, data, _zeitgeist_remote_registry_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "data-source-disconnected", (GCallback) _dbus_zeitgeist_remote_registry_data_source_disconnected, data);
	g_signal_connect (object, "data-source-enabled", (GCallback) _dbus_zeitgeist_remote_registry_data_source_enabled, data);
	g_signal_connect (object, "data-source-registered", (GCallback) _dbus_zeitgeist_remote_registry_data_source_registered, data);
	return result;
}

static void
_zeitgeist_remote_registry_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_zeitgeist_remote_registry_data_source_disconnected, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_zeitgeist_remote_registry_data_source_enabled, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_zeitgeist_remote_registry_data_source_registered, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
zeitgeist_data_source_registry_get_instance_private (ZeitgeistDataSourceRegistry* self)
{
	return G_STRUCT_MEMBER_P (self, ZeitgeistDataSourceRegistry_private_offset);
}

static void
__lambda4_ (ZeitgeistDataSourceRegistry* self,
            GObject* obj,
            GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		ZeitgeistRemoteRegistry* _tmp0_ = NULL;
		ZeitgeistRemoteRegistry* _tmp1_;
		ZeitgeistRemoteRegistry* _tmp2_;
		ZeitgeistRemoteRegistry* _tmp3_;
		ZeitgeistRemoteRegistry* _tmp4_;
		_tmp1_ = g_async_result_get_source_object (res);
		_tmp2_ = (ZeitgeistRemoteRegistry*) g_async_initable_new_finish ((GAsyncInitable *) _tmp1_, res, &_inner_error0_);
		g_object_unref (_tmp1_);
		_tmp0_ = (ZeitgeistRemoteRegistry*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->proxy);
		self->priv->proxy = _tmp3_;
		_tmp4_ = self->priv->proxy;
		zeitgeist_queued_proxy_wrapper_proxy_acquired ((ZeitgeistQueuedProxyWrapper*) self, (GObject*) _tmp4_);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_io_error:
	{
		GError* err = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		GError* _tmp7_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = err;
		_tmp6_ = _tmp5_->message;
		g_critical ("Unable to connect to Zeitgeist's " "DataSourceRegistry: %s", _tmp6_);
		_tmp7_ = err;
		zeitgeist_queued_proxy_wrapper_proxy_unavailable ((ZeitgeistQueuedProxyWrapper*) self, _tmp7_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda4__gasync_ready_callback (GObject* source_object,
                                   GAsyncResult* res,
                                   gpointer self)
{
	__lambda4_ ((ZeitgeistDataSourceRegistry*) self, source_object, res);
	g_object_unref (self);
}

ZeitgeistDataSourceRegistry*
zeitgeist_data_source_registry_construct (GType object_type)
{
	ZeitgeistDataSourceRegistry * self = NULL;
	GError* _inner_error0_ = NULL;
	self = (ZeitgeistDataSourceRegistry*) zeitgeist_queued_proxy_wrapper_construct (object_type);
	g_async_initable_new_async (ZEITGEIST_TYPE_REMOTE_REGISTRY_PROXY, 0, NULL, ___lambda4__gasync_ready_callback, g_object_ref (self), "g-flags", 0, "g-name", ZEITGEIST_UTILS_ENGINE_DBUS_NAME, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/zeitgeist/data_source_registry", "g-interface-name", "org.gnome.zeitgeist.DataSourceRegistry", NULL);
	return self;
}

ZeitgeistDataSourceRegistry*
zeitgeist_data_source_registry_new (void)
{
	return zeitgeist_data_source_registry_construct (ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY);
}

static void
__lambda5_ (ZeitgeistDataSourceRegistry* self,
            GVariant* data_source)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (data_source != NULL);
	{
		ZeitgeistDataSource* source = NULL;
		ZeitgeistDataSource* _tmp0_;
		_tmp0_ = zeitgeist_data_source_new_from_variant (data_source, FALSE, &_inner_error0_);
		source = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == ZEITGEIST_DATA_MODEL_ERROR) {
				goto __catch0_zeitgeist_data_model_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		g_signal_emit (self, zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_DISCONNECTED_SIGNAL], 0, source);
		_g_object_unref0 (source);
	}
	goto __finally0;
	__catch0_zeitgeist_data_model_error:
	{
		GError* err = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = err;
		_tmp2_ = _tmp1_->message;
		g_warning ("data-source-registry.vala:98: Error parsing data-source: %s", _tmp2_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda5__zeitgeist_remote_registry_data_source_disconnected (ZeitgeistRemoteRegistry* _sender,
                                                                GVariant* data_source,
                                                                gpointer self)
{
	__lambda5_ ((ZeitgeistDataSourceRegistry*) self, data_source);
}

static void
__lambda6_ (ZeitgeistDataSourceRegistry* self,
            const gchar* unique_id,
            gboolean enabled)
{
	g_return_if_fail (unique_id != NULL);
	g_signal_emit (self, zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_ENABLED_SIGNAL], 0, unique_id, enabled);
}

static void
___lambda6__zeitgeist_remote_registry_data_source_enabled (ZeitgeistRemoteRegistry* _sender,
                                                           const gchar* unique_id,
                                                           gboolean enabled,
                                                           gpointer self)
{
	__lambda6_ ((ZeitgeistDataSourceRegistry*) self, unique_id, enabled);
}

static void
__lambda7_ (ZeitgeistDataSourceRegistry* self,
            GVariant* data_source)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (data_source != NULL);
	{
		ZeitgeistDataSource* source = NULL;
		ZeitgeistDataSource* _tmp0_;
		_tmp0_ = zeitgeist_data_source_new_from_variant (data_source, FALSE, &_inner_error0_);
		source = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == ZEITGEIST_DATA_MODEL_ERROR) {
				goto __catch0_zeitgeist_data_model_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		g_signal_emit (self, zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_REGISTERED_SIGNAL], 0, source);
		_g_object_unref0 (source);
	}
	goto __finally0;
	__catch0_zeitgeist_data_model_error:
	{
		GError* err = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		err = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = err;
		_tmp2_ = _tmp1_->message;
		g_warning ("data-source-registry.vala:113: Error parsing data-source: %s", _tmp2_);
		_g_error_free0 (err);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda7__zeitgeist_remote_registry_data_source_registered (ZeitgeistRemoteRegistry* _sender,
                                                              GVariant* data_source,
                                                              gpointer self)
{
	__lambda7_ ((ZeitgeistDataSourceRegistry*) self, data_source);
}

static void
zeitgeist_data_source_registry_real_on_connection_established (ZeitgeistQueuedProxyWrapper* base)
{
	ZeitgeistDataSourceRegistry * self;
	ZeitgeistRemoteRegistry* _tmp0_;
	ZeitgeistRemoteRegistry* _tmp1_;
	ZeitgeistRemoteRegistry* _tmp2_;
	self = (ZeitgeistDataSourceRegistry*) base;
	_tmp0_ = self->priv->proxy;
	g_signal_connect_object (_tmp0_, "data-source-disconnected", (GCallback) ___lambda5__zeitgeist_remote_registry_data_source_disconnected, self, 0);
	_tmp1_ = self->priv->proxy;
	g_signal_connect_object (_tmp1_, "data-source-enabled", (GCallback) ___lambda6__zeitgeist_remote_registry_data_source_enabled, self, 0);
	_tmp2_ = self->priv->proxy;
	g_signal_connect_object (_tmp2_, "data-source-registered", (GCallback) ___lambda7__zeitgeist_remote_registry_data_source_registered, self, 0);
}

static void
zeitgeist_data_source_registry_real_on_connection_lost (ZeitgeistQueuedProxyWrapper* base)
{
	ZeitgeistDataSourceRegistry * self;
	self = (ZeitgeistDataSourceRegistry*) base;
}

static void
zeitgeist_data_source_registry_get_data_sources_data_free (gpointer _data)
{
	ZeitgeistDataSourceRegistryGetDataSourcesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_ptr_array_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ZeitgeistDataSourceRegistryGetDataSourcesData, _data_);
}

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

void
zeitgeist_data_source_registry_get_data_sources (ZeitgeistDataSourceRegistry* self,
                                                 GCancellable* cancellable,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryGetDataSourcesData* _data_;
	ZeitgeistDataSourceRegistry* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryGetDataSourcesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, zeitgeist_data_source_registry_get_data_sources_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	zeitgeist_data_source_registry_get_data_sources_co (_data_);
}

GPtrArray*
zeitgeist_data_source_registry_get_data_sources_finish (ZeitgeistDataSourceRegistry* self,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	GPtrArray* result;
	ZeitgeistDataSourceRegistryGetDataSourcesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
zeitgeist_data_source_registry_get_data_sources_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryGetDataSourcesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	zeitgeist_data_source_registry_get_data_sources_co (_data_);
}

static gboolean
zeitgeist_data_source_registry_get_data_sources_co (ZeitgeistDataSourceRegistryGetDataSourcesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	zeitgeist_queued_proxy_wrapper_wait_for_proxy ((ZeitgeistQueuedProxyWrapper*) _data_->self, zeitgeist_data_source_registry_get_data_sources_ready, _data_);
	return FALSE;
	_state_1:
	zeitgeist_queued_proxy_wrapper_wait_for_proxy_finish ((ZeitgeistQueuedProxyWrapper*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_get_data_sources (_data_->_tmp0_, _data_->cancellable, zeitgeist_data_source_registry_get_data_sources_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp1_ = zeitgeist_remote_registry_get_data_sources_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_result_ = _data_->_tmp1_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->_result_;
	_data_->_tmp4_ = zeitgeist_data_sources_from_variant (_data_->_tmp3_, &_data_->_inner_error0_);
	_data_->_tmp2_ = _data_->_tmp4_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_variant_unref0 (_data_->_result_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->_tmp2_;
	_data_->_tmp2_ = NULL;
	_data_->result = _data_->_tmp5_;
	_g_ptr_array_unref0 (_data_->_tmp2_);
	_g_variant_unref0 (_data_->_result_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
zeitgeist_data_source_registry_get_data_source_from_id_data_free (gpointer _data)
{
	ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_;
	_data_ = _data;
	_g_free0 (_data_->unique_id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ZeitgeistDataSourceRegistryGetDataSourceFromIdData, _data_);
}

void
zeitgeist_data_source_registry_get_data_source_from_id (ZeitgeistDataSourceRegistry* self,
                                                        const gchar* unique_id,
                                                        GCancellable* cancellable,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_;
	ZeitgeistDataSourceRegistry* _tmp0_;
	gchar* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (unique_id != NULL);
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryGetDataSourceFromIdData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, zeitgeist_data_source_registry_get_data_source_from_id_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (unique_id);
	_g_free0 (_data_->unique_id);
	_data_->unique_id = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	zeitgeist_data_source_registry_get_data_source_from_id_co (_data_);
}

ZeitgeistDataSource*
zeitgeist_data_source_registry_get_data_source_from_id_finish (ZeitgeistDataSourceRegistry* self,
                                                               GAsyncResult* _res_,
                                                               GError** error)
{
	ZeitgeistDataSource* result;
	ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
zeitgeist_data_source_registry_get_data_source_from_id_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	zeitgeist_data_source_registry_get_data_source_from_id_co (_data_);
}

static gboolean
zeitgeist_data_source_registry_get_data_source_from_id_co (ZeitgeistDataSourceRegistryGetDataSourceFromIdData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	zeitgeist_queued_proxy_wrapper_wait_for_proxy ((ZeitgeistQueuedProxyWrapper*) _data_->self, zeitgeist_data_source_registry_get_data_source_from_id_ready, _data_);
	return FALSE;
	_state_1:
	zeitgeist_queued_proxy_wrapper_wait_for_proxy_finish ((ZeitgeistQueuedProxyWrapper*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_get_data_source_from_id (_data_->_tmp0_, _data_->unique_id, _data_->cancellable, zeitgeist_data_source_registry_get_data_source_from_id_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp1_ = zeitgeist_remote_registry_get_data_source_from_id_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_result_ = _data_->_tmp1_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->_result_;
	_data_->_tmp4_ = zeitgeist_data_source_new_from_variant (_data_->_tmp3_, FALSE, &_data_->_inner_error0_);
	_data_->_tmp2_ = _data_->_tmp4_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_variant_unref0 (_data_->_result_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->_tmp2_;
	_data_->_tmp2_ = NULL;
	_data_->result = _data_->_tmp5_;
	_g_object_unref0 (_data_->_tmp2_);
	_g_variant_unref0 (_data_->_result_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
zeitgeist_data_source_registry_register_data_source_data_free (gpointer _data)
{
	ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->data_source);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (ZeitgeistDataSourceRegistryRegisterDataSourceData, _data_);
}

void
zeitgeist_data_source_registry_register_data_source (ZeitgeistDataSourceRegistry* self,
                                                     ZeitgeistDataSource* data_source,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_;
	ZeitgeistDataSourceRegistry* _tmp0_;
	ZeitgeistDataSource* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (data_source != NULL);
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryRegisterDataSourceData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, zeitgeist_data_source_registry_register_data_source_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (data_source);
	_g_object_unref0 (_data_->data_source);
	_data_->data_source = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	zeitgeist_data_source_registry_register_data_source_co (_data_);
}

gboolean
zeitgeist_data_source_registry_register_data_source_finish (ZeitgeistDataSourceRegistry* self,
                                                            GAsyncResult* _res_,
                                                            GError** error)
{
	gboolean result;
	ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		gboolean _tmp0_ = FALSE;
		return _tmp0_;
	}
	result = _data_->result;
	return result;
}

static void
zeitgeist_data_source_registry_register_data_source_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	zeitgeist_data_source_registry_register_data_source_co (_data_);
}

static gboolean
zeitgeist_data_source_registry_register_data_source_co (ZeitgeistDataSourceRegistryRegisterDataSourceData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	zeitgeist_queued_proxy_wrapper_wait_for_proxy ((ZeitgeistQueuedProxyWrapper*) _data_->self, zeitgeist_data_source_registry_register_data_source_ready, _data_);
	return FALSE;
	_state_1:
	zeitgeist_queued_proxy_wrapper_wait_for_proxy_finish ((ZeitgeistQueuedProxyWrapper*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->self->priv->proxy;
	_data_->_tmp2_ = zeitgeist_data_source_get_unique_id (_data_->data_source);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = zeitgeist_data_source_get_name (_data_->data_source);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = zeitgeist_data_source_get_description (_data_->data_source);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = zeitgeist_data_source_get_event_templates (_data_->data_source);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = zeitgeist_events_to_variant (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_register_data_source (_data_->_tmp1_, _data_->_tmp3_, _data_->_tmp5_, _data_->_tmp7_, _data_->_tmp11_, _data_->cancellable, NULL, zeitgeist_data_source_registry_register_data_source_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp12_ = zeitgeist_remote_registry_register_data_source_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_);
	_g_variant_unref0 (_data_->_tmp11_);
	_data_->_tmp0_ = _data_->_tmp12_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->_tmp0_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
zeitgeist_data_source_registry_set_data_source_enabled_data_free (gpointer _data)
{
	ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_;
	_data_ = _data;
	_g_free0 (_data_->unique_id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (ZeitgeistDataSourceRegistrySetDataSourceEnabledData, _data_);
}

void
zeitgeist_data_source_registry_set_data_source_enabled (ZeitgeistDataSourceRegistry* self,
                                                        const gchar* unique_id,
                                                        gboolean enabled,
                                                        GCancellable* cancellable,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_;
	ZeitgeistDataSourceRegistry* _tmp0_;
	gchar* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (unique_id != NULL);
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistrySetDataSourceEnabledData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, zeitgeist_data_source_registry_set_data_source_enabled_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (unique_id);
	_g_free0 (_data_->unique_id);
	_data_->unique_id = _tmp1_;
	_data_->enabled = enabled;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	zeitgeist_data_source_registry_set_data_source_enabled_co (_data_);
}

void
zeitgeist_data_source_registry_set_data_source_enabled_finish (ZeitgeistDataSourceRegistry* self,
                                                               GAsyncResult* _res_,
                                                               GError** error)
{
	ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
zeitgeist_data_source_registry_set_data_source_enabled_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_)
{
	ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	zeitgeist_data_source_registry_set_data_source_enabled_co (_data_);
}

static gboolean
zeitgeist_data_source_registry_set_data_source_enabled_co (ZeitgeistDataSourceRegistrySetDataSourceEnabledData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	zeitgeist_queued_proxy_wrapper_wait_for_proxy ((ZeitgeistQueuedProxyWrapper*) _data_->self, zeitgeist_data_source_registry_set_data_source_enabled_ready, _data_);
	return FALSE;
	_state_1:
	zeitgeist_queued_proxy_wrapper_wait_for_proxy_finish ((ZeitgeistQueuedProxyWrapper*) _data_->self, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_set_data_source_enabled (_data_->_tmp0_, _data_->unique_id, _data_->enabled, _data_->cancellable, zeitgeist_data_source_registry_set_data_source_enabled_ready, _data_);
	return FALSE;
	_state_2:
	zeitgeist_remote_registry_set_data_source_enabled_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
zeitgeist_data_source_registry_class_init (ZeitgeistDataSourceRegistryClass * klass,
                                           gpointer klass_data)
{
	zeitgeist_data_source_registry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ZeitgeistDataSourceRegistry_private_offset);
	((ZeitgeistQueuedProxyWrapperClass *) klass)->on_connection_established = (void (*) (ZeitgeistQueuedProxyWrapper*)) zeitgeist_data_source_registry_real_on_connection_established;
	((ZeitgeistQueuedProxyWrapperClass *) klass)->on_connection_lost = (void (*) (ZeitgeistQueuedProxyWrapper*)) zeitgeist_data_source_registry_real_on_connection_lost;
	G_OBJECT_CLASS (klass)->finalize = zeitgeist_data_source_registry_finalize;
	zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_DISCONNECTED_SIGNAL] = g_signal_new ("source-disconnected", ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, ZEITGEIST_TYPE_DATA_SOURCE);
	zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_ENABLED_SIGNAL] = g_signal_new ("source-enabled", ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
	zeitgeist_data_source_registry_signals[ZEITGEIST_DATA_SOURCE_REGISTRY_SOURCE_REGISTERED_SIGNAL] = g_signal_new ("source-registered", ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, ZEITGEIST_TYPE_DATA_SOURCE);
}

static void
zeitgeist_data_source_registry_instance_init (ZeitgeistDataSourceRegistry * self,
                                              gpointer klass)
{
	self->priv = zeitgeist_data_source_registry_get_instance_private (self);
}

static void
zeitgeist_data_source_registry_finalize (GObject * obj)
{
	ZeitgeistDataSourceRegistry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistry);
	_g_object_unref0 (self->priv->proxy);
	G_OBJECT_CLASS (zeitgeist_data_source_registry_parent_class)->finalize (obj);
}

/**
     * Query the Zeitgeist Data-Source Registry extension
     *
     * The Zeitgeist engine maintains a publicly available list of recognized
     * data-sources (components inserting information into Zeitgeist).
     * ZeitgeistDataSourceRegistry is used to register new data sources,
     * get information about them and gives the ability to enable or disable
     * the data sources.
     */
static GType
zeitgeist_data_source_registry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ZeitgeistDataSourceRegistryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zeitgeist_data_source_registry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ZeitgeistDataSourceRegistry), 0, (GInstanceInitFunc) zeitgeist_data_source_registry_instance_init, NULL };
	GType zeitgeist_data_source_registry_type_id;
	zeitgeist_data_source_registry_type_id = g_type_register_static (ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER, "ZeitgeistDataSourceRegistry", &g_define_type_info, 0);
	ZeitgeistDataSourceRegistry_private_offset = g_type_add_instance_private (zeitgeist_data_source_registry_type_id, sizeof (ZeitgeistDataSourceRegistryPrivate));
	return zeitgeist_data_source_registry_type_id;
}

GType
zeitgeist_data_source_registry_get_type (void)
{
	static volatile gsize zeitgeist_data_source_registry_type_id__once = 0;
	if (g_once_init_enter (&zeitgeist_data_source_registry_type_id__once)) {
		GType zeitgeist_data_source_registry_type_id;
		zeitgeist_data_source_registry_type_id = zeitgeist_data_source_registry_get_type_once ();
		g_once_init_leave (&zeitgeist_data_source_registry_type_id__once, zeitgeist_data_source_registry_type_id);
	}
	return zeitgeist_data_source_registry_type_id__once;
}

