/* rygel-free-desktop-interfaces.c generated by valac 0.56.1, the Vala compiler
 * generated from rygel-free-desktop-interfaces.vala, do not modify */

/*
 * Copyright (C) 2009,2010 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.com>
 *
 * 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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include "rygel-mpris.h"

#define RYGEL_MPRIS_FREE_DESKTOP_DBUS_SERVICE "org.freedesktop.DBus"
#define RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_PATH "/org/freedesktop/DBus"

#define RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT (rygel_mpris_free_desktop_dbus_object_get_type ())
#define RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT, RygelMPRISFreeDesktopDBusObject))
#define RYGEL_MPRIS_FREE_DESKTOP_IS_DBUS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT))
#define RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT, RygelMPRISFreeDesktopDBusObjectIface))

typedef struct _RygelMPRISFreeDesktopDBusObject RygelMPRISFreeDesktopDBusObject;
typedef struct _RygelMPRISFreeDesktopDBusObjectIface RygelMPRISFreeDesktopDBusObjectIface;

#define RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT_PROXY (rygel_mpris_free_desktop_dbus_object_proxy_get_type ())
enum  {
	RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_NAME_OWNER_CHANGED_SIGNAL,
	RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_NUM_SIGNALS
};
static guint rygel_mpris_free_desktop_dbus_object_signals[RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_NUM_SIGNALS] = {0};
typedef GDBusProxy RygelMPRISFreeDesktopDBusObjectProxy;
typedef GDBusProxyClass RygelMPRISFreeDesktopDBusObjectProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _RygelMPRISFreeDesktopDBusObjectIface {
	GTypeInterface parent_iface;
	void (*list_names) (RygelMPRISFreeDesktopDBusObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*list_names_finish) (RygelMPRISFreeDesktopDBusObject* self, GAsyncResult* _res_, gint* result_length1, GError** error);
	void (*list_activatable_names) (RygelMPRISFreeDesktopDBusObject* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*list_activatable_names_finish) (RygelMPRISFreeDesktopDBusObject* self, GAsyncResult* _res_, gint* result_length1, GError** error);
};

VALA_EXTERN GType rygel_mpris_free_desktop_dbus_object_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint rygel_mpris_free_desktop_dbus_object_register_object (void* object,
                                                            GDBusConnection* connection,
                                                            const gchar* path,
                                                            GError** error);
VALA_EXTERN GType rygel_mpris_free_desktop_dbus_object_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void rygel_mpris_free_desktop_dbus_object_list_names (RygelMPRISFreeDesktopDBusObject* self,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gchar** rygel_mpris_free_desktop_dbus_object_list_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                GAsyncResult* _res_,
                                                                gint* result_length1,
                                                                GError** error);
VALA_EXTERN void rygel_mpris_free_desktop_dbus_object_list_activatable_names (RygelMPRISFreeDesktopDBusObject* self,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
VALA_EXTERN gchar** rygel_mpris_free_desktop_dbus_object_list_activatable_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                            GAsyncResult* _res_,
                                                                            gint* result_length1,
                                                                            GError** error);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static GType rygel_mpris_free_desktop_dbus_object_get_type_once (void);
static void rygel_mpris_free_desktop_dbus_object_proxy_g_signal (GDBusProxy* proxy,
                                                          const gchar* sender_name,
                                                          const gchar* signal_name,
                                                          GVariant* parameters);
static void _dbus_handle_rygel_mpris_free_desktop_dbus_object_name_owner_changed (RygelMPRISFreeDesktopDBusObject* self,
                                                                           GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void rygel_mpris_free_desktop_dbus_object_proxy_list_names_async (RygelMPRISFreeDesktopDBusObject* self,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static gchar** rygel_mpris_free_desktop_dbus_object_proxy_list_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                      GAsyncResult* _res_,
                                                                      gint* result_length1,
                                                                      GError** error);
static void rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_async (RygelMPRISFreeDesktopDBusObject* self,
                                                                              GAsyncReadyCallback _callback_,
                                                                              gpointer _user_data_);
static gchar** rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                                  GAsyncResult* _res_,
                                                                                  gint* result_length1,
                                                                                  GError** error);
static void rygel_mpris_free_desktop_dbus_object_proxy_rygel_mpris_free_desktop_dbus_object_interface_init (RygelMPRISFreeDesktopDBusObjectIface* iface);
static void rygel_mpris_free_desktop_dbus_object_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_mpris_free_desktop_dbus_object_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_mpris_free_desktop_dbus_object_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_rygel_mpris_free_desktop_dbus_object_name_owner_changed (GObject* _sender,
                                                                    const gchar* name,
                                                                    const gchar* old_owner,
                                                                    const gchar* new_owner,
                                                                    gpointer* _data);
static void _rygel_mpris_free_desktop_dbus_object_unregister_object (gpointer user_data);

static const GDBusMethodInfo * const _rygel_mpris_free_desktop_dbus_object_dbus_method_info[] = {NULL};
static const GDBusArgInfo _rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_old_owner = {-1, "old_owner", "s", NULL};
static const GDBusArgInfo _rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_new_owner = {-1, "new_owner", "s", NULL};
static const GDBusArgInfo * const _rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed[] = {&_rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_name, &_rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_old_owner, &_rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed_new_owner, NULL};
static const GDBusSignalInfo _rygel_mpris_free_desktop_dbus_object_dbus_signal_info_name_owner_changed = {-1, "NameOwnerChanged", (GDBusArgInfo **) (&_rygel_mpris_free_desktop_dbus_object_dbus_arg_info_name_owner_changed), NULL};
static const GDBusSignalInfo * const _rygel_mpris_free_desktop_dbus_object_dbus_signal_info[] = {&_rygel_mpris_free_desktop_dbus_object_dbus_signal_info_name_owner_changed, NULL};
static const GDBusPropertyInfo * const _rygel_mpris_free_desktop_dbus_object_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _rygel_mpris_free_desktop_dbus_object_dbus_interface_info = {-1, "org.freedesktop.DBus", (GDBusMethodInfo **) (&_rygel_mpris_free_desktop_dbus_object_dbus_method_info), (GDBusSignalInfo **) (&_rygel_mpris_free_desktop_dbus_object_dbus_signal_info), (GDBusPropertyInfo **) (&_rygel_mpris_free_desktop_dbus_object_dbus_property_info), NULL};
static const GDBusInterfaceVTable _rygel_mpris_free_desktop_dbus_object_dbus_interface_vtable = {rygel_mpris_free_desktop_dbus_object_dbus_interface_method_call, rygel_mpris_free_desktop_dbus_object_dbus_interface_get_property, rygel_mpris_free_desktop_dbus_object_dbus_interface_set_property};

void
rygel_mpris_free_desktop_dbus_object_list_names (RygelMPRISFreeDesktopDBusObject* self,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	RygelMPRISFreeDesktopDBusObjectIface* _iface_;
	_iface_ = RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_GET_INTERFACE (self);
	if (_iface_->list_names) {
		_iface_->list_names (self, _callback_, _user_data_);
	}
}

gchar**
rygel_mpris_free_desktop_dbus_object_list_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                        GAsyncResult* _res_,
                                                        gint* result_length1,
                                                        GError** error)
{
	RygelMPRISFreeDesktopDBusObjectIface* _iface_;
	_iface_ = RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_GET_INTERFACE (self);
	if (_iface_->list_names_finish) {
		return _iface_->list_names_finish (self, _res_, result_length1, error);
	}
	return NULL;
}

void
rygel_mpris_free_desktop_dbus_object_list_activatable_names (RygelMPRISFreeDesktopDBusObject* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	RygelMPRISFreeDesktopDBusObjectIface* _iface_;
	_iface_ = RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_GET_INTERFACE (self);
	if (_iface_->list_activatable_names) {
		_iface_->list_activatable_names (self, _callback_, _user_data_);
	}
}

gchar**
rygel_mpris_free_desktop_dbus_object_list_activatable_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                    GAsyncResult* _res_,
                                                                    gint* result_length1,
                                                                    GError** error)
{
	RygelMPRISFreeDesktopDBusObjectIface* _iface_;
	_iface_ = RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_GET_INTERFACE (self);
	if (_iface_->list_activatable_names_finish) {
		return _iface_->list_activatable_names_finish (self, _res_, result_length1, error);
	}
	return NULL;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	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_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
rygel_mpris_free_desktop_dbus_object_default_init (RygelMPRISFreeDesktopDBusObjectIface * iface,
                                                   gpointer iface_data)
{
	rygel_mpris_free_desktop_dbus_object_signals[RYGEL_MPRIS_FREE_DESKTOP_DBUS_OBJECT_NAME_OWNER_CHANGED_SIGNAL] = g_signal_new ("name-owner-changed", RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}

static GType
rygel_mpris_free_desktop_dbus_object_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelMPRISFreeDesktopDBusObjectIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_mpris_free_desktop_dbus_object_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType rygel_mpris_free_desktop_dbus_object_type_id;
	rygel_mpris_free_desktop_dbus_object_type_id = g_type_register_static (G_TYPE_INTERFACE, "RygelMPRISFreeDesktopDBusObject", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (rygel_mpris_free_desktop_dbus_object_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (rygel_mpris_free_desktop_dbus_object_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) rygel_mpris_free_desktop_dbus_object_proxy_get_type);
	g_type_set_qdata (rygel_mpris_free_desktop_dbus_object_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.DBus");
	g_type_set_qdata (rygel_mpris_free_desktop_dbus_object_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_rygel_mpris_free_desktop_dbus_object_dbus_interface_info));
	g_type_set_qdata (rygel_mpris_free_desktop_dbus_object_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) rygel_mpris_free_desktop_dbus_object_register_object);
	return rygel_mpris_free_desktop_dbus_object_type_id;
}

GType
rygel_mpris_free_desktop_dbus_object_get_type (void)
{
	static volatile gsize rygel_mpris_free_desktop_dbus_object_type_id__once = 0;
	if (g_once_init_enter (&rygel_mpris_free_desktop_dbus_object_type_id__once)) {
		GType rygel_mpris_free_desktop_dbus_object_type_id;
		rygel_mpris_free_desktop_dbus_object_type_id = rygel_mpris_free_desktop_dbus_object_get_type_once ();
		g_once_init_leave (&rygel_mpris_free_desktop_dbus_object_type_id__once, rygel_mpris_free_desktop_dbus_object_type_id);
	}
	return rygel_mpris_free_desktop_dbus_object_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (RygelMPRISFreeDesktopDBusObjectProxy, rygel_mpris_free_desktop_dbus_object_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (RYGEL_MPRIS_FREE_DESKTOP_TYPE_DBUS_OBJECT, rygel_mpris_free_desktop_dbus_object_proxy_rygel_mpris_free_desktop_dbus_object_interface_init) )
static void
rygel_mpris_free_desktop_dbus_object_proxy_class_init (RygelMPRISFreeDesktopDBusObjectProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = rygel_mpris_free_desktop_dbus_object_proxy_g_signal;
}

static void
_dbus_handle_rygel_mpris_free_desktop_dbus_object_name_owner_changed (RygelMPRISFreeDesktopDBusObject* self,
                                                                      GVariant* parameters)
{
	GVariantIter _arguments_iter;
	gchar* name = NULL;
	GVariant* _tmp35_;
	gchar* old_owner = NULL;
	GVariant* _tmp36_;
	gchar* new_owner = NULL;
	GVariant* _tmp37_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp35_ = g_variant_iter_next_value (&_arguments_iter);
	name = g_variant_dup_string (_tmp35_, NULL);
	g_variant_unref (_tmp35_);
	_tmp36_ = g_variant_iter_next_value (&_arguments_iter);
	old_owner = g_variant_dup_string (_tmp36_, NULL);
	g_variant_unref (_tmp36_);
	_tmp37_ = g_variant_iter_next_value (&_arguments_iter);
	new_owner = g_variant_dup_string (_tmp37_, NULL);
	g_variant_unref (_tmp37_);
	g_signal_emit_by_name (self, "name-owner-changed", name, old_owner, new_owner);
	_g_free0 (name);
	_g_free0 (old_owner);
	_g_free0 (new_owner);
}

static void
rygel_mpris_free_desktop_dbus_object_proxy_g_signal (GDBusProxy* proxy,
                                                     const gchar* sender_name,
                                                     const gchar* signal_name,
                                                     GVariant* parameters)
{
	if (strcmp (signal_name, "NameOwnerChanged") == 0) {
		_dbus_handle_rygel_mpris_free_desktop_dbus_object_name_owner_changed ((RygelMPRISFreeDesktopDBusObject*) proxy, parameters);
	}
}

static void
rygel_mpris_free_desktop_dbus_object_proxy_init (RygelMPRISFreeDesktopDBusObjectProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_rygel_mpris_free_desktop_dbus_object_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_mpris_free_desktop_dbus_object_proxy_list_names_async (RygelMPRISFreeDesktopDBusObject* self,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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.freedesktop.DBus", "ListNames");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, 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 gchar**
rygel_mpris_free_desktop_dbus_object_proxy_list_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                              GAsyncResult* _res_,
                                                              gint* result_length1,
                                                              GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp38_;
	gchar** _tmp39_;
	gint _tmp39__length;
	gint _tmp39__size;
	gint _tmp39__length1;
	GVariantIter _tmp40_;
	GVariant* _tmp41_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp38_ = g_variant_iter_next_value (&_reply_iter);
	_tmp39_ = g_new (gchar*, 5);
	_tmp39__length = 0;
	_tmp39__size = 4;
	_tmp39__length1 = 0;
	g_variant_iter_init (&_tmp40_, _tmp38_);
	for (; (_tmp41_ = g_variant_iter_next_value (&_tmp40_)) != NULL; _tmp39__length1++) {
		if (_tmp39__size == _tmp39__length) {
			_tmp39__size = 2 * _tmp39__size;
			_tmp39_ = g_renew (gchar*, _tmp39_, _tmp39__size + 1);
		}
		_tmp39_[_tmp39__length++] = g_variant_dup_string (_tmp41_, NULL);
		g_variant_unref (_tmp41_);
	}
	_result_length1 = _tmp39__length1;
	_tmp39_[_tmp39__length] = NULL;
	_result = _tmp39_;
	g_variant_unref (_tmp38_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static void
rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_async (RygelMPRISFreeDesktopDBusObject* self,
                                                                         GAsyncReadyCallback _callback_,
                                                                         gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	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.freedesktop.DBus", "ListActivatableNames");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, 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 gchar**
rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_finish (RygelMPRISFreeDesktopDBusObject* self,
                                                                          GAsyncResult* _res_,
                                                                          gint* result_length1,
                                                                          GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar** _result = NULL;
	gint _result_length1;
	GVariant* _tmp42_;
	gchar** _tmp43_;
	gint _tmp43__length;
	gint _tmp43__size;
	gint _tmp43__length1;
	GVariantIter _tmp44_;
	GVariant* _tmp45_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_result_length1 = 0;
	_tmp42_ = g_variant_iter_next_value (&_reply_iter);
	_tmp43_ = g_new (gchar*, 5);
	_tmp43__length = 0;
	_tmp43__size = 4;
	_tmp43__length1 = 0;
	g_variant_iter_init (&_tmp44_, _tmp42_);
	for (; (_tmp45_ = g_variant_iter_next_value (&_tmp44_)) != NULL; _tmp43__length1++) {
		if (_tmp43__size == _tmp43__length) {
			_tmp43__size = 2 * _tmp43__size;
			_tmp43_ = g_renew (gchar*, _tmp43_, _tmp43__size + 1);
		}
		_tmp43_[_tmp43__length++] = g_variant_dup_string (_tmp45_, NULL);
		g_variant_unref (_tmp45_);
	}
	_result_length1 = _tmp43__length1;
	_tmp43_[_tmp43__length] = NULL;
	_result = _tmp43_;
	g_variant_unref (_tmp42_);
	*result_length1 = _result_length1;
	g_object_unref (_reply_message);
	return _result;
}

static void
rygel_mpris_free_desktop_dbus_object_proxy_rygel_mpris_free_desktop_dbus_object_interface_init (RygelMPRISFreeDesktopDBusObjectIface* iface)
{
	iface->list_names = rygel_mpris_free_desktop_dbus_object_proxy_list_names_async;
	iface->list_names_finish = rygel_mpris_free_desktop_dbus_object_proxy_list_names_finish;
	iface->list_activatable_names = rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_async;
	iface->list_activatable_names_finish = rygel_mpris_free_desktop_dbus_object_proxy_list_activatable_names_finish;
}

static void
rygel_mpris_free_desktop_dbus_object_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];
	g_object_unref (invocation);
}

static GVariant*
rygel_mpris_free_desktop_dbus_object_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_mpris_free_desktop_dbus_object_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_rygel_mpris_free_desktop_dbus_object_name_owner_changed (GObject* _sender,
                                                               const gchar* name,
                                                               const gchar* old_owner,
                                                               const gchar* new_owner,
                                                               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 (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (old_owner));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (new_owner));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.DBus", "NameOwnerChanged", _arguments, NULL);
}

guint
rygel_mpris_free_desktop_dbus_object_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_mpris_free_desktop_dbus_object_dbus_interface_info), &_rygel_mpris_free_desktop_dbus_object_dbus_interface_vtable, data, _rygel_mpris_free_desktop_dbus_object_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "name-owner-changed", (GCallback) _dbus_rygel_mpris_free_desktop_dbus_object_name_owner_changed, data);
	return result;
}

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

