/* rygel-dbus-interface.c generated by valac 0.42.1.67-6c68, the Vala compiler
 * generated from rygel-dbus-interface.vala, do not modify */

/*
 * Copyright (C) 2008,2010 Nokia Corporation.
 * Copyright (C) 2008 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *
 * This file is part of Rygel.
 *
 * Rygel 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.
 *
 * Rygel is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

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

#define RYGEL_TYPE_DBUS_INTERFACE (rygel_dbus_interface_get_type ())
#define RYGEL_DBUS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_DBUS_INTERFACE, RygelDBusInterface))
#define RYGEL_IS_DBUS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_DBUS_INTERFACE))
#define RYGEL_DBUS_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_DBUS_INTERFACE, RygelDBusInterfaceIface))

typedef struct _RygelDBusInterface RygelDBusInterface;
typedef struct _RygelDBusInterfaceIface RygelDBusInterfaceIface;

#define RYGEL_TYPE_DBUS_INTERFACE_PROXY (rygel_dbus_interface_proxy_get_type ())
typedef GDBusProxy RygelDBusInterfaceProxy;
typedef GDBusProxyClass RygelDBusInterfaceProxyClass;

#define RYGEL_TYPE_DBUS_ACL_PROVIDER (rygel_dbus_acl_provider_get_type ())
#define RYGEL_DBUS_ACL_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_DBUS_ACL_PROVIDER, RygelDBusAclProvider))
#define RYGEL_IS_DBUS_ACL_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_DBUS_ACL_PROVIDER))
#define RYGEL_DBUS_ACL_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_DBUS_ACL_PROVIDER, RygelDBusAclProviderIface))

typedef struct _RygelDBusAclProvider RygelDBusAclProvider;
typedef struct _RygelDBusAclProviderIface RygelDBusAclProviderIface;

#define RYGEL_TYPE_DBUS_ACL_PROVIDER_PROXY (rygel_dbus_acl_provider_proxy_get_type ())
typedef GDBusProxy RygelDBusAclProviderProxy;
typedef GDBusProxyClass RygelDBusAclProviderProxyClass;
typedef struct _RygelDbusAclProviderIsAllowedReadyData RygelDbusAclProviderIsAllowedReadyData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _RygelDBusInterfaceIface {
	GTypeInterface parent_iface;
	void (*shutdown) (RygelDBusInterface* self, GError** error);
};

struct _RygelDBusAclProviderIface {
	GTypeInterface parent_iface;
	void (*is_allowed) (RygelDBusAclProvider* self, GHashTable* device, GHashTable* service, const gchar* path, const gchar* address, const gchar* agent, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*is_allowed_finish) (RygelDBusAclProvider* self, GAsyncResult* _res_, GError** error);
};

struct _RygelDbusAclProviderIsAllowedReadyData {
	GDBusMethodInvocation* _invocation_;
	GHashTable* device;
	GHashTable* service;
	gchar* path;
	gchar* address;
	gchar* agent;
};

GType rygel_dbus_interface_proxy_get_type (void) G_GNUC_CONST;
guint rygel_dbus_interface_register_object (void* object,
                                            GDBusConnection* connection,
                                            const gchar* path,
                                            GError** error);
GType rygel_dbus_interface_get_type (void) G_GNUC_CONST;
void rygel_dbus_interface_shutdown (RygelDBusInterface* self,
                                    GError** error);
#define RYGEL_DBUS_INTERFACE_SERVICE_NAME "org.gnome.Rygel1"
#define RYGEL_DBUS_INTERFACE_OBJECT_PATH "/org/gnome/Rygel1"
static void rygel_dbus_interface_proxy_g_signal (GDBusProxy* proxy,
                                          const gchar* sender_name,
                                          const gchar* signal_name,
                                          GVariant* parameters);
static void rygel_dbus_interface_proxy_shutdown (RygelDBusInterface* self,
                                          GError** error);
static void rygel_dbus_interface_proxy_rygel_dbus_interface_interface_init (RygelDBusInterfaceIface* iface);
static void _dbus_rygel_dbus_interface_shutdown (RygelDBusInterface* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation);
static void rygel_dbus_interface_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* rygel_dbus_interface_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 rygel_dbus_interface_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 _rygel_dbus_interface_unregister_object (gpointer user_data);
GType rygel_dbus_acl_provider_proxy_get_type (void) G_GNUC_CONST;
guint rygel_dbus_acl_provider_register_object (void* object,
                                               GDBusConnection* connection,
                                               const gchar* path,
                                               GError** error);
GType rygel_dbus_acl_provider_get_type (void) G_GNUC_CONST;
void rygel_dbus_acl_provider_is_allowed (RygelDBusAclProvider* self,
                                         GHashTable* device,
                                         GHashTable* service,
                                         const gchar* path,
                                         const gchar* address,
                                         const gchar* agent,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
gboolean rygel_dbus_acl_provider_is_allowed_finish (RygelDBusAclProvider* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
#define RYGEL_DBUS_ACL_PROVIDER_SERVICE_NAME "org.gnome.Rygel1.AclProvider1"
#define RYGEL_DBUS_ACL_PROVIDER_OBJECT_PATH "/org/gnome/Rygel1/AclProvider1"
static void rygel_dbus_acl_provider_proxy_g_signal (GDBusProxy* proxy,
                                             const gchar* sender_name,
                                             const gchar* signal_name,
                                             GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void rygel_dbus_acl_provider_proxy_is_allowed_async (RygelDBusAclProvider* self,
                                                     GHashTable* device,
                                                     GHashTable* service,
                                                     const gchar* path,
                                                     const gchar* address,
                                                     const gchar* agent,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static gboolean rygel_dbus_acl_provider_proxy_is_allowed_finish (RygelDBusAclProvider* self,
                                                          GAsyncResult* _res_,
                                                          GError** error);
static void rygel_dbus_acl_provider_proxy_rygel_dbus_acl_provider_interface_init (RygelDBusAclProviderIface* iface);
static void _dbus_rygel_dbus_acl_provider_is_allowed (RygelDBusAclProvider* self,
                                               GVariant* _parameters_,
                                               GDBusMethodInvocation* invocation);
static void _dbus_rygel_dbus_acl_provider_is_allowed_ready (GObject * source_object,
                                                     GAsyncResult * _res_,
                                                     gpointer _user_data_);
static void rygel_dbus_acl_provider_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* rygel_dbus_acl_provider_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 rygel_dbus_acl_provider_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 _rygel_dbus_acl_provider_unregister_object (gpointer user_data);

static const GDBusArgInfo * const _rygel_dbus_interface_dbus_arg_info_shutdown_in[] = {NULL};
static const GDBusArgInfo * const _rygel_dbus_interface_dbus_arg_info_shutdown_out[] = {NULL};
static const GDBusMethodInfo _rygel_dbus_interface_dbus_method_info_shutdown = {-1, "Shutdown", (GDBusArgInfo **) (&_rygel_dbus_interface_dbus_arg_info_shutdown_in), (GDBusArgInfo **) (&_rygel_dbus_interface_dbus_arg_info_shutdown_out)};
static const GDBusMethodInfo * const _rygel_dbus_interface_dbus_method_info[] = {&_rygel_dbus_interface_dbus_method_info_shutdown, NULL};
static const GDBusSignalInfo * const _rygel_dbus_interface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _rygel_dbus_interface_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _rygel_dbus_interface_dbus_interface_info = {-1, "org.gnome.Rygel1", (GDBusMethodInfo **) (&_rygel_dbus_interface_dbus_method_info), (GDBusSignalInfo **) (&_rygel_dbus_interface_dbus_signal_info), (GDBusPropertyInfo **) (&_rygel_dbus_interface_dbus_property_info)};
static const GDBusInterfaceVTable _rygel_dbus_interface_dbus_interface_vtable = {rygel_dbus_interface_dbus_interface_method_call, rygel_dbus_interface_dbus_interface_get_property, rygel_dbus_interface_dbus_interface_set_property};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_device = {-1, "device", "a{ss}"};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_service = {-1, "service", "a{ss}"};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_path = {-1, "path", "s"};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_address = {-1, "address", "s"};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_agent = {-1, "agent", "s"};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_result = {-1, "result", "b"};
static const GDBusArgInfo * const _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_in[] = {&_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_device, &_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_service, &_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_path, &_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_address, &_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_agent, NULL};
static const GDBusArgInfo * const _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_out[] = {&_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_result, NULL};
static const GDBusMethodInfo _rygel_dbus_acl_provider_dbus_method_info_is_allowed = {-1, "IsAllowed", (GDBusArgInfo **) (&_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_in), (GDBusArgInfo **) (&_rygel_dbus_acl_provider_dbus_arg_info_is_allowed_out)};
static const GDBusMethodInfo * const _rygel_dbus_acl_provider_dbus_method_info[] = {&_rygel_dbus_acl_provider_dbus_method_info_is_allowed, NULL};
static const GDBusSignalInfo * const _rygel_dbus_acl_provider_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _rygel_dbus_acl_provider_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _rygel_dbus_acl_provider_dbus_interface_info = {-1, "org.gnome.Rygel1.AclProvider1", (GDBusMethodInfo **) (&_rygel_dbus_acl_provider_dbus_method_info), (GDBusSignalInfo **) (&_rygel_dbus_acl_provider_dbus_signal_info), (GDBusPropertyInfo **) (&_rygel_dbus_acl_provider_dbus_property_info)};
static const GDBusInterfaceVTable _rygel_dbus_acl_provider_dbus_interface_vtable = {rygel_dbus_acl_provider_dbus_interface_method_call, rygel_dbus_acl_provider_dbus_interface_get_property, rygel_dbus_acl_provider_dbus_interface_set_property};

void
rygel_dbus_interface_shutdown (RygelDBusInterface* self,
                               GError** error)
{
	g_return_if_fail (self != NULL);
	RYGEL_DBUS_INTERFACE_GET_INTERFACE (self)->shutdown (self, error);
}

static void
rygel_dbus_interface_default_init (RygelDBusInterfaceIface * iface)
{
}

GType
rygel_dbus_interface_get_type (void)
{
	static volatile gsize rygel_dbus_interface_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_dbus_interface_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelDBusInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_dbus_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType rygel_dbus_interface_type_id;
		rygel_dbus_interface_type_id = g_type_register_static (G_TYPE_INTERFACE, "RygelDBusInterface", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (rygel_dbus_interface_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (rygel_dbus_interface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) rygel_dbus_interface_proxy_get_type);
		g_type_set_qdata (rygel_dbus_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.Rygel1");
		g_type_set_qdata (rygel_dbus_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_rygel_dbus_interface_dbus_interface_info));
		g_type_set_qdata (rygel_dbus_interface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) rygel_dbus_interface_register_object);
		g_once_init_leave (&rygel_dbus_interface_type_id__volatile, rygel_dbus_interface_type_id);
	}
	return rygel_dbus_interface_type_id__volatile;
}

G_DEFINE_TYPE_EXTENDED (RygelDBusInterfaceProxy, rygel_dbus_interface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (RYGEL_TYPE_DBUS_INTERFACE, rygel_dbus_interface_proxy_rygel_dbus_interface_interface_init) )
static void
rygel_dbus_interface_proxy_class_init (RygelDBusInterfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = rygel_dbus_interface_proxy_g_signal;
}

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

static void
rygel_dbus_interface_proxy_init (RygelDBusInterfaceProxy* self)
{
}

static void
rygel_dbus_interface_proxy_shutdown (RygelDBusInterface* self,
                                     GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_IO_ERROR;
	G_DBUS_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Rygel1", "Shutdown");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
rygel_dbus_interface_proxy_rygel_dbus_interface_interface_init (RygelDBusInterfaceIface* iface)
{
	iface->shutdown = rygel_dbus_interface_proxy_shutdown;
}

static void
_dbus_rygel_dbus_interface_shutdown (RygelDBusInterface* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	rygel_dbus_interface_shutdown (self, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		g_error_free (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
rygel_dbus_interface_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, "Shutdown") == 0) {
		_dbus_rygel_dbus_interface_shutdown (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
rygel_dbus_interface_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
rygel_dbus_interface_dbus_interface_set_property (GDBusConnection* connection,
                                                  const gchar* sender,
                                                  const gchar* object_path,
                                                  const gchar* interface_name,
                                                  const gchar* property_name,
                                                  GVariant* value,
                                                  GError** error,
                                                  gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
rygel_dbus_interface_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 *) (&_rygel_dbus_interface_dbus_interface_info), &_rygel_dbus_interface_dbus_interface_vtable, data, _rygel_dbus_interface_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

void
rygel_dbus_acl_provider_is_allowed (RygelDBusAclProvider* self,
                                    GHashTable* device,
                                    GHashTable* service,
                                    const gchar* path,
                                    const gchar* address,
                                    const gchar* agent,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	RYGEL_DBUS_ACL_PROVIDER_GET_INTERFACE (self)->is_allowed (self, device, service, path, address, agent, _callback_, _user_data_);
}

gboolean
rygel_dbus_acl_provider_is_allowed_finish (RygelDBusAclProvider* self,
                                           GAsyncResult* _res_,
                                           GError** error)
{
	return RYGEL_DBUS_ACL_PROVIDER_GET_INTERFACE (self)->is_allowed_finish (self, _res_, error);
}

static void
rygel_dbus_acl_provider_default_init (RygelDBusAclProviderIface * iface)
{
}

GType
rygel_dbus_acl_provider_get_type (void)
{
	static volatile gsize rygel_dbus_acl_provider_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_dbus_acl_provider_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelDBusAclProviderIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_dbus_acl_provider_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType rygel_dbus_acl_provider_type_id;
		rygel_dbus_acl_provider_type_id = g_type_register_static (G_TYPE_INTERFACE, "RygelDBusAclProvider", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (rygel_dbus_acl_provider_type_id, G_TYPE_OBJECT);
		g_type_set_qdata (rygel_dbus_acl_provider_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) rygel_dbus_acl_provider_proxy_get_type);
		g_type_set_qdata (rygel_dbus_acl_provider_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.Rygel1.AclProvider1");
		g_type_set_qdata (rygel_dbus_acl_provider_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_rygel_dbus_acl_provider_dbus_interface_info));
		g_type_set_qdata (rygel_dbus_acl_provider_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) rygel_dbus_acl_provider_register_object);
		g_once_init_leave (&rygel_dbus_acl_provider_type_id__volatile, rygel_dbus_acl_provider_type_id);
	}
	return rygel_dbus_acl_provider_type_id__volatile;
}

G_DEFINE_TYPE_EXTENDED (RygelDBusAclProviderProxy, rygel_dbus_acl_provider_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (RYGEL_TYPE_DBUS_ACL_PROVIDER, rygel_dbus_acl_provider_proxy_rygel_dbus_acl_provider_interface_init) )
static void
rygel_dbus_acl_provider_proxy_class_init (RygelDBusAclProviderProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = rygel_dbus_acl_provider_proxy_g_signal;
}

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

static void
rygel_dbus_acl_provider_proxy_init (RygelDBusAclProviderProxy* self)
{
}

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
rygel_dbus_acl_provider_proxy_is_allowed_async (RygelDBusAclProvider* self,
                                                GHashTable* device,
                                                GHashTable* service,
                                                const gchar* path,
                                                const gchar* address,
                                                const gchar* agent,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp0_;
	GHashTableIter _tmp1_;
	gpointer _tmp2_;
	gpointer _tmp3_;
	GVariantBuilder _tmp4_;
	GHashTableIter _tmp5_;
	gpointer _tmp6_;
	gpointer _tmp7_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Rygel1.AclProvider1", "IsAllowed");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_hash_table_iter_init (&_tmp1_, device);
	g_variant_builder_init (&_tmp0_, G_VARIANT_TYPE ("a{ss}"));
	while (g_hash_table_iter_next (&_tmp1_, &_tmp2_, &_tmp3_)) {
		gchar* _key;
		gchar* _value;
		_key = (gchar*) _tmp2_;
		_value = (gchar*) _tmp3_;
		g_variant_builder_add (&_tmp0_, "{?*}", g_variant_new_string (_key), g_variant_new_string (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp0_));
	g_hash_table_iter_init (&_tmp5_, service);
	g_variant_builder_init (&_tmp4_, G_VARIANT_TYPE ("a{ss}"));
	while (g_hash_table_iter_next (&_tmp5_, &_tmp6_, &_tmp7_)) {
		gchar* _key;
		gchar* _value;
		_key = (gchar*) _tmp6_;
		_value = (gchar*) _tmp7_;
		g_variant_builder_add (&_tmp4_, "{?*}", g_variant_new_string (_key), g_variant_new_string (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp4_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (path));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (address));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (agent));
	_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, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	g_object_unref (_message);
}

static gboolean
rygel_dbus_acl_provider_proxy_is_allowed_finish (RygelDBusAclProvider* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp10_;
	_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 _tmp8_ = FALSE;
		return _tmp8_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp9_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp9_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp10_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp10_);
	g_variant_unref (_tmp10_);
	g_object_unref (_reply_message);
	return _result;
}

static void
rygel_dbus_acl_provider_proxy_rygel_dbus_acl_provider_interface_init (RygelDBusAclProviderIface* iface)
{
	iface->is_allowed = rygel_dbus_acl_provider_proxy_is_allowed_async;
	iface->is_allowed_finish = rygel_dbus_acl_provider_proxy_is_allowed_finish;
}

static void
_dbus_rygel_dbus_acl_provider_is_allowed (RygelDBusAclProvider* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	RygelDbusAclProviderIsAllowedReadyData* _ready_data;
	GVariant* _tmp11_;
	GHashTable* _tmp12_;
	GVariantIter _tmp13_;
	GVariant* _tmp14_;
	GVariant* _tmp15_;
	GVariant* _tmp16_;
	GHashTable* _tmp17_;
	GVariantIter _tmp18_;
	GVariant* _tmp19_;
	GVariant* _tmp20_;
	GVariant* _tmp21_;
	GVariant* _tmp22_;
	GVariant* _tmp23_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (RygelDbusAclProviderIsAllowedReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp11_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp12_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
	g_variant_iter_init (&_tmp13_, _tmp11_);
	while (g_variant_iter_loop (&_tmp13_, "{?*}", &_tmp14_, &_tmp15_)) {
		g_hash_table_insert (_tmp12_, g_variant_dup_string (_tmp14_, NULL), g_variant_dup_string (_tmp15_, NULL));
	}
	_ready_data->device = _tmp12_;
	g_variant_unref (_tmp11_);
	_tmp16_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp17_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
	g_variant_iter_init (&_tmp18_, _tmp16_);
	while (g_variant_iter_loop (&_tmp18_, "{?*}", &_tmp19_, &_tmp20_)) {
		g_hash_table_insert (_tmp17_, g_variant_dup_string (_tmp19_, NULL), g_variant_dup_string (_tmp20_, NULL));
	}
	_ready_data->service = _tmp17_;
	g_variant_unref (_tmp16_);
	_tmp21_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->path = g_variant_dup_string (_tmp21_, NULL);
	g_variant_unref (_tmp21_);
	_tmp22_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->address = g_variant_dup_string (_tmp22_, NULL);
	g_variant_unref (_tmp22_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->agent = g_variant_dup_string (_tmp23_, NULL);
	g_variant_unref (_tmp23_);
	rygel_dbus_acl_provider_is_allowed (self, _ready_data->device, _ready_data->service, _ready_data->path, _ready_data->address, _ready_data->agent, (GAsyncReadyCallback) _dbus_rygel_dbus_acl_provider_is_allowed_ready, _ready_data);
}

static void
_dbus_rygel_dbus_acl_provider_is_allowed_ready (GObject * source_object,
                                                GAsyncResult * _res_,
                                                gpointer _user_data_)
{
	RygelDbusAclProviderIsAllowedReadyData* _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 = rygel_dbus_acl_provider_is_allowed_finish ((RygelDBusAclProvider*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_return_gerror (invocation, error);
		g_error_free (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_hash_table_unref0 (_ready_data->device);
	_g_hash_table_unref0 (_ready_data->service);
	_g_free0 (_ready_data->path);
	_g_free0 (_ready_data->address);
	_g_free0 (_ready_data->agent);
	g_slice_free (RygelDbusAclProviderIsAllowedReadyData, _ready_data);
}

static void
rygel_dbus_acl_provider_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, "IsAllowed") == 0) {
		_dbus_rygel_dbus_acl_provider_is_allowed (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
rygel_dbus_acl_provider_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
rygel_dbus_acl_provider_dbus_interface_set_property (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* property_name,
                                                     GVariant* value,
                                                     GError** error,
                                                     gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
rygel_dbus_acl_provider_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 *) (&_rygel_dbus_acl_provider_dbus_interface_info), &_rygel_dbus_acl_provider_dbus_interface_vtable, data, _rygel_dbus_acl_provider_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

