/* rygel-dbus-interface.c generated by valac 0.56.1, 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 "rygel-core.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.h>
#include <stdlib.h>

typedef GDBusProxy RygelDBusInterfaceProxy;
typedef GDBusProxyClass RygelDBusInterfaceProxyClass;
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 _RygelDbusAclProviderIsAllowedReadyData {
	GDBusMethodInvocation* _invocation_;
	GHashTable* device;
	GHashTable* service;
	gchar* path;
	gchar* address;
	gchar* agent;
};

static GType rygel_dbus_interface_get_type_once (void);
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);
static GType rygel_dbus_acl_provider_get_type_once (void);
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), NULL};
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), NULL};
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}", NULL};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_service = {-1, "service", "a{ss}", NULL};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_path = {-1, "path", "s", NULL};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_address = {-1, "address", "s", NULL};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_agent = {-1, "agent", "s", NULL};
static const GDBusArgInfo _rygel_dbus_acl_provider_dbus_arg_info_is_allowed_result = {-1, "result", "b", NULL};
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), NULL};
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), NULL};
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)
{
	RygelDBusInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = RYGEL_DBUS_INTERFACE_GET_INTERFACE (self);
	if (_iface_->shutdown) {
		_iface_->shutdown (self, error);
	}
}

static void
rygel_dbus_interface_default_init (RygelDBusInterfaceIface * iface,
                                   gpointer iface_data)
{
}

static GType
rygel_dbus_interface_get_type_once (void)
{
	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);
	return rygel_dbus_interface_type_id;
}

GType
rygel_dbus_interface_get_type (void)
{
	static volatile gsize rygel_dbus_interface_type_id__once = 0;
	if (g_once_init_enter (&rygel_dbus_interface_type_id__once)) {
		GType rygel_dbus_interface_type_id;
		rygel_dbus_interface_type_id = rygel_dbus_interface_get_type_once ();
		g_once_init_leave (&rygel_dbus_interface_type_id__once, rygel_dbus_interface_type_id);
	}
	return rygel_dbus_interface_type_id__once;
}

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)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_rygel_dbus_interface_dbus_interface_info));
}

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_take_error (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
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_)
{
	RygelDBusAclProviderIface* _iface_;
	_iface_ = RYGEL_DBUS_ACL_PROVIDER_GET_INTERFACE (self);
	if (_iface_->is_allowed) {
		_iface_->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)
{
	RygelDBusAclProviderIface* _iface_;
	_iface_ = RYGEL_DBUS_ACL_PROVIDER_GET_INTERFACE (self);
	if (_iface_->is_allowed_finish) {
		return _iface_->is_allowed_finish (self, _res_, error);
	}
	return FALSE;
}

static void
rygel_dbus_acl_provider_default_init (RygelDBusAclProviderIface * iface,
                                      gpointer iface_data)
{
}

static GType
rygel_dbus_acl_provider_get_type_once (void)
{
	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);
	return rygel_dbus_acl_provider_type_id;
}

GType
rygel_dbus_acl_provider_get_type (void)
{
	static volatile gsize rygel_dbus_acl_provider_type_id__once = 0;
	if (g_once_init_enter (&rygel_dbus_acl_provider_type_id__once)) {
		GType rygel_dbus_acl_provider_type_id;
		rygel_dbus_acl_provider_type_id = rygel_dbus_acl_provider_get_type_once ();
		g_once_init_leave (&rygel_dbus_acl_provider_type_id__once, rygel_dbus_acl_provider_type_id);
	}
	return rygel_dbus_acl_provider_type_id__once;
}

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)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_rygel_dbus_acl_provider_dbus_interface_info));
}

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

static void
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);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static gboolean
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);
	_error:
	;
}

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_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_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);
}

