/* data-source-registry.c generated by valac 0.26.1, 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 <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include "zeitgeist-datamodel.h"


#define ZEITGEIST_TYPE_REMOTE_REGISTRY (zeitgeist_remote_registry_get_type ())
#define ZEITGEIST_REMOTE_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZEITGEIST_TYPE_REMOTE_REGISTRY, ZeitgeistRemoteRegistry))
#define ZEITGEIST_IS_REMOTE_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZEITGEIST_TYPE_REMOTE_REGISTRY))
#define ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ZEITGEIST_TYPE_REMOTE_REGISTRY, ZeitgeistRemoteRegistryIface))

typedef struct _ZeitgeistRemoteRegistry ZeitgeistRemoteRegistry;
typedef struct _ZeitgeistRemoteRegistryIface ZeitgeistRemoteRegistryIface;

#define ZEITGEIST_TYPE_REMOTE_REGISTRY_PROXY (zeitgeist_remote_registry_proxy_get_type ())
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))

#define ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER (zeitgeist_queued_proxy_wrapper_get_type ())
#define ZEITGEIST_QUEUED_PROXY_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER, ZeitgeistQueuedProxyWrapper))
#define ZEITGEIST_QUEUED_PROXY_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER, ZeitgeistQueuedProxyWrapperClass))
#define ZEITGEIST_IS_QUEUED_PROXY_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER))
#define ZEITGEIST_IS_QUEUED_PROXY_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER))
#define ZEITGEIST_QUEUED_PROXY_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZEITGEIST_TYPE_QUEUED_PROXY_WRAPPER, ZeitgeistQueuedProxyWrapperClass))

typedef struct _ZeitgeistQueuedProxyWrapper ZeitgeistQueuedProxyWrapper;
typedef struct _ZeitgeistQueuedProxyWrapperClass ZeitgeistQueuedProxyWrapperClass;
typedef struct _ZeitgeistQueuedProxyWrapperPrivate ZeitgeistQueuedProxyWrapperPrivate;

#define ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY (zeitgeist_data_source_registry_get_type ())
#define ZEITGEIST_DATA_SOURCE_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistry))
#define ZEITGEIST_DATA_SOURCE_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistryClass))
#define ZEITGEIST_IS_DATA_SOURCE_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY))
#define ZEITGEIST_IS_DATA_SOURCE_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY))
#define ZEITGEIST_DATA_SOURCE_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistryClass))

typedef struct _ZeitgeistDataSourceRegistry ZeitgeistDataSourceRegistry;
typedef struct _ZeitgeistDataSourceRegistryClass ZeitgeistDataSourceRegistryClass;
typedef struct _ZeitgeistDataSourceRegistryPrivate ZeitgeistDataSourceRegistryPrivate;
#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;

struct _ZeitgeistRemoteRegistryIface {
	GTypeInterface parent_iface;
	void (*get_data_sources) (ZeitgeistRemoteRegistry* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GVariant* (*get_data_sources_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
	void (*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_);
	gboolean (*register_data_source_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
	void (*set_data_source_enabled) (ZeitgeistRemoteRegistry* self, const gchar* unique_id, gboolean enabled, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*set_data_source_enabled_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
	void (*get_data_source_from_id) (ZeitgeistRemoteRegistry* self, const gchar* unique_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GVariant* (*get_data_source_from_id_finish) (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
};

struct _ZeitgeistQueuedProxyWrapper {
	GObject parent_instance;
	ZeitgeistQueuedProxyWrapperPrivate * priv;
};

struct _ZeitgeistQueuedProxyWrapperClass {
	GObjectClass parent_class;
	void (*on_connection_established) (ZeitgeistQueuedProxyWrapper* self);
	void (*on_connection_lost) (ZeitgeistQueuedProxyWrapper* self);
};

struct _ZeitgeistDataSourceRegistry {
	ZeitgeistQueuedProxyWrapper parent_instance;
	ZeitgeistDataSourceRegistryPrivate * priv;
};

struct _ZeitgeistDataSourceRegistryClass {
	ZeitgeistQueuedProxyWrapperClass parent_class;
};

struct _ZeitgeistDataSourceRegistryPrivate {
	ZeitgeistRemoteRegistry* proxy;
};

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

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

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

struct _ZeitgeistDataSourceRegistrySetDataSourceEnabledData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	ZeitgeistDataSourceRegistry* self;
	gchar* unique_id;
	gboolean enabled;
	GCancellable* cancellable;
	ZeitgeistRemoteRegistry* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	GCancellable* _tmp3_;
	GError * _inner_error_;
};


static gpointer zeitgeist_data_source_registry_parent_class = NULL;

GType zeitgeist_remote_registry_proxy_get_type (void) G_GNUC_CONST;
guint zeitgeist_remote_registry_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType zeitgeist_remote_registry_get_type (void) G_GNUC_CONST;
void zeitgeist_remote_registry_get_data_sources (ZeitgeistRemoteRegistry* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GVariant* zeitgeist_remote_registry_get_data_sources_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
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_);
gboolean zeitgeist_remote_registry_register_data_source_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
void zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self, const gchar* unique_id, gboolean enabled, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void zeitgeist_remote_registry_set_data_source_enabled_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
void zeitgeist_remote_registry_get_data_source_from_id (ZeitgeistRemoteRegistry* self, const gchar* unique_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GVariant* zeitgeist_remote_registry_get_data_source_from_id_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error);
static void g_cclosure_user_marshal_VOID__VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
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 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);
GType zeitgeist_queued_proxy_wrapper_get_type (void) G_GNUC_CONST;
GType zeitgeist_data_source_registry_get_type (void) G_GNUC_CONST;
#define ZEITGEIST_DATA_SOURCE_REGISTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistryPrivate))
enum  {
	ZEITGEIST_DATA_SOURCE_REGISTRY_DUMMY_PROPERTY
};
ZeitgeistDataSourceRegistry* zeitgeist_data_source_registry_new (void);
ZeitgeistDataSourceRegistry* zeitgeist_data_source_registry_construct (GType object_type);
ZeitgeistQueuedProxyWrapper* zeitgeist_queued_proxy_wrapper_construct (GType object_type);
static void __lambda4_ (ZeitgeistDataSourceRegistry* self, GObject* obj, GAsyncResult* res);
void zeitgeist_queued_proxy_wrapper_proxy_acquired (ZeitgeistQueuedProxyWrapper* self, GObject* proxy);
void zeitgeist_queued_proxy_wrapper_proxy_unavailable (ZeitgeistQueuedProxyWrapper* self, GError* err);
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);
void zeitgeist_data_source_registry_get_data_sources (ZeitgeistDataSourceRegistry* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GPtrArray* zeitgeist_data_source_registry_get_data_sources_finish (ZeitgeistDataSourceRegistry* self, GAsyncResult* _res_, GError** error);
static gboolean zeitgeist_data_source_registry_get_data_sources_co (ZeitgeistDataSourceRegistryGetDataSourcesData* _data_);
void zeitgeist_queued_proxy_wrapper_wait_for_proxy (ZeitgeistQueuedProxyWrapper* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void zeitgeist_queued_proxy_wrapper_wait_for_proxy_finish (ZeitgeistQueuedProxyWrapper* self, GAsyncResult* _res_, GError** error);
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);
void zeitgeist_data_source_registry_get_data_source_from_id (ZeitgeistDataSourceRegistry* self, const gchar* unique_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
ZeitgeistDataSource* zeitgeist_data_source_registry_get_data_source_from_id_finish (ZeitgeistDataSourceRegistry* self, GAsyncResult* _res_, GError** error);
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);
void zeitgeist_data_source_registry_register_data_source (ZeitgeistDataSourceRegistry* self, ZeitgeistDataSource* data_source, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean zeitgeist_data_source_registry_register_data_source_finish (ZeitgeistDataSourceRegistry* self, GAsyncResult* _res_, GError** error);
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);
void zeitgeist_data_source_registry_set_data_source_enabled (ZeitgeistDataSourceRegistry* self, const gchar* unique_id, gboolean enabled, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void zeitgeist_data_source_registry_set_data_source_enabled_finish (ZeitgeistDataSourceRegistry* self, GAsyncResult* _res_, GError** error);
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 const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_sources_result = {-1, "result", "a(sssa(asaasay)bxb)"};
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)};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_unique_id = {-1, "unique_id", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_name = {-1, "name", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_description = {-1, "description", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_event_templates = {-1, "event_templates", "a(asaasay)"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_register_data_source_result = {-1, "result", "b"};
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)};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_unique_id = {-1, "unique_id", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_set_data_source_enabled_enabled = {-1, "enabled", "b"};
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)};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_unique_id = {-1, "unique_id", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_get_data_source_from_id_result = {-1, "result", "(sssa(asaasay)bxb)"};
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)};
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)"};
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)};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_unique_id = {-1, "unique_id", "s"};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_enabled_enabled = {-1, "enabled", "b"};
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)};
static const GDBusArgInfo _zeitgeist_remote_registry_dbus_arg_info_data_source_registered_data_source = {-1, "data_source", "(sssa(asaasay)bxb)"};
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)};
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)};
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_) {
	ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->get_data_sources (self, cancellable, _callback_, _user_data_);
}


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


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_) {
	ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->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) {
	return ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->register_data_source_finish (self, _res_, error);
}


void zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self, const gchar* unique_id, gboolean enabled, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->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) {
	ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->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_) {
	ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->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) {
	return ZEITGEIST_REMOTE_REGISTRY_GET_INTERFACE (self)->get_data_source_from_id_finish (self, _res_, error);
}


static void g_cclosure_user_marshal_VOID__VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_VOID__VARIANT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 2);
	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__VARIANT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_variant (param_values + 1), data2);
}


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_base_init (ZeitgeistRemoteRegistryIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_signal_new ("data_source_disconnected", ZEITGEIST_TYPE_REMOTE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__VARIANT, G_TYPE_NONE, 1, G_TYPE_VARIANT);
		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);
		g_signal_new ("data_source_registered", ZEITGEIST_TYPE_REMOTE_REGISTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__VARIANT, G_TYPE_NONE, 1, G_TYPE_VARIANT);
	}
}


GType zeitgeist_remote_registry_get_type (void) {
	static volatile gsize zeitgeist_remote_registry_type_id__volatile = 0;
	if (g_once_init_enter (&zeitgeist_remote_registry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ZeitgeistRemoteRegistryIface), (GBaseInitFunc) zeitgeist_remote_registry_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (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);
		g_once_init_leave (&zeitgeist_remote_registry_type_id__volatile, zeitgeist_remote_registry_type_id);
	}
	return zeitgeist_remote_registry_type_id__volatile;
}


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) {
}


static void _vala_g_async_ready_callback (GObject *source_object, GAsyncResult *res, void *user_data) {
	g_simple_async_result_set_op_res_gpointer (user_data, g_object_ref (res), g_object_unref);
	g_simple_async_result_complete (user_data);
	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);
	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_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static GVariant* zeitgeist_remote_registry_proxy_get_data_sources_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _result;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	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);
	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_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static gboolean zeitgeist_remote_registry_proxy_register_data_source_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result;
	GVariant* _tmp2_;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	if (!_reply_message) {
		return FALSE;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return FALSE;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp2_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp2_);
	g_variant_unref (_tmp2_);
	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);
	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_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static void zeitgeist_remote_registry_proxy_set_data_source_enabled_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	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);
	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_simple_async_result_new ((GObject *) self, _callback_, _user_data_, NULL));
	g_object_unref (_message);
}


static GVariant* zeitgeist_remote_registry_proxy_get_data_source_from_id_finish (ZeitgeistRemoteRegistry* self, GAsyncResult* _res_, GError** error) {
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _result;
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), g_simple_async_result_get_op_res_gpointer ((GSimpleAsyncResult *) _res_), error);
	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;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	zeitgeist_remote_registry_get_data_sources (self, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_get_data_sources_ready, invocation);
}


static void _dbus_zeitgeist_remote_registry_get_data_sources_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* result;
	invocation = _user_data_;
	result = zeitgeist_remote_registry_get_data_sources_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, 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);
}


static void _dbus_zeitgeist_remote_registry_register_data_source (ZeitgeistRemoteRegistry* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GVariantIter _arguments_iter;
	gchar* unique_id = NULL;
	GVariant* _tmp3_;
	gchar* name = NULL;
	GVariant* _tmp4_;
	gchar* description = NULL;
	GVariant* _tmp5_;
	GVariant* event_templates = NULL;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	unique_id = g_variant_dup_string (_tmp3_, NULL);
	g_variant_unref (_tmp3_);
	_tmp4_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp4_, NULL);
	g_variant_unref (_tmp4_);
	_tmp5_ = g_variant_iter_next_value (&_arguments_iter);
	description = g_variant_dup_string (_tmp5_, NULL);
	g_variant_unref (_tmp5_);
	event_templates = g_variant_iter_next_value (&_arguments_iter);
	zeitgeist_remote_registry_register_data_source (self, unique_id, name, description, event_templates, NULL, g_dbus_method_invocation_get_sender (invocation), (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_register_data_source_ready, invocation);
	_g_free0 (unique_id);
	_g_free0 (name);
	_g_free0 (description);
	_g_variant_unref0 (event_templates);
}


static void _dbus_zeitgeist_remote_registry_register_data_source_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	invocation = _user_data_;
	result = zeitgeist_remote_registry_register_data_source_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_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);
}


static void _dbus_zeitgeist_remote_registry_set_data_source_enabled (ZeitgeistRemoteRegistry* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GVariantIter _arguments_iter;
	gchar* unique_id = NULL;
	GVariant* _tmp6_;
	gboolean enabled = FALSE;
	GVariant* _tmp7_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp6_ = g_variant_iter_next_value (&_arguments_iter);
	unique_id = g_variant_dup_string (_tmp6_, NULL);
	g_variant_unref (_tmp6_);
	_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
	enabled = g_variant_get_boolean (_tmp7_);
	g_variant_unref (_tmp7_);
	zeitgeist_remote_registry_set_data_source_enabled (self, unique_id, enabled, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_set_data_source_enabled_ready, invocation);
	_g_free0 (unique_id);
}


static void _dbus_zeitgeist_remote_registry_set_data_source_enabled_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	invocation = _user_data_;
	zeitgeist_remote_registry_set_data_source_enabled_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}


static void _dbus_zeitgeist_remote_registry_get_data_source_from_id (ZeitgeistRemoteRegistry* self, GVariant* _parameters_, GDBusMethodInvocation* invocation) {
	GVariantIter _arguments_iter;
	gchar* unique_id = NULL;
	GVariant* _tmp8_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp8_ = g_variant_iter_next_value (&_arguments_iter);
	unique_id = g_variant_dup_string (_tmp8_, NULL);
	g_variant_unref (_tmp8_);
	zeitgeist_remote_registry_get_data_source_from_id (self, unique_id, NULL, (GAsyncReadyCallback) _dbus_zeitgeist_remote_registry_get_data_source_from_id_ready, invocation);
	_g_free0 (unique_id);
}


static void _dbus_zeitgeist_remote_registry_get_data_source_from_id_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) {
	GDBusMethodInvocation * invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	GVariant* result;
	invocation = _user_data_;
	result = zeitgeist_remote_registry_get_data_source_from_id_finish ((ZeitgeistRemoteRegistry*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, 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);
}


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


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_error_ = 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", "g-interface-info", g_type_get_qdata (ZEITGEIST_TYPE_REMOTE_REGISTRY, g_quark_from_static_string ("vala-dbus-interface-info")), 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_error_ = NULL;
	g_return_if_fail (data_source != NULL);
	{
		ZeitgeistDataSource* source = NULL;
		GVariant* _tmp0_ = NULL;
		ZeitgeistDataSource* _tmp1_ = NULL;
		_tmp0_ = data_source;
		_tmp1_ = zeitgeist_data_source_new_from_variant (_tmp0_, FALSE, &_inner_error_);
		source = _tmp1_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == ZEITGEIST_DATA_MODEL_ERROR) {
				goto __catch1_zeitgeist_data_model_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		g_signal_emit_by_name (self, "source-disconnected", source);
		_g_object_unref0 (source);
	}
	goto __finally1;
	__catch1_zeitgeist_data_model_error:
	{
		GError* err = NULL;
		GError* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp2_ = err;
		_tmp3_ = _tmp2_->message;
		g_warning ("data-source-registry.vala:98: Error parsing data-source: %s", _tmp3_);
		_g_error_free0 (err);
	}
	__finally1:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


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) {
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (unique_id != NULL);
	_tmp0_ = unique_id;
	_tmp1_ = enabled;
	g_signal_emit_by_name (self, "source-enabled", _tmp0_, _tmp1_);
}


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_error_ = NULL;
	g_return_if_fail (data_source != NULL);
	{
		ZeitgeistDataSource* source = NULL;
		GVariant* _tmp0_ = NULL;
		ZeitgeistDataSource* _tmp1_ = NULL;
		_tmp0_ = data_source;
		_tmp1_ = zeitgeist_data_source_new_from_variant (_tmp0_, FALSE, &_inner_error_);
		source = _tmp1_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == ZEITGEIST_DATA_MODEL_ERROR) {
				goto __catch2_zeitgeist_data_model_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
		g_signal_emit_by_name (self, "source-registered", source);
		_g_object_unref0 (source);
	}
	goto __finally2;
	__catch2_zeitgeist_data_model_error:
	{
		GError* err = NULL;
		GError* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		err = _inner_error_;
		_inner_error_ = NULL;
		_tmp2_ = err;
		_tmp3_ = _tmp2_->message;
		g_warning ("data-source-registry.vala:113: Error parsing data-source: %s", _tmp3_);
		_g_error_free0 (err);
	}
	__finally2:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


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_ = NULL;
	ZeitgeistRemoteRegistry* _tmp1_ = NULL;
	ZeitgeistRemoteRegistry* _tmp2_ = NULL;
	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_ = NULL;
	GCancellable* _tmp1_ = NULL;
	GCancellable* _tmp2_ = NULL;
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryGetDataSourcesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, zeitgeist_data_source_registry_get_data_sources);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, zeitgeist_data_source_registry_get_data_sources_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	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_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	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_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->cancellable;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_get_data_sources (_data_->_tmp0_, _data_->_tmp1_, zeitgeist_data_source_registry_get_data_sources_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = zeitgeist_remote_registry_get_data_sources_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
	_data_->_result_ = _data_->_tmp2_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->_result_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = zeitgeist_data_sources_from_variant (_data_->_tmp4_, &_data_->_inner_error_);
	_data_->_tmp3_ = _data_->_tmp5_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_variant_unref0 (_data_->_result_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->_tmp3_;
	_data_->_tmp3_ = NULL;
	_data_->result = _data_->_tmp6_;
	_g_ptr_array_unref0 (_data_->_tmp3_);
	_g_variant_unref0 (_data_->_result_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_ptr_array_unref0 (_data_->_tmp3_);
	_g_variant_unref0 (_data_->_result_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


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_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GCancellable* _tmp4_ = NULL;
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryGetDataSourceFromIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, zeitgeist_data_source_registry_get_data_source_from_id);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, zeitgeist_data_source_registry_get_data_source_from_id_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = unique_id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->unique_id);
	_data_->unique_id = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	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_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	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_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->unique_id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->cancellable;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_get_data_source_from_id (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, zeitgeist_data_source_registry_get_data_source_from_id_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = zeitgeist_remote_registry_get_data_source_from_id_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
	_data_->_result_ = _data_->_tmp3_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->_result_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = zeitgeist_data_source_new_from_variant (_data_->_tmp5_, FALSE, &_data_->_inner_error_);
	_data_->_tmp4_ = _data_->_tmp6_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_variant_unref0 (_data_->_result_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->_tmp4_;
	_data_->_tmp4_ = NULL;
	_data_->result = _data_->_tmp7_;
	_g_object_unref0 (_data_->_tmp4_);
	_g_variant_unref0 (_data_->_result_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->_tmp4_);
	_g_variant_unref0 (_data_->_result_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


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_ = NULL;
	ZeitgeistDataSource* _tmp1_ = NULL;
	ZeitgeistDataSource* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GCancellable* _tmp4_ = NULL;
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistryRegisterDataSourceData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, zeitgeist_data_source_registry_register_data_source);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, zeitgeist_data_source_registry_register_data_source_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = data_source;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->data_source);
	_data_->data_source = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	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_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return FALSE;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	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_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->self->priv->proxy;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->data_source;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = zeitgeist_data_source_get_unique_id (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->data_source;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = zeitgeist_data_source_get_name (_data_->_tmp5_);
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->data_source;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = zeitgeist_data_source_get_description (_data_->_tmp8_);
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = _data_->data_source;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = zeitgeist_data_source_get_event_templates (_data_->_tmp11_);
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = zeitgeist_events_to_variant (_data_->_tmp13_);
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = NULL;
	_data_->_tmp16_ = _data_->cancellable;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_register_data_source (_data_->_tmp1_, _data_->_tmp4_, _data_->_tmp7_, _data_->_tmp10_, _data_->_tmp15_, _data_->_tmp16_, NULL, zeitgeist_data_source_registry_register_data_source_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp17_ = FALSE;
	_data_->_tmp17_ = zeitgeist_remote_registry_register_data_source_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
	_data_->_tmp18_ = FALSE;
	_data_->_tmp18_ = _data_->_tmp17_;
	_g_variant_unref0 (_data_->_tmp15_);
	_data_->_tmp0_ = _data_->_tmp18_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->_tmp0_;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


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_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GCancellable* _tmp4_ = NULL;
	GCancellable* _tmp5_ = NULL;
	_data_ = g_slice_new0 (ZeitgeistDataSourceRegistrySetDataSourceEnabledData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, zeitgeist_data_source_registry_set_data_source_enabled);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, zeitgeist_data_source_registry_set_data_source_enabled_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = unique_id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->unique_id);
	_data_->unique_id = _tmp2_;
	_tmp3_ = enabled;
	_data_->enabled = _tmp3_;
	_tmp4_ = cancellable;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp5_;
	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_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void 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_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->self->priv->proxy;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->unique_id;
	_data_->_tmp2_ = FALSE;
	_data_->_tmp2_ = _data_->enabled;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->cancellable;
	_data_->_state_ = 2;
	zeitgeist_remote_registry_set_data_source_enabled (_data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, 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_error_);
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void zeitgeist_data_source_registry_class_init (ZeitgeistDataSourceRegistryClass * klass) {
	zeitgeist_data_source_registry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ZeitgeistDataSourceRegistryPrivate));
	((ZeitgeistQueuedProxyWrapperClass *) klass)->on_connection_established = zeitgeist_data_source_registry_real_on_connection_established;
	((ZeitgeistQueuedProxyWrapperClass *) klass)->on_connection_lost = zeitgeist_data_source_registry_real_on_connection_lost;
	G_OBJECT_CLASS (klass)->finalize = zeitgeist_data_source_registry_finalize;
	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);
	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);
	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) {
	self->priv = ZEITGEIST_DATA_SOURCE_REGISTRY_GET_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.
     */
GType zeitgeist_data_source_registry_get_type (void) {
	static volatile gsize zeitgeist_data_source_registry_type_id__volatile = 0;
	if (g_once_init_enter (&zeitgeist_data_source_registry_type_id__volatile)) {
		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);
		g_once_init_leave (&zeitgeist_data_source_registry_type_id__volatile, zeitgeist_data_source_registry_type_id);
	}
	return zeitgeist_data_source_registry_type_id__volatile;
}



