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

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

#include "sound.h"
#include <glib.h>
#include <stdlib.h>
#include <string.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 SoundServicesDeviceProxy;
typedef GDBusProxyClass SoundServicesDeviceProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))

static GType sound_services_device_get_type_once (void);
static void sound_services_device_proxy_g_signal (GDBusProxy* proxy,
                                           const gchar* sender_name,
                                           const gchar* signal_name,
                                           GVariant* parameters);
static void sound_services_device_proxy_cancel_pairing (SoundServicesDevice* self,
                                                 GError** error);
static void sound_services_device_proxy_connect (SoundServicesDevice* self,
                                          GError** error);
static void sound_services_device_proxy_connect_profile (SoundServicesDevice* self,
                                                  const gchar* UUID,
                                                  GError** error);
static void sound_services_device_proxy_disconnect (SoundServicesDevice* self,
                                             GError** error);
static void sound_services_device_proxy_disconnect_profile (SoundServicesDevice* self,
                                                     const gchar* UUID,
                                                     GError** error);
static void sound_services_device_proxy_pair (SoundServicesDevice* self,
                                       GError** error);
static gchar** sound_services_device_dbus_proxy_get_UUIDs (SoundServicesDevice* self,
                                                    gint* result_length1);
static gboolean sound_services_device_dbus_proxy_get_blocked (SoundServicesDevice* self);
static void sound_services_device_dbus_proxy_set_blocked (SoundServicesDevice* self,
                                                   gboolean value);
static gboolean sound_services_device_dbus_proxy_get_connected (SoundServicesDevice* self);
static gboolean sound_services_device_dbus_proxy_get_legacy_pairing (SoundServicesDevice* self);
static gboolean sound_services_device_dbus_proxy_get_paired (SoundServicesDevice* self);
static gboolean sound_services_device_dbus_proxy_get_trusted (SoundServicesDevice* self);
static void sound_services_device_dbus_proxy_set_trusted (SoundServicesDevice* self,
                                                   gboolean value);
static gint16 sound_services_device_dbus_proxy_get_RSSI (SoundServicesDevice* self);
static char* sound_services_device_dbus_proxy_get_adapter (SoundServicesDevice* self);
static gchar* sound_services_device_dbus_proxy_get_address (SoundServicesDevice* self);
static gchar* sound_services_device_dbus_proxy_get_alias (SoundServicesDevice* self);
static void sound_services_device_dbus_proxy_set_alias (SoundServicesDevice* self,
                                                 const gchar* value);
static gchar* sound_services_device_dbus_proxy_get_icon (SoundServicesDevice* self);
static gchar* sound_services_device_dbus_proxy_get_modalias (SoundServicesDevice* self);
static gchar* sound_services_device_dbus_proxy_get_name (SoundServicesDevice* self);
static guint16 sound_services_device_dbus_proxy_get_appearance (SoundServicesDevice* self);
static guint32 sound_services_device_dbus_proxy_get_class (SoundServicesDevice* self);
static void sound_services_device_proxy_sound_services_device_interface_init (SoundServicesDeviceIface* iface);
static void _dbus_sound_services_device_cancel_pairing (SoundServicesDevice* self,
                                                 GVariant* _parameters_,
                                                 GDBusMethodInvocation* invocation);
static void _dbus_sound_services_device_connect (SoundServicesDevice* self,
                                          GVariant* _parameters_,
                                          GDBusMethodInvocation* invocation);
static void _dbus_sound_services_device_connect_profile (SoundServicesDevice* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation);
static void _dbus_sound_services_device_disconnect (SoundServicesDevice* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_sound_services_device_disconnect_profile (SoundServicesDevice* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_sound_services_device_pair (SoundServicesDevice* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation);
static void sound_services_device_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* sound_services_device_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_sound_services_device_get_UUIDs (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_blocked (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_connected (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_legacy_pairing (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_paired (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_trusted (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_RSSI (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_adapter (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_address (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_alias (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_icon (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_modalias (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_name (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_appearance (SoundServicesDevice* self);
static GVariant* _dbus_sound_services_device_get_class (SoundServicesDevice* self);
static gboolean sound_services_device_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_sound_services_device_set_blocked (SoundServicesDevice* self,
                                              GVariant* _value);
static void _dbus_sound_services_device_set_trusted (SoundServicesDevice* self,
                                              GVariant* _value);
static void _dbus_sound_services_device_set_alias (SoundServicesDevice* self,
                                            GVariant* _value);
static void _sound_services_device_unregister_object (gpointer user_data);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_cancel_pairing_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_cancel_pairing_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_cancel_pairing = {-1, "CancelPairing", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_cancel_pairing_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_cancel_pairing_out), NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_connect_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_connect_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_connect = {-1, "Connect", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_connect_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_connect_out), NULL};
static const GDBusArgInfo _sound_services_device_dbus_arg_info_connect_profile_UUID = {-1, "UUID", "s", NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_connect_profile_in[] = {&_sound_services_device_dbus_arg_info_connect_profile_UUID, NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_connect_profile_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_connect_profile = {-1, "ConnectProfile", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_connect_profile_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_connect_profile_out), NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_disconnect_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_disconnect_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_disconnect = {-1, "Disconnect", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_disconnect_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_disconnect_out), NULL};
static const GDBusArgInfo _sound_services_device_dbus_arg_info_disconnect_profile_UUID = {-1, "UUID", "s", NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_disconnect_profile_in[] = {&_sound_services_device_dbus_arg_info_disconnect_profile_UUID, NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_disconnect_profile_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_disconnect_profile = {-1, "DisconnectProfile", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_disconnect_profile_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_disconnect_profile_out), NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_pair_in[] = {NULL};
static const GDBusArgInfo * const _sound_services_device_dbus_arg_info_pair_out[] = {NULL};
static const GDBusMethodInfo _sound_services_device_dbus_method_info_pair = {-1, "Pair", (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_pair_in), (GDBusArgInfo **) (&_sound_services_device_dbus_arg_info_pair_out), NULL};
static const GDBusMethodInfo * const _sound_services_device_dbus_method_info[] = {&_sound_services_device_dbus_method_info_cancel_pairing, &_sound_services_device_dbus_method_info_connect, &_sound_services_device_dbus_method_info_connect_profile, &_sound_services_device_dbus_method_info_disconnect, &_sound_services_device_dbus_method_info_disconnect_profile, &_sound_services_device_dbus_method_info_pair, NULL};
static const GDBusSignalInfo * const _sound_services_device_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_UUIDs = {-1, "UUIDs", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_blocked = {-1, "Blocked", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_connected = {-1, "Connected", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_legacy_pairing = {-1, "LegacyPairing", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_paired = {-1, "Paired", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_trusted = {-1, "Trusted", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_RSSI = {-1, "RSSI", "n", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_adapter = {-1, "Adapter", "o", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_address = {-1, "Address", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_alias = {-1, "Alias", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_icon = {-1, "Icon", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_modalias = {-1, "Modalias", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_name = {-1, "Name", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_appearance = {-1, "Appearance", "q", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _sound_services_device_dbus_property_info_class = {-1, "Class", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _sound_services_device_dbus_property_info[] = {&_sound_services_device_dbus_property_info_UUIDs, &_sound_services_device_dbus_property_info_blocked, &_sound_services_device_dbus_property_info_connected, &_sound_services_device_dbus_property_info_legacy_pairing, &_sound_services_device_dbus_property_info_paired, &_sound_services_device_dbus_property_info_trusted, &_sound_services_device_dbus_property_info_RSSI, &_sound_services_device_dbus_property_info_adapter, &_sound_services_device_dbus_property_info_address, &_sound_services_device_dbus_property_info_alias, &_sound_services_device_dbus_property_info_icon, &_sound_services_device_dbus_property_info_modalias, &_sound_services_device_dbus_property_info_name, &_sound_services_device_dbus_property_info_appearance, &_sound_services_device_dbus_property_info_class, NULL};
static const GDBusInterfaceInfo _sound_services_device_dbus_interface_info = {-1, "org.bluez.Device1", (GDBusMethodInfo **) (&_sound_services_device_dbus_method_info), (GDBusSignalInfo **) (&_sound_services_device_dbus_signal_info), (GDBusPropertyInfo **) (&_sound_services_device_dbus_property_info), NULL};
static const GDBusInterfaceVTable _sound_services_device_dbus_interface_vtable = {sound_services_device_dbus_interface_method_call, sound_services_device_dbus_interface_get_property, sound_services_device_dbus_interface_set_property};

void
sound_services_device_cancel_pairing (SoundServicesDevice* self,
                                      GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->cancel_pairing) {
		_iface_->cancel_pairing (self, error);
	}
}

void
sound_services_device_connect (SoundServicesDevice* self,
                               GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->connect) {
		_iface_->connect (self, error);
	}
}

void
sound_services_device_connect_profile (SoundServicesDevice* self,
                                       const gchar* UUID,
                                       GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->connect_profile) {
		_iface_->connect_profile (self, UUID, error);
	}
}

void
sound_services_device_disconnect (SoundServicesDevice* self,
                                  GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->disconnect) {
		_iface_->disconnect (self, error);
	}
}

void
sound_services_device_disconnect_profile (SoundServicesDevice* self,
                                          const gchar* UUID,
                                          GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->disconnect_profile) {
		_iface_->disconnect_profile (self, UUID, error);
	}
}

void
sound_services_device_pair (SoundServicesDevice* self,
                            GError** error)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->pair) {
		_iface_->pair (self, error);
	}
}

gchar**
sound_services_device_get_UUIDs (SoundServicesDevice* self,
                                 gint* result_length1)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_UUIDs) {
		return _iface_->get_UUIDs (self, result_length1);
	}
	return NULL;
}

gboolean
sound_services_device_get_blocked (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_blocked) {
		return _iface_->get_blocked (self);
	}
	return FALSE;
}

void
sound_services_device_set_blocked (SoundServicesDevice* self,
                                   gboolean value)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->set_blocked) {
		_iface_->set_blocked (self, value);
	}
}

gboolean
sound_services_device_get_connected (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_connected) {
		return _iface_->get_connected (self);
	}
	return FALSE;
}

gboolean
sound_services_device_get_legacy_pairing (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_legacy_pairing) {
		return _iface_->get_legacy_pairing (self);
	}
	return FALSE;
}

gboolean
sound_services_device_get_paired (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_paired) {
		return _iface_->get_paired (self);
	}
	return FALSE;
}

gboolean
sound_services_device_get_trusted (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_trusted) {
		return _iface_->get_trusted (self);
	}
	return FALSE;
}

void
sound_services_device_set_trusted (SoundServicesDevice* self,
                                   gboolean value)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->set_trusted) {
		_iface_->set_trusted (self, value);
	}
}

gint16
sound_services_device_get_RSSI (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_RSSI) {
		return _iface_->get_RSSI (self);
	}
	return -1;
}

char*
sound_services_device_get_adapter (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_adapter) {
		return _iface_->get_adapter (self);
	}
	return NULL;
}

gchar*
sound_services_device_get_address (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_address) {
		return _iface_->get_address (self);
	}
	return NULL;
}

gchar*
sound_services_device_get_alias (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_alias) {
		return _iface_->get_alias (self);
	}
	return NULL;
}

void
sound_services_device_set_alias (SoundServicesDevice* self,
                                 const gchar* value)
{
	SoundServicesDeviceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->set_alias) {
		_iface_->set_alias (self, value);
	}
}

gchar*
sound_services_device_get_icon (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_icon) {
		return _iface_->get_icon (self);
	}
	return NULL;
}

gchar*
sound_services_device_get_modalias (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_modalias) {
		return _iface_->get_modalias (self);
	}
	return NULL;
}

gchar*
sound_services_device_get_name (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

guint16
sound_services_device_get_appearance (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_appearance) {
		return _iface_->get_appearance (self);
	}
	return 0U;
}

guint32
sound_services_device_get_class (SoundServicesDevice* self)
{
	SoundServicesDeviceIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = SOUND_SERVICES_DEVICE_GET_INTERFACE (self);
	if (_iface_->get_class) {
		return _iface_->get_class (self);
	}
	return 0U;
}

static void
sound_services_device_default_init (SoundServicesDeviceIface * iface,
                                    gpointer iface_data)
{
}

static GType
sound_services_device_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SoundServicesDeviceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sound_services_device_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType sound_services_device_type_id;
	sound_services_device_type_id = g_type_register_static (G_TYPE_INTERFACE, "SoundServicesDevice", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (sound_services_device_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (sound_services_device_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) sound_services_device_proxy_get_type);
	g_type_set_qdata (sound_services_device_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.bluez.Device1");
	g_type_set_qdata (sound_services_device_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_sound_services_device_dbus_interface_info));
	g_type_set_qdata (sound_services_device_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) sound_services_device_register_object);
	return sound_services_device_type_id;
}

GType
sound_services_device_get_type (void)
{
	static volatile gsize sound_services_device_type_id__once = 0;
	if (g_once_init_enter (&sound_services_device_type_id__once)) {
		GType sound_services_device_type_id;
		sound_services_device_type_id = sound_services_device_get_type_once ();
		g_once_init_leave (&sound_services_device_type_id__once, sound_services_device_type_id);
	}
	return sound_services_device_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SoundServicesDeviceProxy, sound_services_device_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (SOUND_SERVICES_TYPE_DEVICE, sound_services_device_proxy_sound_services_device_interface_init) )
static void
sound_services_device_proxy_class_init (SoundServicesDeviceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = sound_services_device_proxy_g_signal;
}

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

static void
sound_services_device_proxy_init (SoundServicesDeviceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_sound_services_device_dbus_interface_info));
}

static void
sound_services_device_proxy_cancel_pairing (SoundServicesDevice* self,
                                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "CancelPairing");
	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
sound_services_device_proxy_connect (SoundServicesDevice* self,
                                     GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "Connect");
	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
sound_services_device_proxy_connect_profile (SoundServicesDevice* self,
                                             const gchar* UUID,
                                             GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "ConnectProfile");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (UUID));
	_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
sound_services_device_proxy_disconnect (SoundServicesDevice* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "Disconnect");
	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
sound_services_device_proxy_disconnect_profile (SoundServicesDevice* self,
                                                const gchar* UUID,
                                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "DisconnectProfile");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (UUID));
	_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
sound_services_device_proxy_pair (SoundServicesDevice* self,
                                  GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Device1", "Pair");
	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 gchar**
sound_services_device_dbus_proxy_get_UUIDs (SoundServicesDevice* self,
                                            gint* result_length1)
{
	GVariant *_inner_reply;
	gchar** _result;
	gint _result_length1;
	gchar** _tmp41_;
	gint _tmp41__length;
	gint _tmp41__size;
	gint _tmp41__length1;
	GVariantIter _tmp42_;
	GVariant* _tmp43_;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "UUIDs");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("UUIDs"));
		_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_length1 = 0;
	_tmp41_ = g_new (gchar*, 5);
	_tmp41__length = 0;
	_tmp41__size = 4;
	_tmp41__length1 = 0;
	g_variant_iter_init (&_tmp42_, _inner_reply);
	for (; (_tmp43_ = g_variant_iter_next_value (&_tmp42_)) != NULL; _tmp41__length1++) {
		if (_tmp41__size == _tmp41__length) {
			_tmp41__size = 2 * _tmp41__size;
			_tmp41_ = g_renew (gchar*, _tmp41_, _tmp41__size + 1);
		}
		_tmp41_[_tmp41__length++] = g_variant_dup_string (_tmp43_, NULL);
		g_variant_unref (_tmp43_);
	}
	_result_length1 = _tmp41__length1;
	_tmp41_[_tmp41__length] = NULL;
	_result = _tmp41_;
	*result_length1 = _result_length1;
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_device_dbus_proxy_get_blocked (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Blocked");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Blocked"));
		_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) {
			gboolean _tmp44_ = FALSE;
			return _tmp44_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_device_dbus_proxy_set_blocked (SoundServicesDevice* self,
                                              gboolean value)
{
	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.Device1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Blocked"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static gboolean
sound_services_device_dbus_proxy_get_connected (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Connected");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Connected"));
		_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) {
			gboolean _tmp45_ = FALSE;
			return _tmp45_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_device_dbus_proxy_get_legacy_pairing (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "LegacyPairing");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("LegacyPairing"));
		_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) {
			gboolean _tmp46_ = FALSE;
			return _tmp46_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_device_dbus_proxy_get_paired (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Paired");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Paired"));
		_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) {
			gboolean _tmp47_ = FALSE;
			return _tmp47_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
sound_services_device_dbus_proxy_get_trusted (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Trusted");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Trusted"));
		_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) {
			gboolean _tmp48_ = FALSE;
			return _tmp48_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_device_dbus_proxy_set_trusted (SoundServicesDevice* self,
                                              gboolean value)
{
	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.Device1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Trusted"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static gint16
sound_services_device_dbus_proxy_get_RSSI (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gint16 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "RSSI");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("RSSI"));
		_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) {
			gint16 _tmp49_ = 0;
			return _tmp49_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_int16 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static char*
sound_services_device_dbus_proxy_get_adapter (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	char* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Adapter");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Adapter"));
		_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*
sound_services_device_dbus_proxy_get_address (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Address");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Address"));
		_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*
sound_services_device_dbus_proxy_get_alias (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Alias");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Alias"));
		_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
sound_services_device_dbus_proxy_set_alias (SoundServicesDevice* self,
                                            const gchar* value)
{
	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.Device1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Alias"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static gchar*
sound_services_device_dbus_proxy_get_icon (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Icon");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Icon"));
		_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*
sound_services_device_dbus_proxy_get_modalias (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Modalias");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Modalias"));
		_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*
sound_services_device_dbus_proxy_get_name (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Name");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Name"));
		_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 guint16
sound_services_device_dbus_proxy_get_appearance (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	guint16 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Appearance");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Appearance"));
		_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) {
			guint16 _tmp50_ = 0U;
			return _tmp50_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint16 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static guint32
sound_services_device_dbus_proxy_get_class (SoundServicesDevice* self)
{
	GVariant *_inner_reply;
	guint32 _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Class");
	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.Device1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Class"));
		_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) {
			guint32 _tmp51_ = 0U;
			return _tmp51_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_uint32 (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
sound_services_device_proxy_sound_services_device_interface_init (SoundServicesDeviceIface* iface)
{
	iface->cancel_pairing = sound_services_device_proxy_cancel_pairing;
	iface->connect = sound_services_device_proxy_connect;
	iface->connect_profile = sound_services_device_proxy_connect_profile;
	iface->disconnect = sound_services_device_proxy_disconnect;
	iface->disconnect_profile = sound_services_device_proxy_disconnect_profile;
	iface->pair = sound_services_device_proxy_pair;
	iface->get_UUIDs = sound_services_device_dbus_proxy_get_UUIDs;
	iface->get_blocked = sound_services_device_dbus_proxy_get_blocked;
	iface->set_blocked = sound_services_device_dbus_proxy_set_blocked;
	iface->get_connected = sound_services_device_dbus_proxy_get_connected;
	iface->get_legacy_pairing = sound_services_device_dbus_proxy_get_legacy_pairing;
	iface->get_paired = sound_services_device_dbus_proxy_get_paired;
	iface->get_trusted = sound_services_device_dbus_proxy_get_trusted;
	iface->set_trusted = sound_services_device_dbus_proxy_set_trusted;
	iface->get_RSSI = sound_services_device_dbus_proxy_get_RSSI;
	iface->get_adapter = sound_services_device_dbus_proxy_get_adapter;
	iface->get_address = sound_services_device_dbus_proxy_get_address;
	iface->get_alias = sound_services_device_dbus_proxy_get_alias;
	iface->set_alias = sound_services_device_dbus_proxy_set_alias;
	iface->get_icon = sound_services_device_dbus_proxy_get_icon;
	iface->get_modalias = sound_services_device_dbus_proxy_get_modalias;
	iface->get_name = sound_services_device_dbus_proxy_get_name;
	iface->get_appearance = sound_services_device_dbus_proxy_get_appearance;
	iface->get_class = sound_services_device_dbus_proxy_get_class;
}

static void
_dbus_sound_services_device_cancel_pairing (SoundServicesDevice* 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_);
	sound_services_device_cancel_pairing (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
_dbus_sound_services_device_connect (SoundServicesDevice* 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_);
	sound_services_device_connect (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
_dbus_sound_services_device_connect_profile (SoundServicesDevice* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* UUID = NULL;
	GVariant* _tmp52_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp52_ = g_variant_iter_next_value (&_arguments_iter);
	UUID = g_variant_dup_string (_tmp52_, NULL);
	g_variant_unref (_tmp52_);
	sound_services_device_connect_profile (self, UUID, &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);
	_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_free0 (UUID);
	;
}

static void
_dbus_sound_services_device_disconnect (SoundServicesDevice* 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_);
	sound_services_device_disconnect (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
_dbus_sound_services_device_disconnect_profile (SoundServicesDevice* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* UUID = NULL;
	GVariant* _tmp53_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp53_ = g_variant_iter_next_value (&_arguments_iter);
	UUID = g_variant_dup_string (_tmp53_, NULL);
	g_variant_unref (_tmp53_);
	sound_services_device_disconnect_profile (self, UUID, &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);
	_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_free0 (UUID);
	;
}

static void
_dbus_sound_services_device_pair (SoundServicesDevice* 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_);
	sound_services_device_pair (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
sound_services_device_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, "CancelPairing") == 0) {
		_dbus_sound_services_device_cancel_pairing (object, parameters, invocation);
	} else if (strcmp (method_name, "Connect") == 0) {
		_dbus_sound_services_device_connect (object, parameters, invocation);
	} else if (strcmp (method_name, "ConnectProfile") == 0) {
		_dbus_sound_services_device_connect_profile (object, parameters, invocation);
	} else if (strcmp (method_name, "Disconnect") == 0) {
		_dbus_sound_services_device_disconnect (object, parameters, invocation);
	} else if (strcmp (method_name, "DisconnectProfile") == 0) {
		_dbus_sound_services_device_disconnect_profile (object, parameters, invocation);
	} else if (strcmp (method_name, "Pair") == 0) {
		_dbus_sound_services_device_pair (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_sound_services_device_get_UUIDs (SoundServicesDevice* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp54_;
	GVariantBuilder _tmp55_;
	gint _tmp56_;
	result = sound_services_device_get_UUIDs (self, &result_length1);
	_tmp54_ = result;
	g_variant_builder_init (&_tmp55_, G_VARIANT_TYPE ("as"));
	for (_tmp56_ = 0; _tmp56_ < result_length1; _tmp56_++) {
		g_variant_builder_add_value (&_tmp55_, g_variant_new_string (*_tmp54_));
		_tmp54_++;
	}
	_reply = g_variant_builder_end (&_tmp55_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_blocked (SoundServicesDevice* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_device_get_blocked (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_connected (SoundServicesDevice* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_device_get_connected (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_legacy_pairing (SoundServicesDevice* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_device_get_legacy_pairing (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_paired (SoundServicesDevice* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_device_get_paired (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_trusted (SoundServicesDevice* self)
{
	gboolean result;
	GVariant* _reply;
	result = sound_services_device_get_trusted (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_RSSI (SoundServicesDevice* self)
{
	gint16 result;
	GVariant* _reply;
	result = sound_services_device_get_RSSI (self);
	_reply = g_variant_new_int16 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_adapter (SoundServicesDevice* self)
{
	char* result;
	GVariant* _reply;
	result = sound_services_device_get_adapter (self);
	_reply = g_variant_new_object_path (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_address (SoundServicesDevice* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_device_get_address (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_alias (SoundServicesDevice* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_device_get_alias (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_icon (SoundServicesDevice* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_device_get_icon (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_modalias (SoundServicesDevice* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_device_get_modalias (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_name (SoundServicesDevice* self)
{
	gchar* result;
	GVariant* _reply;
	result = sound_services_device_get_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_appearance (SoundServicesDevice* self)
{
	guint16 result;
	GVariant* _reply;
	result = sound_services_device_get_appearance (self);
	_reply = g_variant_new_uint16 (result);
	return _reply;
}

static GVariant*
_dbus_sound_services_device_get_class (SoundServicesDevice* self)
{
	guint32 result;
	GVariant* _reply;
	result = sound_services_device_get_class (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
sound_services_device_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, "UUIDs") == 0) {
		return _dbus_sound_services_device_get_UUIDs (object);
	} else if (strcmp (property_name, "Blocked") == 0) {
		return _dbus_sound_services_device_get_blocked (object);
	} else if (strcmp (property_name, "Connected") == 0) {
		return _dbus_sound_services_device_get_connected (object);
	} else if (strcmp (property_name, "LegacyPairing") == 0) {
		return _dbus_sound_services_device_get_legacy_pairing (object);
	} else if (strcmp (property_name, "Paired") == 0) {
		return _dbus_sound_services_device_get_paired (object);
	} else if (strcmp (property_name, "Trusted") == 0) {
		return _dbus_sound_services_device_get_trusted (object);
	} else if (strcmp (property_name, "RSSI") == 0) {
		return _dbus_sound_services_device_get_RSSI (object);
	} else if (strcmp (property_name, "Adapter") == 0) {
		return _dbus_sound_services_device_get_adapter (object);
	} else if (strcmp (property_name, "Address") == 0) {
		return _dbus_sound_services_device_get_address (object);
	} else if (strcmp (property_name, "Alias") == 0) {
		return _dbus_sound_services_device_get_alias (object);
	} else if (strcmp (property_name, "Icon") == 0) {
		return _dbus_sound_services_device_get_icon (object);
	} else if (strcmp (property_name, "Modalias") == 0) {
		return _dbus_sound_services_device_get_modalias (object);
	} else if (strcmp (property_name, "Name") == 0) {
		return _dbus_sound_services_device_get_name (object);
	} else if (strcmp (property_name, "Appearance") == 0) {
		return _dbus_sound_services_device_get_appearance (object);
	} else if (strcmp (property_name, "Class") == 0) {
		return _dbus_sound_services_device_get_class (object);
	}
	return NULL;
}

static void
_dbus_sound_services_device_set_blocked (SoundServicesDevice* self,
                                         GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	sound_services_device_set_blocked (self, value);
}

static void
_dbus_sound_services_device_set_trusted (SoundServicesDevice* self,
                                         GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	sound_services_device_set_trusted (self, value);
}

static void
_dbus_sound_services_device_set_alias (SoundServicesDevice* self,
                                       GVariant* _value)
{
	gchar* value = NULL;
	value = g_variant_dup_string (_value, NULL);
	sound_services_device_set_alias (self, value);
	_g_free0 (value);
}

static gboolean
sound_services_device_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];
	if (strcmp (property_name, "Blocked") == 0) {
		_dbus_sound_services_device_set_blocked (object, value);
		return TRUE;
	} else if (strcmp (property_name, "Trusted") == 0) {
		_dbus_sound_services_device_set_trusted (object, value);
		return TRUE;
	} else if (strcmp (property_name, "Alias") == 0) {
		_dbus_sound_services_device_set_alias (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
sound_services_device_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 *) (&_sound_services_device_dbus_interface_info), &_sound_services_device_dbus_interface_vtable, data, _sound_services_device_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

