/* Adapter.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from Adapter.vala, do not modify */

/*
 * This file is part of budgie-desktop
 *
 * Copyright Budgie Desktop Developers, elementary LLC
 *
 * 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.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BLUETOOTH_TYPE_ADAPTER (bluetooth_adapter_get_type ())
#define BLUETOOTH_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BLUETOOTH_TYPE_ADAPTER, BluetoothAdapter))
#define BLUETOOTH_IS_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BLUETOOTH_TYPE_ADAPTER))
#define BLUETOOTH_ADAPTER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BLUETOOTH_TYPE_ADAPTER, BluetoothAdapterIface))

typedef struct _BluetoothAdapter BluetoothAdapter;
typedef struct _BluetoothAdapterIface BluetoothAdapterIface;

#define BLUETOOTH_TYPE_ADAPTER_PROXY (bluetooth_adapter_proxy_get_type ())
typedef GDBusProxy BluetoothAdapterProxy;
typedef GDBusProxyClass BluetoothAdapterProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _BluetoothAdapterStartDiscoveryReadyData BluetoothAdapterStartDiscoveryReadyData;
typedef struct _BluetoothAdapterStopDiscoveryReadyData BluetoothAdapterStopDiscoveryReadyData;

struct _BluetoothAdapterIface {
	GTypeInterface parent_iface;
	void (*remove_device) (BluetoothAdapter* self, const char* device, GError** error);
	void (*set_discovery_filter) (BluetoothAdapter* self, GHashTable* properties, GError** error);
	void (*start_discovery) (BluetoothAdapter* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*start_discovery_finish) (BluetoothAdapter* self, GAsyncResult* _res_, GError** error);
	void (*stop_discovery) (BluetoothAdapter* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*stop_discovery_finish) (BluetoothAdapter* self, GAsyncResult* _res_, GError** error);
	gchar** (*get_UUIDs) (BluetoothAdapter* self, gint* result_length1);
	gboolean (*get_discoverable) (BluetoothAdapter* self);
	void (*set_discoverable) (BluetoothAdapter* self, gboolean value);
	gboolean (*get_discovering) (BluetoothAdapter* self);
	gboolean (*get_pairable) (BluetoothAdapter* self);
	void (*set_pairable) (BluetoothAdapter* self, gboolean value);
	gboolean (*get_powered) (BluetoothAdapter* self);
	void (*set_powered) (BluetoothAdapter* self, gboolean value);
	gchar* (*get_address) (BluetoothAdapter* self);
	gchar* (*get_alias) (BluetoothAdapter* self);
	void (*set_alias) (BluetoothAdapter* self, const gchar* value);
	gchar* (*get_modalias) (BluetoothAdapter* self);
	gchar* (*get_name) (BluetoothAdapter* self);
	guint (*get_class) (BluetoothAdapter* self);
	guint (*get_discoverable_timeout) (BluetoothAdapter* self);
	guint (*get_pairable_timeout) (BluetoothAdapter* self);
};

struct _BluetoothAdapterStartDiscoveryReadyData {
	GDBusMethodInvocation* _invocation_;
};

struct _BluetoothAdapterStopDiscoveryReadyData {
	GDBusMethodInvocation* _invocation_;
};

VALA_EXTERN GType bluetooth_adapter_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint bluetooth_adapter_register_object (void* object,
                                         GDBusConnection* connection,
                                         const gchar* path,
                                         GError** error);
VALA_EXTERN GType bluetooth_adapter_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BluetoothAdapter, g_object_unref)
VALA_EXTERN void bluetooth_adapter_remove_device (BluetoothAdapter* self,
                                      const char* device,
                                      GError** error);
VALA_EXTERN void bluetooth_adapter_set_discovery_filter (BluetoothAdapter* self,
                                             GHashTable* properties,
                                             GError** error);
VALA_EXTERN void bluetooth_adapter_start_discovery (BluetoothAdapter* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN void bluetooth_adapter_start_discovery_finish (BluetoothAdapter* self,
                                               GAsyncResult* _res_,
                                               GError** error);
VALA_EXTERN void bluetooth_adapter_stop_discovery (BluetoothAdapter* self,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
VALA_EXTERN void bluetooth_adapter_stop_discovery_finish (BluetoothAdapter* self,
                                              GAsyncResult* _res_,
                                              GError** error);
VALA_EXTERN gchar** bluetooth_adapter_get_UUIDs (BluetoothAdapter* self,
                                     gint* result_length1);
VALA_EXTERN gboolean bluetooth_adapter_get_discoverable (BluetoothAdapter* self);
VALA_EXTERN void bluetooth_adapter_set_discoverable (BluetoothAdapter* self,
                                         gboolean value);
VALA_EXTERN gboolean bluetooth_adapter_get_discovering (BluetoothAdapter* self);
VALA_EXTERN gboolean bluetooth_adapter_get_pairable (BluetoothAdapter* self);
VALA_EXTERN void bluetooth_adapter_set_pairable (BluetoothAdapter* self,
                                     gboolean value);
VALA_EXTERN gboolean bluetooth_adapter_get_powered (BluetoothAdapter* self);
VALA_EXTERN void bluetooth_adapter_set_powered (BluetoothAdapter* self,
                                    gboolean value);
VALA_EXTERN gchar* bluetooth_adapter_get_address (BluetoothAdapter* self);
VALA_EXTERN gchar* bluetooth_adapter_get_alias (BluetoothAdapter* self);
VALA_EXTERN void bluetooth_adapter_set_alias (BluetoothAdapter* self,
                                  const gchar* value);
VALA_EXTERN gchar* bluetooth_adapter_get_modalias (BluetoothAdapter* self);
VALA_EXTERN gchar* bluetooth_adapter_get_name (BluetoothAdapter* self);
VALA_EXTERN guint bluetooth_adapter_get_class (BluetoothAdapter* self);
VALA_EXTERN guint bluetooth_adapter_get_discoverable_timeout (BluetoothAdapter* self);
VALA_EXTERN guint bluetooth_adapter_get_pairable_timeout (BluetoothAdapter* self);
static GType bluetooth_adapter_get_type_once (void);
static void bluetooth_adapter_proxy_g_signal (GDBusProxy* proxy,
                                       const gchar* sender_name,
                                       const gchar* signal_name,
                                       GVariant* parameters);
static void bluetooth_adapter_proxy_remove_device (BluetoothAdapter* self,
                                            const char* device,
                                            GError** error);
static void bluetooth_adapter_proxy_set_discovery_filter (BluetoothAdapter* self,
                                                   GHashTable* properties,
                                                   GError** error);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void bluetooth_adapter_proxy_start_discovery_async (BluetoothAdapter* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void bluetooth_adapter_proxy_start_discovery_finish (BluetoothAdapter* self,
                                                     GAsyncResult* _res_,
                                                     GError** error);
static void bluetooth_adapter_proxy_stop_discovery_async (BluetoothAdapter* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static void bluetooth_adapter_proxy_stop_discovery_finish (BluetoothAdapter* self,
                                                    GAsyncResult* _res_,
                                                    GError** error);
static gchar** bluetooth_adapter_dbus_proxy_get_UUIDs (BluetoothAdapter* self,
                                                gint* result_length1);
static gboolean bluetooth_adapter_dbus_proxy_get_discoverable (BluetoothAdapter* self);
static void bluetooth_adapter_dbus_proxy_set_discoverable (BluetoothAdapter* self,
                                                    gboolean value);
static gboolean bluetooth_adapter_dbus_proxy_get_discovering (BluetoothAdapter* self);
static gboolean bluetooth_adapter_dbus_proxy_get_pairable (BluetoothAdapter* self);
static void bluetooth_adapter_dbus_proxy_set_pairable (BluetoothAdapter* self,
                                                gboolean value);
static gboolean bluetooth_adapter_dbus_proxy_get_powered (BluetoothAdapter* self);
static void bluetooth_adapter_dbus_proxy_set_powered (BluetoothAdapter* self,
                                               gboolean value);
static gchar* bluetooth_adapter_dbus_proxy_get_address (BluetoothAdapter* self);
static gchar* bluetooth_adapter_dbus_proxy_get_alias (BluetoothAdapter* self);
static void bluetooth_adapter_dbus_proxy_set_alias (BluetoothAdapter* self,
                                             const gchar* value);
static gchar* bluetooth_adapter_dbus_proxy_get_modalias (BluetoothAdapter* self);
static gchar* bluetooth_adapter_dbus_proxy_get_name (BluetoothAdapter* self);
static guint bluetooth_adapter_dbus_proxy_get_class (BluetoothAdapter* self);
static guint bluetooth_adapter_dbus_proxy_get_discoverable_timeout (BluetoothAdapter* self);
static guint bluetooth_adapter_dbus_proxy_get_pairable_timeout (BluetoothAdapter* self);
static void bluetooth_adapter_proxy_bluetooth_adapter_interface_init (BluetoothAdapterIface* iface);
static void _dbus_bluetooth_adapter_remove_device (BluetoothAdapter* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void _dbus_bluetooth_adapter_set_discovery_filter (BluetoothAdapter* self,
                                                   GVariant* _parameters_,
                                                   GDBusMethodInvocation* invocation);
static void _dbus_bluetooth_adapter_start_discovery (BluetoothAdapter* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_bluetooth_adapter_start_discovery_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_);
static void _dbus_bluetooth_adapter_stop_discovery (BluetoothAdapter* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_bluetooth_adapter_stop_discovery_ready (GObject * source_object,
                                                   GAsyncResult * _res_,
                                                   gpointer _user_data_);
static void bluetooth_adapter_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_adapter_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_adapter_get_UUIDs (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_discoverable (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_discovering (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_pairable (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_powered (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_address (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_alias (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_modalias (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_name (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_class (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_discoverable_timeout (BluetoothAdapter* self);
static GVariant* _dbus_bluetooth_adapter_get_pairable_timeout (BluetoothAdapter* self);
static gboolean bluetooth_adapter_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_bluetooth_adapter_set_discoverable (BluetoothAdapter* self,
                                               GVariant* _value);
static void _dbus_bluetooth_adapter_set_pairable (BluetoothAdapter* self,
                                           GVariant* _value);
static void _dbus_bluetooth_adapter_set_powered (BluetoothAdapter* self,
                                          GVariant* _value);
static void _dbus_bluetooth_adapter_set_alias (BluetoothAdapter* self,
                                        GVariant* _value);
static void _bluetooth_adapter_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 const GDBusArgInfo _bluetooth_adapter_dbus_arg_info_remove_device_device = {-1, "device", "o", NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_remove_device_in[] = {&_bluetooth_adapter_dbus_arg_info_remove_device_device, NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_remove_device_out[] = {NULL};
static const GDBusMethodInfo _bluetooth_adapter_dbus_method_info_remove_device = {-1, "RemoveDevice", (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_remove_device_in), (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_remove_device_out), NULL};
static const GDBusArgInfo _bluetooth_adapter_dbus_arg_info_set_discovery_filter_properties = {-1, "properties", "a{sv}", NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_set_discovery_filter_in[] = {&_bluetooth_adapter_dbus_arg_info_set_discovery_filter_properties, NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_set_discovery_filter_out[] = {NULL};
static const GDBusMethodInfo _bluetooth_adapter_dbus_method_info_set_discovery_filter = {-1, "SetDiscoveryFilter", (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_set_discovery_filter_in), (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_set_discovery_filter_out), NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_start_discovery_in[] = {NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_start_discovery_out[] = {NULL};
static const GDBusMethodInfo _bluetooth_adapter_dbus_method_info_start_discovery = {-1, "StartDiscovery", (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_start_discovery_in), (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_start_discovery_out), NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_stop_discovery_in[] = {NULL};
static const GDBusArgInfo * const _bluetooth_adapter_dbus_arg_info_stop_discovery_out[] = {NULL};
static const GDBusMethodInfo _bluetooth_adapter_dbus_method_info_stop_discovery = {-1, "StopDiscovery", (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_stop_discovery_in), (GDBusArgInfo **) (&_bluetooth_adapter_dbus_arg_info_stop_discovery_out), NULL};
static const GDBusMethodInfo * const _bluetooth_adapter_dbus_method_info[] = {&_bluetooth_adapter_dbus_method_info_remove_device, &_bluetooth_adapter_dbus_method_info_set_discovery_filter, &_bluetooth_adapter_dbus_method_info_start_discovery, &_bluetooth_adapter_dbus_method_info_stop_discovery, NULL};
static const GDBusSignalInfo * const _bluetooth_adapter_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_UUIDs = {-1, "UUIDs", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_discoverable = {-1, "Discoverable", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_discovering = {-1, "Discovering", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_pairable = {-1, "Pairable", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_powered = {-1, "Powered", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_address = {-1, "Address", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_alias = {-1, "Alias", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_modalias = {-1, "Modalias", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_name = {-1, "Name", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_class = {-1, "Class", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_discoverable_timeout = {-1, "DiscoverableTimeout", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _bluetooth_adapter_dbus_property_info_pairable_timeout = {-1, "PairableTimeout", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _bluetooth_adapter_dbus_property_info[] = {&_bluetooth_adapter_dbus_property_info_UUIDs, &_bluetooth_adapter_dbus_property_info_discoverable, &_bluetooth_adapter_dbus_property_info_discovering, &_bluetooth_adapter_dbus_property_info_pairable, &_bluetooth_adapter_dbus_property_info_powered, &_bluetooth_adapter_dbus_property_info_address, &_bluetooth_adapter_dbus_property_info_alias, &_bluetooth_adapter_dbus_property_info_modalias, &_bluetooth_adapter_dbus_property_info_name, &_bluetooth_adapter_dbus_property_info_class, &_bluetooth_adapter_dbus_property_info_discoverable_timeout, &_bluetooth_adapter_dbus_property_info_pairable_timeout, NULL};
static const GDBusInterfaceInfo _bluetooth_adapter_dbus_interface_info = {-1, "org.bluez.Adapter1", (GDBusMethodInfo **) (&_bluetooth_adapter_dbus_method_info), (GDBusSignalInfo **) (&_bluetooth_adapter_dbus_signal_info), (GDBusPropertyInfo **) (&_bluetooth_adapter_dbus_property_info), NULL};
static const GDBusInterfaceVTable _bluetooth_adapter_dbus_interface_vtable = {bluetooth_adapter_dbus_interface_method_call, bluetooth_adapter_dbus_interface_get_property, bluetooth_adapter_dbus_interface_set_property};

void
bluetooth_adapter_remove_device (BluetoothAdapter* self,
                                 const char* device,
                                 GError** error)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->remove_device) {
		_iface_->remove_device (self, device, error);
	}
}

void
bluetooth_adapter_set_discovery_filter (BluetoothAdapter* self,
                                        GHashTable* properties,
                                        GError** error)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->set_discovery_filter) {
		_iface_->set_discovery_filter (self, properties, error);
	}
}

void
bluetooth_adapter_start_discovery (BluetoothAdapter* self,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	BluetoothAdapterIface* _iface_;
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->start_discovery) {
		_iface_->start_discovery (self, _callback_, _user_data_);
	}
}

void
bluetooth_adapter_start_discovery_finish (BluetoothAdapter* self,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	BluetoothAdapterIface* _iface_;
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->start_discovery_finish) {
		_iface_->start_discovery_finish (self, _res_, error);
	}
}

void
bluetooth_adapter_stop_discovery (BluetoothAdapter* self,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	BluetoothAdapterIface* _iface_;
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->stop_discovery) {
		_iface_->stop_discovery (self, _callback_, _user_data_);
	}
}

void
bluetooth_adapter_stop_discovery_finish (BluetoothAdapter* self,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	BluetoothAdapterIface* _iface_;
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->stop_discovery_finish) {
		_iface_->stop_discovery_finish (self, _res_, error);
	}
}

gchar**
bluetooth_adapter_get_UUIDs (BluetoothAdapter* self,
                             gint* result_length1)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_UUIDs) {
		return _iface_->get_UUIDs (self, result_length1);
	}
	return NULL;
}

gboolean
bluetooth_adapter_get_discoverable (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_discoverable) {
		return _iface_->get_discoverable (self);
	}
	return FALSE;
}

void
bluetooth_adapter_set_discoverable (BluetoothAdapter* self,
                                    gboolean value)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->set_discoverable) {
		_iface_->set_discoverable (self, value);
	}
}

gboolean
bluetooth_adapter_get_discovering (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_discovering) {
		return _iface_->get_discovering (self);
	}
	return FALSE;
}

gboolean
bluetooth_adapter_get_pairable (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_pairable) {
		return _iface_->get_pairable (self);
	}
	return FALSE;
}

void
bluetooth_adapter_set_pairable (BluetoothAdapter* self,
                                gboolean value)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->set_pairable) {
		_iface_->set_pairable (self, value);
	}
}

gboolean
bluetooth_adapter_get_powered (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_powered) {
		return _iface_->get_powered (self);
	}
	return FALSE;
}

void
bluetooth_adapter_set_powered (BluetoothAdapter* self,
                               gboolean value)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->set_powered) {
		_iface_->set_powered (self, value);
	}
}

gchar*
bluetooth_adapter_get_address (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_address) {
		return _iface_->get_address (self);
	}
	return NULL;
}

gchar*
bluetooth_adapter_get_alias (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_alias) {
		return _iface_->get_alias (self);
	}
	return NULL;
}

void
bluetooth_adapter_set_alias (BluetoothAdapter* self,
                             const gchar* value)
{
	BluetoothAdapterIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->set_alias) {
		_iface_->set_alias (self, value);
	}
}

gchar*
bluetooth_adapter_get_modalias (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_modalias) {
		return _iface_->get_modalias (self);
	}
	return NULL;
}

gchar*
bluetooth_adapter_get_name (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

guint
bluetooth_adapter_get_class (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_class) {
		return _iface_->get_class (self);
	}
	return 0U;
}

guint
bluetooth_adapter_get_discoverable_timeout (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_discoverable_timeout) {
		return _iface_->get_discoverable_timeout (self);
	}
	return 0U;
}

guint
bluetooth_adapter_get_pairable_timeout (BluetoothAdapter* self)
{
	BluetoothAdapterIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = BLUETOOTH_ADAPTER_GET_INTERFACE (self);
	if (_iface_->get_pairable_timeout) {
		return _iface_->get_pairable_timeout (self);
	}
	return 0U;
}

static void
bluetooth_adapter_default_init (BluetoothAdapterIface * iface,
                                gpointer iface_data)
{
}

 G_GNUC_NO_INLINE static GType
bluetooth_adapter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BluetoothAdapterIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bluetooth_adapter_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType bluetooth_adapter_type_id;
	bluetooth_adapter_type_id = g_type_register_static (G_TYPE_INTERFACE, "BluetoothAdapter", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (bluetooth_adapter_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (bluetooth_adapter_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) bluetooth_adapter_proxy_get_type);
	g_type_set_qdata (bluetooth_adapter_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.bluez.Adapter1");
	g_type_set_qdata (bluetooth_adapter_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_bluetooth_adapter_dbus_interface_info));
	g_type_set_qdata (bluetooth_adapter_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) bluetooth_adapter_register_object);
	return bluetooth_adapter_type_id;
}

GType
bluetooth_adapter_get_type (void)
{
	static volatile gsize bluetooth_adapter_type_id__once = 0;
	if (g_once_init_enter (&bluetooth_adapter_type_id__once)) {
		GType bluetooth_adapter_type_id;
		bluetooth_adapter_type_id = bluetooth_adapter_get_type_once ();
		g_once_init_leave (&bluetooth_adapter_type_id__once, bluetooth_adapter_type_id);
	}
	return bluetooth_adapter_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BluetoothAdapterProxy, bluetooth_adapter_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BLUETOOTH_TYPE_ADAPTER, bluetooth_adapter_proxy_bluetooth_adapter_interface_init) )
static void
bluetooth_adapter_proxy_class_init (BluetoothAdapterProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = bluetooth_adapter_proxy_g_signal;
}

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

static void
bluetooth_adapter_proxy_init (BluetoothAdapterProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_bluetooth_adapter_dbus_interface_info));
}

static void
bluetooth_adapter_proxy_remove_device (BluetoothAdapter* self,
                                       const char* device,
                                       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.Adapter1", "RemoveDevice");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_object_path (device));
	_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
bluetooth_adapter_proxy_set_discovery_filter (BluetoothAdapter* self,
                                              GHashTable* properties,
                                              GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GVariantBuilder _tmp0_;
	GHashTableIter _tmp1_;
	gpointer _tmp2_;
	gpointer _tmp3_;
	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.Adapter1", "SetDiscoveryFilter");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_hash_table_iter_init (&_tmp1_, properties);
	g_variant_builder_init (&_tmp0_, G_VARIANT_TYPE ("a{sv}"));
	while (g_hash_table_iter_next (&_tmp1_, &_tmp2_, &_tmp3_)) {
		gchar* _key;
		GVariant* _value;
		_key = (gchar*) _tmp2_;
		_value = (GVariant*) _tmp3_;
		g_variant_builder_add (&_tmp0_, "{?*}", g_variant_new_string (_key), g_variant_new_variant (_value));
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp0_));
	_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
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
bluetooth_adapter_proxy_start_discovery_async (BluetoothAdapter* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Adapter1", "StartDiscovery");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
bluetooth_adapter_proxy_start_discovery_finish (BluetoothAdapter* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
bluetooth_adapter_proxy_stop_discovery_async (BluetoothAdapter* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.bluez.Adapter1", "StopDiscovery");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
bluetooth_adapter_proxy_stop_discovery_finish (BluetoothAdapter* self,
                                               GAsyncResult* _res_,
                                               GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gchar**
bluetooth_adapter_dbus_proxy_get_UUIDs (BluetoothAdapter* self,
                                        gint* result_length1)
{
	GVariant *_inner_reply;
	gchar** _result;
	gint _result_length1;
	gchar** _tmp4_;
	gint _tmp4__length;
	gint _tmp4__size;
	gint _tmp4__length1;
	GVariantIter _tmp5_;
	GVariant* _tmp6_;
	_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.Adapter1"));
		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;
	_tmp4_ = g_new (gchar*, 5);
	_tmp4__length = 0;
	_tmp4__size = 4;
	_tmp4__length1 = 0;
	g_variant_iter_init (&_tmp5_, _inner_reply);
	for (; (_tmp6_ = g_variant_iter_next_value (&_tmp5_)) != NULL; _tmp4__length1++) {
		if (_tmp4__size == _tmp4__length) {
			_tmp4__size = 2 * _tmp4__size;
			_tmp4_ = g_renew (gchar*, _tmp4_, _tmp4__size + 1);
		}
		_tmp4_[_tmp4__length++] = g_variant_dup_string (_tmp6_, NULL);
		g_variant_unref (_tmp6_);
	}
	_result_length1 = _tmp4__length1;
	_tmp4_[_tmp4__length] = NULL;
	_result = _tmp4_;
	*result_length1 = _result_length1;
	g_variant_unref (_inner_reply);
	return _result;
}

static gboolean
bluetooth_adapter_dbus_proxy_get_discoverable (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Discoverable");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Discoverable"));
		_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 _tmp7_ = FALSE;
			return _tmp7_;
		}
		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
bluetooth_adapter_dbus_proxy_set_discoverable (BluetoothAdapter* 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.Adapter1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Discoverable"));
	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
bluetooth_adapter_dbus_proxy_get_discovering (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Discovering");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Discovering"));
		_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 _tmp8_ = FALSE;
			return _tmp8_;
		}
		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
bluetooth_adapter_dbus_proxy_get_pairable (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Pairable");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Pairable"));
		_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 _tmp9_ = FALSE;
			return _tmp9_;
		}
		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
bluetooth_adapter_dbus_proxy_set_pairable (BluetoothAdapter* 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.Adapter1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Pairable"));
	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
bluetooth_adapter_dbus_proxy_get_powered (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Powered");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Powered"));
		_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 _tmp10_ = FALSE;
			return _tmp10_;
		}
		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
bluetooth_adapter_dbus_proxy_set_powered (BluetoothAdapter* 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.Adapter1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Powered"));
	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 gchar*
bluetooth_adapter_dbus_proxy_get_address (BluetoothAdapter* 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.Adapter1"));
		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*
bluetooth_adapter_dbus_proxy_get_alias (BluetoothAdapter* 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.Adapter1"));
		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
bluetooth_adapter_dbus_proxy_set_alias (BluetoothAdapter* 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.Adapter1"));
	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*
bluetooth_adapter_dbus_proxy_get_modalias (BluetoothAdapter* 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.Adapter1"));
		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*
bluetooth_adapter_dbus_proxy_get_name (BluetoothAdapter* 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.Adapter1"));
		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 guint
bluetooth_adapter_dbus_proxy_get_class (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	guint _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.Adapter1"));
		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) {
			guint _tmp11_ = 0U;
			return _tmp11_;
		}
		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 guint
bluetooth_adapter_dbus_proxy_get_discoverable_timeout (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	guint _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DiscoverableTimeout");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DiscoverableTimeout"));
		_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) {
			guint _tmp12_ = 0U;
			return _tmp12_;
		}
		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 guint
bluetooth_adapter_dbus_proxy_get_pairable_timeout (BluetoothAdapter* self)
{
	GVariant *_inner_reply;
	guint _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "PairableTimeout");
	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.Adapter1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("PairableTimeout"));
		_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) {
			guint _tmp13_ = 0U;
			return _tmp13_;
		}
		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
bluetooth_adapter_proxy_bluetooth_adapter_interface_init (BluetoothAdapterIface* iface)
{
	iface->remove_device = bluetooth_adapter_proxy_remove_device;
	iface->set_discovery_filter = bluetooth_adapter_proxy_set_discovery_filter;
	iface->start_discovery = bluetooth_adapter_proxy_start_discovery_async;
	iface->start_discovery_finish = bluetooth_adapter_proxy_start_discovery_finish;
	iface->stop_discovery = bluetooth_adapter_proxy_stop_discovery_async;
	iface->stop_discovery_finish = bluetooth_adapter_proxy_stop_discovery_finish;
	iface->get_UUIDs = bluetooth_adapter_dbus_proxy_get_UUIDs;
	iface->get_discoverable = bluetooth_adapter_dbus_proxy_get_discoverable;
	iface->set_discoverable = bluetooth_adapter_dbus_proxy_set_discoverable;
	iface->get_discovering = bluetooth_adapter_dbus_proxy_get_discovering;
	iface->get_pairable = bluetooth_adapter_dbus_proxy_get_pairable;
	iface->set_pairable = bluetooth_adapter_dbus_proxy_set_pairable;
	iface->get_powered = bluetooth_adapter_dbus_proxy_get_powered;
	iface->set_powered = bluetooth_adapter_dbus_proxy_set_powered;
	iface->get_address = bluetooth_adapter_dbus_proxy_get_address;
	iface->get_alias = bluetooth_adapter_dbus_proxy_get_alias;
	iface->set_alias = bluetooth_adapter_dbus_proxy_set_alias;
	iface->get_modalias = bluetooth_adapter_dbus_proxy_get_modalias;
	iface->get_name = bluetooth_adapter_dbus_proxy_get_name;
	iface->get_class = bluetooth_adapter_dbus_proxy_get_class;
	iface->get_discoverable_timeout = bluetooth_adapter_dbus_proxy_get_discoverable_timeout;
	iface->get_pairable_timeout = bluetooth_adapter_dbus_proxy_get_pairable_timeout;
}

static void
_dbus_bluetooth_adapter_remove_device (BluetoothAdapter* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	char* device = NULL;
	GVariant* _tmp14_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	device = g_variant_dup_string (_tmp14_, NULL);
	g_variant_unref (_tmp14_);
	bluetooth_adapter_remove_device (self, device, &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 (device);
	;
}

static void
_dbus_bluetooth_adapter_set_discovery_filter (BluetoothAdapter* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GHashTable* properties = NULL;
	GVariant* _tmp15_;
	GHashTable* _tmp16_;
	GVariantIter _tmp17_;
	GVariant* _tmp18_;
	GVariant* _tmp19_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp16_ = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref);
	g_variant_iter_init (&_tmp17_, _tmp15_);
	while (g_variant_iter_loop (&_tmp17_, "{?*}", &_tmp18_, &_tmp19_)) {
		g_hash_table_insert (_tmp16_, g_variant_dup_string (_tmp18_, NULL), g_variant_get_variant (_tmp19_));
	}
	properties = _tmp16_;
	g_variant_unref (_tmp15_);
	bluetooth_adapter_set_discovery_filter (self, properties, &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_hash_table_unref0 (properties);
	;
}

static void
_dbus_bluetooth_adapter_start_discovery (BluetoothAdapter* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	BluetoothAdapterStartDiscoveryReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (BluetoothAdapterStartDiscoveryReadyData);
	_ready_data->_invocation_ = invocation;
	bluetooth_adapter_start_discovery (self, (GAsyncReadyCallback) _dbus_bluetooth_adapter_start_discovery_ready, _ready_data);
}

static void
_dbus_bluetooth_adapter_start_discovery_ready (GObject * source_object,
                                               GAsyncResult * _res_,
                                               gpointer _user_data_)
{
	BluetoothAdapterStartDiscoveryReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	bluetooth_adapter_start_discovery_finish ((BluetoothAdapter*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_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_slice_free (BluetoothAdapterStartDiscoveryReadyData, _ready_data);
}

static void
_dbus_bluetooth_adapter_stop_discovery (BluetoothAdapter* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	BluetoothAdapterStopDiscoveryReadyData* _ready_data;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (BluetoothAdapterStopDiscoveryReadyData);
	_ready_data->_invocation_ = invocation;
	bluetooth_adapter_stop_discovery (self, (GAsyncReadyCallback) _dbus_bluetooth_adapter_stop_discovery_ready, _ready_data);
}

static void
_dbus_bluetooth_adapter_stop_discovery_ready (GObject * source_object,
                                              GAsyncResult * _res_,
                                              gpointer _user_data_)
{
	BluetoothAdapterStopDiscoveryReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	bluetooth_adapter_stop_discovery_finish ((BluetoothAdapter*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_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_slice_free (BluetoothAdapterStopDiscoveryReadyData, _ready_data);
}

static void
bluetooth_adapter_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, "RemoveDevice") == 0) {
		_dbus_bluetooth_adapter_remove_device (object, parameters, invocation);
	} else if (strcmp (method_name, "SetDiscoveryFilter") == 0) {
		_dbus_bluetooth_adapter_set_discovery_filter (object, parameters, invocation);
	} else if (strcmp (method_name, "StartDiscovery") == 0) {
		_dbus_bluetooth_adapter_start_discovery (object, parameters, invocation);
	} else if (strcmp (method_name, "StopDiscovery") == 0) {
		_dbus_bluetooth_adapter_stop_discovery (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_bluetooth_adapter_get_UUIDs (BluetoothAdapter* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp20_;
	GVariantBuilder _tmp21_;
	gint _tmp22_;
	result = bluetooth_adapter_get_UUIDs (self, &result_length1);
	_tmp20_ = result;
	g_variant_builder_init (&_tmp21_, G_VARIANT_TYPE ("as"));
	for (_tmp22_ = 0; _tmp22_ < result_length1; _tmp22_++) {
		g_variant_builder_add_value (&_tmp21_, g_variant_new_string (*_tmp20_));
		_tmp20_++;
	}
	_reply = g_variant_builder_end (&_tmp21_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_discoverable (BluetoothAdapter* self)
{
	gboolean result;
	GVariant* _reply;
	result = bluetooth_adapter_get_discoverable (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_discovering (BluetoothAdapter* self)
{
	gboolean result;
	GVariant* _reply;
	result = bluetooth_adapter_get_discovering (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_pairable (BluetoothAdapter* self)
{
	gboolean result;
	GVariant* _reply;
	result = bluetooth_adapter_get_pairable (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_powered (BluetoothAdapter* self)
{
	gboolean result;
	GVariant* _reply;
	result = bluetooth_adapter_get_powered (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_address (BluetoothAdapter* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_adapter_get_address (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_alias (BluetoothAdapter* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_adapter_get_alias (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_modalias (BluetoothAdapter* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_adapter_get_modalias (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_name (BluetoothAdapter* self)
{
	gchar* result;
	GVariant* _reply;
	result = bluetooth_adapter_get_name (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_class (BluetoothAdapter* self)
{
	guint result;
	GVariant* _reply;
	result = bluetooth_adapter_get_class (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_discoverable_timeout (BluetoothAdapter* self)
{
	guint result;
	GVariant* _reply;
	result = bluetooth_adapter_get_discoverable_timeout (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
_dbus_bluetooth_adapter_get_pairable_timeout (BluetoothAdapter* self)
{
	guint result;
	GVariant* _reply;
	result = bluetooth_adapter_get_pairable_timeout (self);
	_reply = g_variant_new_uint32 (result);
	return _reply;
}

static GVariant*
bluetooth_adapter_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_bluetooth_adapter_get_UUIDs (object);
	} else if (strcmp (property_name, "Discoverable") == 0) {
		return _dbus_bluetooth_adapter_get_discoverable (object);
	} else if (strcmp (property_name, "Discovering") == 0) {
		return _dbus_bluetooth_adapter_get_discovering (object);
	} else if (strcmp (property_name, "Pairable") == 0) {
		return _dbus_bluetooth_adapter_get_pairable (object);
	} else if (strcmp (property_name, "Powered") == 0) {
		return _dbus_bluetooth_adapter_get_powered (object);
	} else if (strcmp (property_name, "Address") == 0) {
		return _dbus_bluetooth_adapter_get_address (object);
	} else if (strcmp (property_name, "Alias") == 0) {
		return _dbus_bluetooth_adapter_get_alias (object);
	} else if (strcmp (property_name, "Modalias") == 0) {
		return _dbus_bluetooth_adapter_get_modalias (object);
	} else if (strcmp (property_name, "Name") == 0) {
		return _dbus_bluetooth_adapter_get_name (object);
	} else if (strcmp (property_name, "Class") == 0) {
		return _dbus_bluetooth_adapter_get_class (object);
	} else if (strcmp (property_name, "DiscoverableTimeout") == 0) {
		return _dbus_bluetooth_adapter_get_discoverable_timeout (object);
	} else if (strcmp (property_name, "PairableTimeout") == 0) {
		return _dbus_bluetooth_adapter_get_pairable_timeout (object);
	}
	return NULL;
}

static void
_dbus_bluetooth_adapter_set_discoverable (BluetoothAdapter* self,
                                          GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	bluetooth_adapter_set_discoverable (self, value);
}

static void
_dbus_bluetooth_adapter_set_pairable (BluetoothAdapter* self,
                                      GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	bluetooth_adapter_set_pairable (self, value);
}

static void
_dbus_bluetooth_adapter_set_powered (BluetoothAdapter* self,
                                     GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	bluetooth_adapter_set_powered (self, value);
}

static void
_dbus_bluetooth_adapter_set_alias (BluetoothAdapter* self,
                                   GVariant* _value)
{
	gchar* value = NULL;
	value = g_variant_dup_string (_value, NULL);
	bluetooth_adapter_set_alias (self, value);
	_g_free0 (value);
}

static gboolean
bluetooth_adapter_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, "Discoverable") == 0) {
		_dbus_bluetooth_adapter_set_discoverable (object, value);
		return TRUE;
	} else if (strcmp (property_name, "Pairable") == 0) {
		_dbus_bluetooth_adapter_set_pairable (object, value);
		return TRUE;
	} else if (strcmp (property_name, "Powered") == 0) {
		_dbus_bluetooth_adapter_set_powered (object, value);
		return TRUE;
	} else if (strcmp (property_name, "Alias") == 0) {
		_dbus_bluetooth_adapter_set_alias (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
bluetooth_adapter_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_adapter_dbus_interface_info), &_bluetooth_adapter_dbus_interface_vtable, data, _bluetooth_adapter_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

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

