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

/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* SPDX-FileCopyrightText: 2015-2025 elementary, Inc. (https://elementary.io)
*/

#include "bluetooth.h"
#include <glib.h>
#include <granite-7.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <wingpanel-9.h>
#include <gio/gio.h>
#include <gee.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

enum  {
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_0_PROPERTY,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_NUM_PROPERTIES
};
static GParamSpec* bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_DEVICE_REQUESTED_SIGNAL,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_DISCOVERY_REQUESTED_SIGNAL,
	BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_NUM_SIGNALS
};
static guint bluetooth_indicator_widgets_popover_widget_signals[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_NUM_SIGNALS] = {0};

struct _BluetoothIndicatorWidgetsPopoverWidgetPrivate {
	BluetoothIndicatorServicesObjectManager* _object_manager;
	BluetoothIndicatorServicesObexManager* _obex_manager;
	gboolean _is_in_session;
	GraniteSwitchModelButton* main_switch;
	GtkListBox* devices_list;
	GtkRevealer* revealer;
};

static gint BluetoothIndicatorWidgetsPopoverWidget_private_offset;
static gpointer bluetooth_indicator_widgets_popover_widget_parent_class = NULL;

static gint bluetooth_indicator_widgets_popover_widget_compare_rows (GtkListBoxRow* row1,
                                                              GtkListBoxRow* row2,
                                                              BluetoothIndicatorWidgetsPopoverWidget* self);
static void bluetooth_indicator_widgets_popover_widget_update_ui_state (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                                 gboolean state);
static void bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (BluetoothIndicatorWidgetsPopoverWidget* self);
static void bluetooth_indicator_widgets_popover_widget_add_device (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                            BluetoothIndicatorServicesDevice* device);
static void __lambda22_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                  BluetoothIndicatorServicesDevice* device_service);
static void ___lambda22__bluetooth_indicator_widgets_device_show_device (BluetoothIndicatorWidgetsDevice* _sender,
                                                                  BluetoothIndicatorServicesDevice* device,
                                                                  gpointer self);
static void bluetooth_indicator_widgets_popover_widget_remove_device (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                               BluetoothIndicatorServicesDevice* device);
static GObject * bluetooth_indicator_widgets_popover_widget_constructor (GType type,
                                                                  guint n_construct_properties,
                                                                  GObjectConstructParam * construct_properties);
static void _bluetooth_indicator_widgets_popover_widget___lambda23_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                              GtkListBoxRow* row);
static void __bluetooth_indicator_widgets_popover_widget___lambda23__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                          GtkListBoxRow* row,
                                                                                          gpointer self);
static void _bluetooth_indicator_widgets_popover_widget___lambda24_ (BluetoothIndicatorWidgetsPopoverWidget* self);
static void __bluetooth_indicator_widgets_popover_widget___lambda24__gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
static void _bluetooth_indicator_widgets_popover_widget___lambda25_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                              gboolean state,
                                                              gboolean paired);
static void __bluetooth_indicator_widgets_popover_widget___lambda25__bluetooth_indicator_services_object_manager_global_state_changed (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                                gboolean enabled,
                                                                                                                                gboolean connected,
                                                                                                                                gpointer self);
static void _bluetooth_indicator_widgets_popover_widget___lambda26_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                              BluetoothIndicatorServicesDevice* device);
static void __bluetooth_indicator_widgets_popover_widget___lambda26__bluetooth_indicator_services_object_manager_device_added (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                        BluetoothIndicatorServicesDevice* adapter,
                                                                                                                        gpointer self);
static void _bluetooth_indicator_widgets_popover_widget___lambda27_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                              BluetoothIndicatorServicesDevice* device);
static void __bluetooth_indicator_widgets_popover_widget___lambda27__bluetooth_indicator_services_object_manager_device_removed (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                          BluetoothIndicatorServicesDevice* adapter,
                                                                                                                          gpointer self);
static void bluetooth_indicator_widgets_popover_widget_finalize (GObject * obj);
static GType bluetooth_indicator_widgets_popover_widget_get_type_once (void);
static void _vala_bluetooth_indicator_widgets_popover_widget_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec);
static void _vala_bluetooth_indicator_widgets_popover_widget_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec);

static inline gpointer
bluetooth_indicator_widgets_popover_widget_get_instance_private (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	return G_STRUCT_MEMBER_P (self, BluetoothIndicatorWidgetsPopoverWidget_private_offset);
}

BluetoothIndicatorWidgetsPopoverWidget*
bluetooth_indicator_widgets_popover_widget_construct (GType object_type,
                                                      BluetoothIndicatorServicesObjectManager* object_manager,
                                                      BluetoothIndicatorServicesObexManager* obex_manager,
                                                      gboolean is_in_session)
{
	BluetoothIndicatorWidgetsPopoverWidget * self = NULL;
	g_return_val_if_fail (object_manager != NULL, NULL);
	g_return_val_if_fail (obex_manager != NULL, NULL);
	self = (BluetoothIndicatorWidgetsPopoverWidget*) g_object_new (object_type, "object-manager", object_manager, "obex-manager", obex_manager, "is-in-session", is_in_session, NULL);
	return self;
}

BluetoothIndicatorWidgetsPopoverWidget*
bluetooth_indicator_widgets_popover_widget_new (BluetoothIndicatorServicesObjectManager* object_manager,
                                                BluetoothIndicatorServicesObexManager* obex_manager,
                                                gboolean is_in_session)
{
	return bluetooth_indicator_widgets_popover_widget_construct (BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, object_manager, obex_manager, is_in_session);
}

static gint
bluetooth_indicator_widgets_popover_widget_compare_rows (GtkListBoxRow* row1,
                                                         GtkListBoxRow* row2,
                                                         BluetoothIndicatorWidgetsPopoverWidget* self)
{
	BluetoothIndicatorServicesDevice* device1 = NULL;
	BluetoothIndicatorServicesDevice* _tmp0_;
	BluetoothIndicatorServicesDevice* _tmp1_;
	BluetoothIndicatorServicesDevice* device2 = NULL;
	BluetoothIndicatorServicesDevice* _tmp2_;
	BluetoothIndicatorServicesDevice* _tmp3_;
	gboolean _tmp4_ = FALSE;
	BluetoothIndicatorServicesDevice* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp14_ = FALSE;
	BluetoothIndicatorServicesDevice* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gboolean _tmp19_;
	gchar* _tmp24_ = NULL;
	BluetoothIndicatorServicesDevice* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* name1 = NULL;
	gchar* _tmp31_;
	gchar* _tmp32_ = NULL;
	BluetoothIndicatorServicesDevice* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* name2 = NULL;
	gchar* _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (row1 != NULL, -1);
	g_return_val_if_fail (row2 != NULL, -1);
	_tmp0_ = bluetooth_indicator_widgets_device_get_device (G_TYPE_CHECK_INSTANCE_CAST (row1, BLUETOOTH_INDICATOR_WIDGETS_TYPE_DEVICE, BluetoothIndicatorWidgetsDevice));
	_tmp1_ = _tmp0_;
	device1 = _tmp1_;
	_tmp2_ = bluetooth_indicator_widgets_device_get_device (G_TYPE_CHECK_INSTANCE_CAST (row2, BLUETOOTH_INDICATOR_WIDGETS_TYPE_DEVICE, BluetoothIndicatorWidgetsDevice));
	_tmp3_ = _tmp2_;
	device2 = _tmp3_;
	_tmp5_ = device1;
	_tmp6_ = bluetooth_indicator_services_device_get_name (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_ != NULL;
	_g_free0 (_tmp8_);
	if (_tmp9_) {
		BluetoothIndicatorServicesDevice* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp10_ = device2;
		_tmp11_ = bluetooth_indicator_services_device_get_name (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp4_ = _tmp13_ == NULL;
		_g_free0 (_tmp13_);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		result = -1;
		return result;
	}
	_tmp15_ = device1;
	_tmp16_ = bluetooth_indicator_services_device_get_name (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_;
	_tmp19_ = _tmp18_ == NULL;
	_g_free0 (_tmp18_);
	if (_tmp19_) {
		BluetoothIndicatorServicesDevice* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp20_ = device2;
		_tmp21_ = bluetooth_indicator_services_device_get_name (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = _tmp22_;
		_tmp14_ = _tmp23_ != NULL;
		_g_free0 (_tmp23_);
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		result = 1;
		return result;
	}
	_tmp25_ = device1;
	_tmp26_ = bluetooth_indicator_services_device_get_name (_tmp25_);
	_tmp27_ = _tmp26_;
	_tmp24_ = _tmp27_;
	if (_tmp24_ == NULL) {
		BluetoothIndicatorServicesDevice* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		_tmp28_ = device1;
		_tmp29_ = bluetooth_indicator_services_device_get_address (_tmp28_);
		_tmp30_ = _tmp29_;
		_g_free0 (_tmp24_);
		_tmp24_ = _tmp30_;
	}
	_tmp31_ = _tmp24_;
	_tmp24_ = NULL;
	name1 = _tmp31_;
	_tmp33_ = device2;
	_tmp34_ = bluetooth_indicator_services_device_get_name (_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp32_ = _tmp35_;
	if (_tmp32_ == NULL) {
		BluetoothIndicatorServicesDevice* _tmp36_;
		gchar* _tmp37_;
		gchar* _tmp38_;
		_tmp36_ = device2;
		_tmp37_ = bluetooth_indicator_services_device_get_address (_tmp36_);
		_tmp38_ = _tmp37_;
		_g_free0 (_tmp32_);
		_tmp32_ = _tmp38_;
	}
	_tmp39_ = _tmp32_;
	_tmp32_ = NULL;
	name2 = _tmp39_;
	_tmp40_ = name1;
	_tmp41_ = name2;
	result = g_utf8_collate (_tmp40_, _tmp41_);
	_g_free0 (name2);
	_g_free0 (_tmp32_);
	_g_free0 (name1);
	_g_free0 (_tmp24_);
	return result;
}

static void
bluetooth_indicator_widgets_popover_widget_update_ui_state (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                            gboolean state)
{
	GraniteSwitchModelButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkListBox* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->main_switch;
	_tmp1_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ != state) {
		GraniteSwitchModelButton* _tmp3_;
		_tmp3_ = self->priv->main_switch;
		gtk_toggle_button_set_active ((GtkToggleButton*) _tmp3_, state);
	}
	_tmp4_ = self->priv->devices_list;
	gtk_list_box_invalidate_sort (_tmp4_);
	bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (self);
}

static void
bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	GtkListBox* _tmp0_;
	GtkListBoxRow* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->devices_list;
	_tmp1_ = gtk_list_box_get_row_at_index (_tmp0_, 0);
	if (_tmp1_ != NULL) {
		GtkRevealer* _tmp2_;
		GraniteSwitchModelButton* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp2_ = self->priv->revealer;
		_tmp3_ = self->priv->main_switch;
		_tmp4_ = gtk_toggle_button_get_active ((GtkToggleButton*) _tmp3_);
		_tmp5_ = _tmp4_;
		gtk_revealer_set_reveal_child (_tmp2_, _tmp5_);
	} else {
		GtkRevealer* _tmp6_;
		_tmp6_ = self->priv->revealer;
		gtk_revealer_set_reveal_child (_tmp6_, FALSE);
	}
}

static void
__lambda22_ (BluetoothIndicatorWidgetsPopoverWidget* self,
             BluetoothIndicatorServicesDevice* device_service)
{
	g_return_if_fail (device_service != NULL);
	g_signal_emit (self, bluetooth_indicator_widgets_popover_widget_signals[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_DEVICE_REQUESTED_SIGNAL], 0, device_service);
}

static void
___lambda22__bluetooth_indicator_widgets_device_show_device (BluetoothIndicatorWidgetsDevice* _sender,
                                                             BluetoothIndicatorServicesDevice* device,
                                                             gpointer self)
{
	__lambda22_ ((BluetoothIndicatorWidgetsPopoverWidget*) self, device);
}

static void
bluetooth_indicator_widgets_popover_widget_add_device (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                       BluetoothIndicatorServicesDevice* device)
{
	BluetoothIndicatorWidgetsDevice* device_widget = NULL;
	BluetoothIndicatorServicesObexManager* _tmp0_;
	BluetoothIndicatorWidgetsDevice* _tmp1_;
	GtkListBox* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (device != NULL);
	_tmp0_ = self->priv->_obex_manager;
	_tmp1_ = bluetooth_indicator_widgets_device_new (device, _tmp0_);
	g_object_ref_sink (_tmp1_);
	device_widget = _tmp1_;
	_tmp2_ = self->priv->devices_list;
	gtk_list_box_append (_tmp2_, (GtkWidget*) device_widget);
	bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (self);
	g_signal_connect_object (device_widget, "show-device", (GCallback) ___lambda22__bluetooth_indicator_widgets_device_show_device, self, 0);
	_g_object_unref0 (device_widget);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
bluetooth_indicator_widgets_popover_widget_remove_device (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                          BluetoothIndicatorServicesDevice* device)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (device != NULL);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GtkListBox* _tmp2_;
				GtkListBoxRow* _tmp3_;
				BluetoothIndicatorWidgetsDevice* device_child = NULL;
				GtkListBox* _tmp4_;
				GtkListBoxRow* _tmp5_;
				BluetoothIndicatorWidgetsDevice* _tmp6_;
				gboolean _tmp7_ = FALSE;
				BluetoothIndicatorWidgetsDevice* _tmp8_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = self->priv->devices_list;
				_tmp3_ = gtk_list_box_get_row_at_index (_tmp2_, i);
				if (!(_tmp3_ != NULL)) {
					break;
				}
				_tmp4_ = self->priv->devices_list;
				_tmp5_ = gtk_list_box_get_row_at_index (_tmp4_, i);
				_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, BLUETOOTH_INDICATOR_WIDGETS_TYPE_DEVICE, BluetoothIndicatorWidgetsDevice));
				device_child = _tmp6_;
				_tmp8_ = device_child;
				if (_tmp8_ != NULL) {
					BluetoothIndicatorWidgetsDevice* _tmp9_;
					BluetoothIndicatorServicesDevice* _tmp10_;
					BluetoothIndicatorServicesDevice* _tmp11_;
					gchar* _tmp12_;
					gchar* _tmp13_;
					gchar* _tmp14_;
					gchar* _tmp15_;
					gchar* _tmp16_;
					gchar* _tmp17_;
					_tmp9_ = device_child;
					_tmp10_ = bluetooth_indicator_widgets_device_get_device (_tmp9_);
					_tmp11_ = _tmp10_;
					_tmp12_ = bluetooth_indicator_services_device_get_address (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp14_ = _tmp13_;
					_tmp15_ = bluetooth_indicator_services_device_get_address (device);
					_tmp16_ = _tmp15_;
					_tmp17_ = _tmp16_;
					_tmp7_ = g_strcmp0 (_tmp14_, _tmp17_) == 0;
					_g_free0 (_tmp17_);
					_g_free0 (_tmp14_);
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					GtkListBox* _tmp18_;
					BluetoothIndicatorWidgetsDevice* _tmp19_;
					_tmp18_ = self->priv->devices_list;
					_tmp19_ = device_child;
					gtk_list_box_remove (_tmp18_, (GtkWidget*) _tmp19_);
					_g_object_unref0 (device_child);
					return;
				}
				_g_object_unref0 (device_child);
			}
		}
	}
}

BluetoothIndicatorServicesObjectManager*
bluetooth_indicator_widgets_popover_widget_get_object_manager (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	BluetoothIndicatorServicesObjectManager* result;
	BluetoothIndicatorServicesObjectManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_object_manager;
	result = _tmp0_;
	return result;
}

static void
bluetooth_indicator_widgets_popover_widget_set_object_manager (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                               BluetoothIndicatorServicesObjectManager* value)
{
	BluetoothIndicatorServicesObjectManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = bluetooth_indicator_widgets_popover_widget_get_object_manager (self);
	if (old_value != value) {
		BluetoothIndicatorServicesObjectManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_object_manager);
		self->priv->_object_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY]);
	}
}

BluetoothIndicatorServicesObexManager*
bluetooth_indicator_widgets_popover_widget_get_obex_manager (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	BluetoothIndicatorServicesObexManager* result;
	BluetoothIndicatorServicesObexManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_obex_manager;
	result = _tmp0_;
	return result;
}

static void
bluetooth_indicator_widgets_popover_widget_set_obex_manager (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                             BluetoothIndicatorServicesObexManager* value)
{
	BluetoothIndicatorServicesObexManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = bluetooth_indicator_widgets_popover_widget_get_obex_manager (self);
	if (old_value != value) {
		BluetoothIndicatorServicesObexManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_obex_manager);
		self->priv->_obex_manager = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY]);
	}
}

gboolean
bluetooth_indicator_widgets_popover_widget_get_is_in_session (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_in_session;
	return result;
}

static void
bluetooth_indicator_widgets_popover_widget_set_is_in_session (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = bluetooth_indicator_widgets_popover_widget_get_is_in_session (self);
	if (old_value != value) {
		self->priv->_is_in_session = value;
		g_object_notify_by_pspec ((GObject *) self, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY]);
	}
}

static void
_bluetooth_indicator_widgets_popover_widget___lambda23_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                         GtkListBoxRow* row)
{
	g_return_if_fail (row != NULL);
	bluetooth_indicator_widgets_device_toggle_device (G_TYPE_CHECK_INSTANCE_CAST (row, BLUETOOTH_INDICATOR_WIDGETS_TYPE_DEVICE, BluetoothIndicatorWidgetsDevice), NULL, NULL);
}

static void
__bluetooth_indicator_widgets_popover_widget___lambda23__gtk_list_box_row_activated (GtkListBox* _sender,
                                                                                     GtkListBoxRow* row,
                                                                                     gpointer self)
{
	_bluetooth_indicator_widgets_popover_widget___lambda23_ ((BluetoothIndicatorWidgetsPopoverWidget*) self, row);
}

static void
_bluetooth_indicator_widgets_popover_widget___lambda24_ (BluetoothIndicatorWidgetsPopoverWidget* self)
{
	GError* _inner_error0_ = NULL;
	{
		g_app_info_launch_default_for_uri ("settings://network/bluetooth", NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_warning ("PopoverWidget.vala:86: Failed to open bluetooth settings: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
__bluetooth_indicator_widgets_popover_widget___lambda24__gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	_bluetooth_indicator_widgets_popover_widget___lambda24_ ((BluetoothIndicatorWidgetsPopoverWidget*) self);
}

static void
_bluetooth_indicator_widgets_popover_widget___lambda25_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                         gboolean state,
                                                         gboolean paired)
{
	bluetooth_indicator_widgets_popover_widget_update_ui_state (self, state);
}

static void
__bluetooth_indicator_widgets_popover_widget___lambda25__bluetooth_indicator_services_object_manager_global_state_changed (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                           gboolean enabled,
                                                                                                                           gboolean connected,
                                                                                                                           gpointer self)
{
	_bluetooth_indicator_widgets_popover_widget___lambda25_ ((BluetoothIndicatorWidgetsPopoverWidget*) self, enabled, connected);
}

static void
_bluetooth_indicator_widgets_popover_widget___lambda26_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                         BluetoothIndicatorServicesDevice* device)
{
	g_return_if_fail (device != NULL);
	bluetooth_indicator_widgets_popover_widget_remove_device (self, device);
	bluetooth_indicator_widgets_popover_widget_add_device (self, device);
}

static void
__bluetooth_indicator_widgets_popover_widget___lambda26__bluetooth_indicator_services_object_manager_device_added (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                   BluetoothIndicatorServicesDevice* adapter,
                                                                                                                   gpointer self)
{
	_bluetooth_indicator_widgets_popover_widget___lambda26_ ((BluetoothIndicatorWidgetsPopoverWidget*) self, adapter);
}

static void
_bluetooth_indicator_widgets_popover_widget___lambda27_ (BluetoothIndicatorWidgetsPopoverWidget* self,
                                                         BluetoothIndicatorServicesDevice* device)
{
	g_return_if_fail (device != NULL);
	bluetooth_indicator_widgets_popover_widget_remove_device (self, device);
	bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (self);
}

static void
__bluetooth_indicator_widgets_popover_widget___lambda27__bluetooth_indicator_services_object_manager_device_removed (BluetoothIndicatorServicesObjectManager* _sender,
                                                                                                                     BluetoothIndicatorServicesDevice* adapter,
                                                                                                                     gpointer self)
{
	_bluetooth_indicator_widgets_popover_widget___lambda27_ ((BluetoothIndicatorWidgetsPopoverWidget*) self, adapter);
}

static GObject *
bluetooth_indicator_widgets_popover_widget_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BluetoothIndicatorWidgetsPopoverWidget * self;
	GraniteSwitchModelButton* _tmp0_;
	GraniteSwitchModelButton* _tmp1_;
	GtkListBox* _tmp2_;
	GtkListBox* _tmp3_;
	GtkScrolledWindow* scroll_box = NULL;
	GtkListBox* _tmp4_;
	GtkWidget* _tmp5_;
	GtkScrolledWindow* _tmp6_ = NULL;
	GtkSeparator* revealer_content_separator = NULL;
	GtkSeparator* _tmp7_ = NULL;
	GtkBox* revealer_content = NULL;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkSeparator* _tmp10_;
	GtkBox* _tmp11_;
	GtkScrolledWindow* _tmp12_;
	GtkBox* _tmp13_;
	GtkWidget* _tmp14_;
	GtkRevealer* _tmp15_ = NULL;
	WingpanelPopoverMenuItem* show_settings_button = NULL;
	gchar* _tmp16_;
	WingpanelPopoverMenuItem* _tmp17_ = NULL;
	GraniteSwitchModelButton* _tmp18_;
	GtkRevealer* _tmp19_;
	gboolean _tmp20_;
	BluetoothIndicatorServicesObjectManager* _tmp24_;
	GtkListBox* _tmp25_;
	BluetoothIndicatorServicesObjectManager* _tmp26_;
	GSettings* _tmp27_;
	GSettings* _tmp28_;
	GraniteSwitchModelButton* _tmp29_;
	WingpanelPopoverMenuItem* _tmp30_;
	BluetoothIndicatorServicesObjectManager* _tmp31_;
	BluetoothIndicatorServicesObjectManager* _tmp32_;
	BluetoothIndicatorServicesObjectManager* _tmp33_;
	gboolean _tmp34_ = FALSE;
	BluetoothIndicatorServicesObjectManager* _tmp35_;
	gboolean _tmp36_;
	gboolean _tmp37_;
	parent_class = G_OBJECT_CLASS (bluetooth_indicator_widgets_popover_widget_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, BluetoothIndicatorWidgetsPopoverWidget);
	gtk_orientable_set_orientation ((GtkOrientable*) self, GTK_ORIENTATION_VERTICAL);
	_tmp0_ = granite_switch_model_button_new (_ ("Bluetooth"));
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->main_switch);
	self->priv->main_switch = _tmp0_;
	_tmp1_ = self->priv->main_switch;
	gtk_widget_add_css_class ((GtkWidget*) _tmp1_, GRANITE_STYLE_CLASS_H4_LABEL);
	_tmp2_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (self->priv->devices_list);
	self->priv->devices_list = _tmp2_;
	_tmp3_ = self->priv->devices_list;
	gtk_list_box_set_sort_func (_tmp3_, (GtkListBoxSortFunc) bluetooth_indicator_widgets_popover_widget_compare_rows, g_object_ref (self), g_object_unref);
	_tmp4_ = self->priv->devices_list;
	_tmp5_ = _g_object_ref0 ((GtkWidget*) _tmp4_);
	_tmp6_ = (GtkScrolledWindow*) gtk_scrolled_window_new ();
	gtk_scrolled_window_set_child (_tmp6_, _tmp5_);
	_g_object_unref0 (_tmp5_);
	g_object_set (_tmp6_, "hscrollbar-policy", GTK_POLICY_NEVER, NULL);
	gtk_scrolled_window_set_max_content_height (_tmp6_, 512);
	gtk_scrolled_window_set_propagate_natural_height (_tmp6_, TRUE);
	g_object_ref_sink (_tmp6_);
	scroll_box = _tmp6_;
	_tmp7_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp7_, 3);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp7_, 3);
	g_object_ref_sink (_tmp7_);
	revealer_content_separator = _tmp7_;
	_tmp8_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp8_);
	revealer_content = _tmp8_;
	_tmp9_ = revealer_content;
	_tmp10_ = revealer_content_separator;
	gtk_box_append (_tmp9_, (GtkWidget*) _tmp10_);
	_tmp11_ = revealer_content;
	_tmp12_ = scroll_box;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = revealer_content;
	_tmp14_ = _g_object_ref0 ((GtkWidget*) _tmp13_);
	_tmp15_ = (GtkRevealer*) gtk_revealer_new ();
	gtk_revealer_set_child (_tmp15_, _tmp14_);
	_g_object_unref0 (_tmp14_);
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->revealer);
	self->priv->revealer = _tmp15_;
	_tmp16_ = g_strdup (_ ("Bluetooth Settings…"));
	_tmp17_ = wingpanel_popover_menu_item_new ();
	wingpanel_popover_menu_item_set_text (_tmp17_, _tmp16_);
	_g_free0 (_tmp16_);
	g_object_ref_sink (_tmp17_);
	show_settings_button = _tmp17_;
	_tmp18_ = self->priv->main_switch;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->revealer;
	gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp19_);
	_tmp20_ = self->priv->_is_in_session;
	if (_tmp20_) {
		GtkSeparator* settings_button_separator = NULL;
		GtkSeparator* _tmp21_ = NULL;
		GtkSeparator* _tmp22_;
		WingpanelPopoverMenuItem* _tmp23_;
		_tmp21_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		gtk_widget_set_margin_top ((GtkWidget*) _tmp21_, 3);
		gtk_widget_set_margin_bottom ((GtkWidget*) _tmp21_, 3);
		g_object_ref_sink (_tmp21_);
		settings_button_separator = _tmp21_;
		_tmp22_ = settings_button_separator;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp22_);
		_tmp23_ = show_settings_button;
		gtk_box_append ((GtkBox*) self, (GtkWidget*) _tmp23_);
		_g_object_unref0 (settings_button_separator);
	}
	_tmp24_ = self->priv->_object_manager;
	bluetooth_indicator_widgets_popover_widget_update_ui_state (self, bluetooth_indicator_services_object_manager_get_global_state (_tmp24_));
	_tmp25_ = self->priv->devices_list;
	g_signal_connect_object (_tmp25_, "row-activated", (GCallback) __bluetooth_indicator_widgets_popover_widget___lambda23__gtk_list_box_row_activated, self, 0);
	_tmp26_ = self->priv->_object_manager;
	_tmp27_ = bluetooth_indicator_services_object_manager_get_settings (_tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = self->priv->main_switch;
	g_settings_bind (_tmp28_, "enabled", (GObject*) _tmp29_, "active", G_SETTINGS_BIND_DEFAULT);
	_tmp30_ = show_settings_button;
	g_signal_connect_object ((GtkButton*) _tmp30_, "clicked", (GCallback) __bluetooth_indicator_widgets_popover_widget___lambda24__gtk_button_clicked, self, 0);
	_tmp31_ = self->priv->_object_manager;
	g_signal_connect_object (_tmp31_, "global-state-changed", (GCallback) __bluetooth_indicator_widgets_popover_widget___lambda25__bluetooth_indicator_services_object_manager_global_state_changed, self, 0);
	_tmp32_ = self->priv->_object_manager;
	g_signal_connect_object (_tmp32_, "device-added", (GCallback) __bluetooth_indicator_widgets_popover_widget___lambda26__bluetooth_indicator_services_object_manager_device_added, self, 0);
	_tmp33_ = self->priv->_object_manager;
	g_signal_connect_object (_tmp33_, "device-removed", (GCallback) __bluetooth_indicator_widgets_popover_widget___lambda27__bluetooth_indicator_services_object_manager_device_removed, self, 0);
	_tmp35_ = self->priv->_object_manager;
	_tmp36_ = bluetooth_indicator_services_object_manager_get_has_object (_tmp35_);
	_tmp37_ = _tmp36_;
	if (_tmp37_) {
		BluetoothIndicatorServicesObjectManager* _tmp38_;
		gboolean _tmp39_;
		gboolean _tmp40_;
		_tmp38_ = self->priv->_object_manager;
		_tmp39_ = bluetooth_indicator_services_object_manager_get_retrieve_finished (_tmp38_);
		_tmp40_ = _tmp39_;
		_tmp34_ = _tmp40_;
	} else {
		_tmp34_ = FALSE;
	}
	if (_tmp34_) {
		{
			GeeIterator* _device_it = NULL;
			BluetoothIndicatorServicesObjectManager* _tmp41_;
			GeeCollection* _tmp42_;
			GeeCollection* _tmp43_;
			GeeIterator* _tmp44_;
			GeeIterator* _tmp45_;
			_tmp41_ = self->priv->_object_manager;
			_tmp42_ = bluetooth_indicator_services_object_manager_get_devices (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
			_tmp45_ = _tmp44_;
			_g_object_unref0 (_tmp43_);
			_device_it = _tmp45_;
			while (TRUE) {
				GeeIterator* _tmp46_;
				BluetoothIndicatorServicesDevice* device = NULL;
				GeeIterator* _tmp47_;
				gpointer _tmp48_;
				BluetoothIndicatorServicesDevice* _tmp49_;
				_tmp46_ = _device_it;
				if (!gee_iterator_next (_tmp46_)) {
					break;
				}
				_tmp47_ = _device_it;
				_tmp48_ = gee_iterator_get (_tmp47_);
				device = (BluetoothIndicatorServicesDevice*) _tmp48_;
				_tmp49_ = device;
				bluetooth_indicator_widgets_popover_widget_add_device (self, _tmp49_);
				_g_object_unref0 (device);
			}
			_g_object_unref0 (_device_it);
		}
	}
	bluetooth_indicator_widgets_popover_widget_update_devices_box_visible (self);
	_g_object_unref0 (show_settings_button);
	_g_object_unref0 (revealer_content);
	_g_object_unref0 (revealer_content_separator);
	_g_object_unref0 (scroll_box);
	return obj;
}

static void
bluetooth_indicator_widgets_popover_widget_class_init (BluetoothIndicatorWidgetsPopoverWidgetClass * klass,
                                                       gpointer klass_data)
{
	bluetooth_indicator_widgets_popover_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BluetoothIndicatorWidgetsPopoverWidget_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_bluetooth_indicator_widgets_popover_widget_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_bluetooth_indicator_widgets_popover_widget_set_property;
	G_OBJECT_CLASS (klass)->constructor = bluetooth_indicator_widgets_popover_widget_constructor;
	G_OBJECT_CLASS (klass)->finalize = bluetooth_indicator_widgets_popover_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY] = g_param_spec_object ("object-manager", "object-manager", "object-manager", BLUETOOTH_INDICATOR_SERVICES_TYPE_OBJECT_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY] = g_param_spec_object ("obex-manager", "obex-manager", "obex-manager", BLUETOOTH_INDICATOR_SERVICES_TYPE_OBEX_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY, bluetooth_indicator_widgets_popover_widget_properties[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY] = g_param_spec_boolean ("is-in-session", "is-in-session", "is-in-session", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	bluetooth_indicator_widgets_popover_widget_signals[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_DEVICE_REQUESTED_SIGNAL] = g_signal_new ("device-requested", BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, BLUETOOTH_INDICATOR_SERVICES_TYPE_DEVICE);
	bluetooth_indicator_widgets_popover_widget_signals[BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_DISCOVERY_REQUESTED_SIGNAL] = g_signal_new ("discovery-requested", BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
bluetooth_indicator_widgets_popover_widget_instance_init (BluetoothIndicatorWidgetsPopoverWidget * self,
                                                          gpointer klass)
{
	self->priv = bluetooth_indicator_widgets_popover_widget_get_instance_private (self);
}

static void
bluetooth_indicator_widgets_popover_widget_finalize (GObject * obj)
{
	BluetoothIndicatorWidgetsPopoverWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, BluetoothIndicatorWidgetsPopoverWidget);
	_g_object_unref0 (self->priv->_object_manager);
	_g_object_unref0 (self->priv->_obex_manager);
	_g_object_unref0 (self->priv->main_switch);
	_g_object_unref0 (self->priv->devices_list);
	_g_object_unref0 (self->priv->revealer);
	G_OBJECT_CLASS (bluetooth_indicator_widgets_popover_widget_parent_class)->finalize (obj);
}

static GType
bluetooth_indicator_widgets_popover_widget_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BluetoothIndicatorWidgetsPopoverWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bluetooth_indicator_widgets_popover_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BluetoothIndicatorWidgetsPopoverWidget), 0, (GInstanceInitFunc) bluetooth_indicator_widgets_popover_widget_instance_init, NULL };
	GType bluetooth_indicator_widgets_popover_widget_type_id;
	bluetooth_indicator_widgets_popover_widget_type_id = g_type_register_static (gtk_box_get_type (), "BluetoothIndicatorWidgetsPopoverWidget", &g_define_type_info, 0);
	BluetoothIndicatorWidgetsPopoverWidget_private_offset = g_type_add_instance_private (bluetooth_indicator_widgets_popover_widget_type_id, sizeof (BluetoothIndicatorWidgetsPopoverWidgetPrivate));
	return bluetooth_indicator_widgets_popover_widget_type_id;
}

GType
bluetooth_indicator_widgets_popover_widget_get_type (void)
{
	static volatile gsize bluetooth_indicator_widgets_popover_widget_type_id__once = 0;
	if (g_once_init_enter (&bluetooth_indicator_widgets_popover_widget_type_id__once)) {
		GType bluetooth_indicator_widgets_popover_widget_type_id;
		bluetooth_indicator_widgets_popover_widget_type_id = bluetooth_indicator_widgets_popover_widget_get_type_once ();
		g_once_init_leave (&bluetooth_indicator_widgets_popover_widget_type_id__once, bluetooth_indicator_widgets_popover_widget_type_id);
	}
	return bluetooth_indicator_widgets_popover_widget_type_id__once;
}

static void
_vala_bluetooth_indicator_widgets_popover_widget_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec)
{
	BluetoothIndicatorWidgetsPopoverWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, BluetoothIndicatorWidgetsPopoverWidget);
	switch (property_id) {
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY:
		g_value_set_object (value, bluetooth_indicator_widgets_popover_widget_get_object_manager (self));
		break;
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY:
		g_value_set_object (value, bluetooth_indicator_widgets_popover_widget_get_obex_manager (self));
		break;
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY:
		g_value_set_boolean (value, bluetooth_indicator_widgets_popover_widget_get_is_in_session (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_bluetooth_indicator_widgets_popover_widget_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec)
{
	BluetoothIndicatorWidgetsPopoverWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BLUETOOTH_INDICATOR_WIDGETS_TYPE_POPOVER_WIDGET, BluetoothIndicatorWidgetsPopoverWidget);
	switch (property_id) {
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBJECT_MANAGER_PROPERTY:
		bluetooth_indicator_widgets_popover_widget_set_object_manager (self, g_value_get_object (value));
		break;
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_OBEX_MANAGER_PROPERTY:
		bluetooth_indicator_widgets_popover_widget_set_obex_manager (self, g_value_get_object (value));
		break;
		case BLUETOOTH_INDICATOR_WIDGETS_POPOVER_WIDGET_IS_IN_SESSION_PROPERTY:
		bluetooth_indicator_widgets_popover_widget_set_is_in_session (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

