/* Session.c generated by valac 0.56.17, the Vala compiler
 * generated from Session.vala, do not modify */

/*-
 * Copyright (c) 2015-2018 elementary LLC. (https://elementary.io)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Library General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "bluetooth.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>

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

typedef GDBusProxy BluetoothIndicatorServicesObexSessionProxy;
typedef GDBusProxyClass BluetoothIndicatorServicesObexSessionProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

static GType bluetooth_indicator_services_obex_session_get_type_once (void);
static void bluetooth_indicator_services_obex_session_proxy_g_signal (GDBusProxy* proxy,
                                                               const gchar* sender_name,
                                                               const gchar* signal_name,
                                                               GVariant* parameters);
static gchar* bluetooth_indicator_services_obex_session_proxy_get_capabilities (BluetoothIndicatorServicesObexSession* self,
                                                                         GError** error);
static gchar* bluetooth_indicator_services_obex_session_dbus_proxy_get_source (BluetoothIndicatorServicesObexSession* self);
static gchar* bluetooth_indicator_services_obex_session_dbus_proxy_get_destination (BluetoothIndicatorServicesObexSession* self);
static guchar bluetooth_indicator_services_obex_session_dbus_proxy_get_channel (BluetoothIndicatorServicesObexSession* self);
static gchar* bluetooth_indicator_services_obex_session_dbus_proxy_get_target (BluetoothIndicatorServicesObexSession* self);
static gchar* bluetooth_indicator_services_obex_session_dbus_proxy_get_root (BluetoothIndicatorServicesObexSession* self);
static void bluetooth_indicator_services_obex_session_proxy_bluetooth_indicator_services_obex_session_interface_init (BluetoothIndicatorServicesObexSessionIface* iface);
static void _dbus_bluetooth_indicator_services_obex_session_get_capabilities (BluetoothIndicatorServicesObexSession* self,
                                                                       GVariant* _parameters_,
                                                                       GDBusMethodInvocation* invocation);
static void bluetooth_indicator_services_obex_session_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* bluetooth_indicator_services_obex_session_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 GVariant* _dbus_bluetooth_indicator_services_obex_session_get_source (BluetoothIndicatorServicesObexSession* self);
static GVariant* _dbus_bluetooth_indicator_services_obex_session_get_destination (BluetoothIndicatorServicesObexSession* self);
static GVariant* _dbus_bluetooth_indicator_services_obex_session_get_channel (BluetoothIndicatorServicesObexSession* self);
static GVariant* _dbus_bluetooth_indicator_services_obex_session_get_target (BluetoothIndicatorServicesObexSession* self);
static GVariant* _dbus_bluetooth_indicator_services_obex_session_get_root (BluetoothIndicatorServicesObexSession* self);
static gboolean bluetooth_indicator_services_obex_session_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 _bluetooth_indicator_services_obex_session_unregister_object (gpointer user_data);

static const GDBusArgInfo _bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_in[] = {NULL};
static const GDBusArgInfo * const _bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_out[] = {&_bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_result, NULL};
static const GDBusMethodInfo _bluetooth_indicator_services_obex_session_dbus_method_info_get_capabilities = {-1, "GetCapabilities", (GDBusArgInfo **) (&_bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_in), (GDBusArgInfo **) (&_bluetooth_indicator_services_obex_session_dbus_arg_info_get_capabilities_out), NULL};
static const GDBusMethodInfo * const _bluetooth_indicator_services_obex_session_dbus_method_info[] = {&_bluetooth_indicator_services_obex_session_dbus_method_info_get_capabilities, NULL};
static const GDBusSignalInfo * const _bluetooth_indicator_services_obex_session_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _bluetooth_indicator_services_obex_session_dbus_property_info_source = {-1, "Source", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_indicator_services_obex_session_dbus_property_info_destination = {-1, "Destination", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_indicator_services_obex_session_dbus_property_info_channel = {-1, "Channel", "y", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_indicator_services_obex_session_dbus_property_info_target = {-1, "Target", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_indicator_services_obex_session_dbus_property_info_root = {-1, "Root", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _bluetooth_indicator_services_obex_session_dbus_property_info[] = {&_bluetooth_indicator_services_obex_session_dbus_property_info_source, &_bluetooth_indicator_services_obex_session_dbus_property_info_destination, &_bluetooth_indicator_services_obex_session_dbus_property_info_channel, &_bluetooth_indicator_services_obex_session_dbus_property_info_target, &_bluetooth_indicator_services_obex_session_dbus_property_info_root, NULL};
static const GDBusInterfaceInfo _bluetooth_indicator_services_obex_session_dbus_interface_info = {-1, "org.bluez.obex.Session1", (GDBusMethodInfo **) (&_bluetooth_indicator_services_obex_session_dbus_method_info), (GDBusSignalInfo **) (&_bluetooth_indicator_services_obex_session_dbus_signal_info), (GDBusPropertyInfo **) (&_bluetooth_indicator_services_obex_session_dbus_property_info), NULL};
static const GDBusInterfaceVTable _bluetooth_indicator_services_obex_session_dbus_interface_vtable = {bluetooth_indicator_services_obex_session_dbus_interface_method_call, bluetooth_indicator_services_obex_session_dbus_interface_get_property, bluetooth_indicator_services_obex_session_dbus_interface_set_property};

gchar*
bluetooth_indicator_services_obex_session_get_capabilities (BluetoothIndicatorServicesObexSession* self,
                                                            GError** error)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_capabilities) {
		return _iface_->get_capabilities (self, error);
	}
	return NULL;
}

gchar*
bluetooth_indicator_services_obex_session_get_source (BluetoothIndicatorServicesObexSession* self)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_source) {
		return _iface_->get_source (self);
	}
	return NULL;
}

gchar*
bluetooth_indicator_services_obex_session_get_destination (BluetoothIndicatorServicesObexSession* self)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_destination) {
		return _iface_->get_destination (self);
	}
	return NULL;
}

guchar
bluetooth_indicator_services_obex_session_get_channel (BluetoothIndicatorServicesObexSession* self)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, '\0');
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_channel) {
		return _iface_->get_channel (self);
	}
	return '\0';
}

gchar*
bluetooth_indicator_services_obex_session_get_target (BluetoothIndicatorServicesObexSession* self)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_target) {
		return _iface_->get_target (self);
	}
	return NULL;
}

gchar*
bluetooth_indicator_services_obex_session_get_root (BluetoothIndicatorServicesObexSession* self)
{
	BluetoothIndicatorServicesObexSessionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_INDICATOR_SERVICES_OBEX_SESSION_GET_INTERFACE (self);
	if (_iface_->get_root) {
		return _iface_->get_root (self);
	}
	return NULL;
}

static void
bluetooth_indicator_services_obex_session_default_init (BluetoothIndicatorServicesObexSessionIface * iface,
                                                        gpointer iface_data)
{
}

static GType
bluetooth_indicator_services_obex_session_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BluetoothIndicatorServicesObexSessionIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bluetooth_indicator_services_obex_session_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType bluetooth_indicator_services_obex_session_type_id;
	bluetooth_indicator_services_obex_session_type_id = g_type_register_static (G_TYPE_INTERFACE, "BluetoothIndicatorServicesObexSession", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (bluetooth_indicator_services_obex_session_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (bluetooth_indicator_services_obex_session_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) bluetooth_indicator_services_obex_session_proxy_get_type);
	g_type_set_qdata (bluetooth_indicator_services_obex_session_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.bluez.obex.Session1");
	g_type_set_qdata (bluetooth_indicator_services_obex_session_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_bluetooth_indicator_services_obex_session_dbus_interface_info));
	g_type_set_qdata (bluetooth_indicator_services_obex_session_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) bluetooth_indicator_services_obex_session_register_object);
	return bluetooth_indicator_services_obex_session_type_id;
}

GType
bluetooth_indicator_services_obex_session_get_type (void)
{
	static volatile gsize bluetooth_indicator_services_obex_session_type_id__once = 0;
	if (g_once_init_enter (&bluetooth_indicator_services_obex_session_type_id__once)) {
		GType bluetooth_indicator_services_obex_session_type_id;
		bluetooth_indicator_services_obex_session_type_id = bluetooth_indicator_services_obex_session_get_type_once ();
		g_once_init_leave (&bluetooth_indicator_services_obex_session_type_id__once, bluetooth_indicator_services_obex_session_type_id);
	}
	return bluetooth_indicator_services_obex_session_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BluetoothIndicatorServicesObexSessionProxy, bluetooth_indicator_services_obex_session_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BLUETOOTH_INDICATOR_SERVICES_OBEX_TYPE_SESSION, bluetooth_indicator_services_obex_session_proxy_bluetooth_indicator_services_obex_session_interface_init) )
static void
bluetooth_indicator_services_obex_session_proxy_class_init (BluetoothIndicatorServicesObexSessionProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = bluetooth_indicator_services_obex_session_proxy_g_signal;
}

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

static void
bluetooth_indicator_services_obex_session_proxy_init (BluetoothIndicatorServicesObexSessionProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_bluetooth_indicator_services_obex_session_dbus_interface_info));
}

static gchar*
bluetooth_indicator_services_obex_session_proxy_get_capabilities (BluetoothIndicatorServicesObexSession* self,
                                                                  GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp39_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.obex.Session1", "GetCapabilities");
	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 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);
	_tmp39_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp39_, NULL);
	g_variant_unref (_tmp39_);
	g_object_unref (_reply_message);
	return _result;
}

static gchar*
bluetooth_indicator_services_obex_session_dbus_proxy_get_source (BluetoothIndicatorServicesObexSession* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Source");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.bluez.obex.Session1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Source"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
bluetooth_indicator_services_obex_session_dbus_proxy_get_destination (BluetoothIndicatorServicesObexSession* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Destination");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.bluez.obex.Session1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Destination"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static guchar
bluetooth_indicator_services_obex_session_dbus_proxy_get_channel (BluetoothIndicatorServicesObexSession* self)
{
	GVariant *_inner_reply;
	guchar _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Channel");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.bluez.obex.Session1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Channel"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			guchar _tmp40_ = '\0';
			return _tmp40_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_byte (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
bluetooth_indicator_services_obex_session_dbus_proxy_get_target (BluetoothIndicatorServicesObexSession* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Target");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.bluez.obex.Session1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Target"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static gchar*
bluetooth_indicator_services_obex_session_dbus_proxy_get_root (BluetoothIndicatorServicesObexSession* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Root");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.bluez.obex.Session1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Root"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
bluetooth_indicator_services_obex_session_proxy_bluetooth_indicator_services_obex_session_interface_init (BluetoothIndicatorServicesObexSessionIface* iface)
{
	iface->get_capabilities = bluetooth_indicator_services_obex_session_proxy_get_capabilities;
	iface->get_source = bluetooth_indicator_services_obex_session_dbus_proxy_get_source;
	iface->get_destination = bluetooth_indicator_services_obex_session_dbus_proxy_get_destination;
	iface->get_channel = bluetooth_indicator_services_obex_session_dbus_proxy_get_channel;
	iface->get_target = bluetooth_indicator_services_obex_session_dbus_proxy_get_target;
	iface->get_root = bluetooth_indicator_services_obex_session_dbus_proxy_get_root;
}

static void
_dbus_bluetooth_indicator_services_obex_session_get_capabilities (BluetoothIndicatorServicesObexSession* self,
                                                                  GVariant* _parameters_,
                                                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = bluetooth_indicator_services_obex_session_get_capabilities (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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_string (result));
	_g_free0 (result);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

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

static GVariant*
_dbus_bluetooth_indicator_services_obex_session_get_source (BluetoothIndicatorServicesObexSession* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_indicator_services_obex_session_get_source (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_indicator_services_obex_session_get_destination (BluetoothIndicatorServicesObexSession* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_indicator_services_obex_session_get_destination (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_indicator_services_obex_session_get_channel (BluetoothIndicatorServicesObexSession* self)
{
	guchar result;
	GVariant* _reply;
	result = bluetooth_indicator_services_obex_session_get_channel (self);
	_reply = g_variant_new_byte (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_indicator_services_obex_session_get_target (BluetoothIndicatorServicesObexSession* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_indicator_services_obex_session_get_target (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_indicator_services_obex_session_get_root (BluetoothIndicatorServicesObexSession* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_indicator_services_obex_session_get_root (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
bluetooth_indicator_services_obex_session_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];
	if (strcmp (property_name, "Source") == 0) {
		return _dbus_bluetooth_indicator_services_obex_session_get_source (object);
	} else if (strcmp (property_name, "Destination") == 0) {
		return _dbus_bluetooth_indicator_services_obex_session_get_destination (object);
	} else if (strcmp (property_name, "Channel") == 0) {
		return _dbus_bluetooth_indicator_services_obex_session_get_channel (object);
	} else if (strcmp (property_name, "Target") == 0) {
		return _dbus_bluetooth_indicator_services_obex_session_get_target (object);
	} else if (strcmp (property_name, "Root") == 0) {
		return _dbus_bluetooth_indicator_services_obex_session_get_root (object);
	}
	return NULL;
}

static gboolean
bluetooth_indicator_services_obex_session_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
bluetooth_indicator_services_obex_session_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 *) (&_bluetooth_indicator_services_obex_session_dbus_interface_info), &_bluetooth_indicator_services_obex_session_dbus_interface_vtable, data, _bluetooth_indicator_services_obex_session_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_bluetooth_indicator_services_obex_session_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);
}

