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

/* From SwaySettings PulseAudio page: https://github.com/ErikReider/SwaySettings/blob/407c9e99dd3e50a0f09c64d94a9e6ff741488378/src/Pages/Pulse/PulseDevice.vala*/

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <pulse/pulseaudio.h>
#include <float.h>
#include <math.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
#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 SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE (sway_notification_center_widgets_pulse_card_profile_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, SwayNotificationCenterWidgetsPulseCardProfile))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, SwayNotificationCenterWidgetsPulseCardProfileClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_CARD_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_CARD_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, SwayNotificationCenterWidgetsPulseCardProfileClass))

typedef struct _SwayNotificationCenterWidgetsPulseCardProfile SwayNotificationCenterWidgetsPulseCardProfile;
typedef struct _SwayNotificationCenterWidgetsPulseCardProfileClass SwayNotificationCenterWidgetsPulseCardProfileClass;
typedef struct _SwayNotificationCenterWidgetsPulseCardProfilePrivate SwayNotificationCenterWidgetsPulseCardProfilePrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_pulse_card_profile_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_CARD_PROFILE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE (sway_notification_center_widgets_pulse_device_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDevice))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDeviceClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDeviceClass))

typedef struct _SwayNotificationCenterWidgetsPulseDevice SwayNotificationCenterWidgetsPulseDevice;
typedef struct _SwayNotificationCenterWidgetsPulseDeviceClass SwayNotificationCenterWidgetsPulseDeviceClass;
typedef struct _SwayNotificationCenterWidgetsPulseDevicePrivate SwayNotificationCenterWidgetsPulseDevicePrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_array_unref0(var) ((var == NULL) ? NULL : (var = (g_array_unref (var), NULL)))

struct _SwayNotificationCenterWidgetsPulseCardProfile {
	GObject parent_instance;
	SwayNotificationCenterWidgetsPulseCardProfilePrivate * priv;
	gchar* name;
	gchar* description;
	guint32 n_sinks;
	guint32 priority;
};

struct _SwayNotificationCenterWidgetsPulseCardProfileClass {
	GObjectClass parent_class;
};

struct _SwayNotificationCenterWidgetsPulseCardProfilePrivate {
	gint available;
};

struct _SwayNotificationCenterWidgetsPulseDevice {
	GObject parent_instance;
	SwayNotificationCenterWidgetsPulseDevicePrivate * priv;
	pa_cvolume cvolume;
	pa_channel_map channel_map;
};

struct _SwayNotificationCenterWidgetsPulseDeviceClass {
	GObjectClass parent_class;
};

struct _SwayNotificationCenterWidgetsPulseDevicePrivate {
	gboolean _removed;
	gboolean _has_card;
	guint32 _card_index;
	guint32 _device_index;
	pa_direction_t _direction;
	gboolean _is_default;
	gboolean _is_virtual;
	gboolean _is_bluetooth;
	gchar* _icon_name;
	gchar* _card_name;
	gchar* _card_description;
	gchar* _card_active_profile;
	gchar* _card_sink_port_name;
	gchar* _device_name;
	gchar* _device_description;
	gboolean _is_muted;
	gdouble _volume;
	gfloat _balance;
	GeeLinkedList* _volume_operations;
	gchar* _port_name;
	gchar* _port_description;
	gchar* _port_id;
	gchar** _port_profiles;
	gint _port_profiles_length1;
	gint __port_profiles_size_;
	GArray* _profiles;
	SwayNotificationCenterWidgetsPulseCardProfile* _active_profile;
};

static gint SwayNotificationCenterWidgetsPulseCardProfile_private_offset;
static gpointer sway_notification_center_widgets_pulse_card_profile_parent_class = NULL;
static gint SwayNotificationCenterWidgetsPulseDevice_private_offset;
static gpointer sway_notification_center_widgets_pulse_device_parent_class = NULL;

VALA_EXTERN GType sway_notification_center_widgets_pulse_card_profile_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsPulseCardProfile, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsPulseCardProfile* sway_notification_center_widgets_pulse_card_profile_new (pa_card_profile_info2* profile);
VALA_EXTERN SwayNotificationCenterWidgetsPulseCardProfile* sway_notification_center_widgets_pulse_card_profile_construct (GType object_type,
                                                                                                              pa_card_profile_info2* profile);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_card_profile_cmp (SwayNotificationCenterWidgetsPulseCardProfile* self,
                                                                  SwayNotificationCenterWidgetsPulseCardProfile* profile);
static void sway_notification_center_widgets_pulse_card_profile_finalize (GObject * obj);
static GType sway_notification_center_widgets_pulse_card_profile_get_type_once (void);
VALA_EXTERN GType sway_notification_center_widgets_pulse_device_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsPulseDevice, g_object_unref)
VALA_EXTERN gchar* sway_notification_center_widgets_pulse_device_get_display_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_card_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_device_description (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_port_description (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_card_description (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_cmp (SwayNotificationCenterWidgetsPulseDevice* self,
                                                            SwayNotificationCenterWidgetsPulseDevice* device);
VALA_EXTERN guint32 sway_notification_center_widgets_pulse_device_get_card_index (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN guint32 sway_notification_center_widgets_pulse_device_get_device_index (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_device_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_is_default (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_removed (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_card_active_profile (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_port_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN gchar* sway_notification_center_widgets_pulse_device_get_current_hash_key (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN gchar* sway_notification_center_widgets_pulse_device_get_hash_map_key (const gchar* c_desc,
                                                                       const gchar* p_name);
VALA_EXTERN SwayNotificationCenterWidgetsPulseDevice* sway_notification_center_widgets_pulse_device_new (void);
VALA_EXTERN SwayNotificationCenterWidgetsPulseDevice* sway_notification_center_widgets_pulse_device_construct (GType object_type);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_removed (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                gboolean value);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_has_card (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_has_card (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                 gboolean value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_card_index (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                   guint32 value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_device_index (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                     guint32 value);
VALA_EXTERN pa_direction_t sway_notification_center_widgets_pulse_device_get_direction (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_direction (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                  pa_direction_t value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_is_default (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                   gboolean value);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_is_virtual (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_is_virtual (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                   gboolean value);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_is_bluetooth (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_is_bluetooth (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                     gboolean value);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_icon_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_icon_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                  const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_card_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                  const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_card_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                         const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_card_active_profile (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                            const gchar* value);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_card_sink_port_name (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_card_sink_port_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                            const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_device_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                    const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_device_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                           const gchar* value);
VALA_EXTERN gboolean sway_notification_center_widgets_pulse_device_get_is_muted (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_is_muted (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                 gboolean value);
VALA_EXTERN gdouble sway_notification_center_widgets_pulse_device_get_volume (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_volume (SwayNotificationCenterWidgetsPulseDevice* self,
                                                               gdouble value);
VALA_EXTERN gfloat sway_notification_center_widgets_pulse_device_get_balance (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_balance (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                gfloat value);
VALA_EXTERN GeeLinkedList* sway_notification_center_widgets_pulse_device_get_volume_operations (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_volume_operations (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                          GeeLinkedList* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_port_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                  const gchar* value);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_port_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                         const gchar* value);
VALA_EXTERN const gchar* sway_notification_center_widgets_pulse_device_get_port_id (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_port_id (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                const gchar* value);
VALA_EXTERN gchar** sway_notification_center_widgets_pulse_device_get_port_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                         gint* result_length1);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_port_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                      gchar** value,
                                                                      gint value_length1);
static gchar** _vala_array_dup7 (gchar** self,
                          gssize length);
VALA_EXTERN GArray* sway_notification_center_widgets_pulse_device_get_profiles (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                 GArray* value);
VALA_EXTERN SwayNotificationCenterWidgetsPulseCardProfile* sway_notification_center_widgets_pulse_device_get_active_profile (SwayNotificationCenterWidgetsPulseDevice* self);
VALA_EXTERN void sway_notification_center_widgets_pulse_device_set_active_profile (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                       SwayNotificationCenterWidgetsPulseCardProfile* value);
static GObject * sway_notification_center_widgets_pulse_device_constructor (GType type,
                                                                     guint n_construct_properties,
                                                                     GObjectConstructParam * construct_properties);
static void sway_notification_center_widgets_pulse_device_finalize (GObject * obj);
static GType sway_notification_center_widgets_pulse_device_get_type_once (void);
static void _vala_sway_notification_center_widgets_pulse_device_get_property (GObject * object,
                                                                       guint property_id,
                                                                       GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_sway_notification_center_widgets_pulse_device_set_property (GObject * object,
                                                                       guint property_id,
                                                                       const GValue * value,
                                                                       GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
sway_notification_center_widgets_pulse_card_profile_get_instance_private (SwayNotificationCenterWidgetsPulseCardProfile* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsPulseCardProfile_private_offset);
}

SwayNotificationCenterWidgetsPulseCardProfile*
sway_notification_center_widgets_pulse_card_profile_construct (GType object_type,
                                                               pa_card_profile_info2* profile)
{
	SwayNotificationCenterWidgetsPulseCardProfile * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	self = (SwayNotificationCenterWidgetsPulseCardProfile*) g_object_new (object_type, NULL);
	_tmp0_ = (*profile).name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	_tmp2_ = (*profile).description;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->description);
	self->description = _tmp3_;
	self->n_sinks = (*profile).n_sinks;
	self->priority = (*profile).priority;
	self->priv->available = (*profile).available;
	return self;
}

SwayNotificationCenterWidgetsPulseCardProfile*
sway_notification_center_widgets_pulse_card_profile_new (pa_card_profile_info2* profile)
{
	return sway_notification_center_widgets_pulse_card_profile_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, profile);
}

gboolean
sway_notification_center_widgets_pulse_card_profile_cmp (SwayNotificationCenterWidgetsPulseCardProfile* self,
                                                         SwayNotificationCenterWidgetsPulseCardProfile* profile)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_CARD_PROFILE (self), FALSE);
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_CARD_PROFILE (profile), FALSE);
	_tmp4_ = profile->name;
	_tmp5_ = self->name;
	if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp6_ = profile->description;
		_tmp7_ = self->description;
		_tmp3_ = g_strcmp0 (_tmp6_, _tmp7_) == 0;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = profile->n_sinks == self->n_sinks;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = profile->priority == self->priority;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = profile->priv->available == self->priv->available;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_widgets_pulse_card_profile_class_init (SwayNotificationCenterWidgetsPulseCardProfileClass * klass,
                                                                gpointer klass_data)
{
	sway_notification_center_widgets_pulse_card_profile_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsPulseCardProfile_private_offset);
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_pulse_card_profile_finalize;
}

static void
sway_notification_center_widgets_pulse_card_profile_instance_init (SwayNotificationCenterWidgetsPulseCardProfile * self,
                                                                   gpointer klass)
{
	self->priv = sway_notification_center_widgets_pulse_card_profile_get_instance_private (self);
}

static void
sway_notification_center_widgets_pulse_card_profile_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsPulseCardProfile * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, SwayNotificationCenterWidgetsPulseCardProfile);
	_g_free0 (self->name);
	_g_free0 (self->description);
	G_OBJECT_CLASS (sway_notification_center_widgets_pulse_card_profile_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_pulse_card_profile_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsPulseCardProfileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_pulse_card_profile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsPulseCardProfile), 0, (GInstanceInitFunc) sway_notification_center_widgets_pulse_card_profile_instance_init, NULL };
	GType sway_notification_center_widgets_pulse_card_profile_type_id;
	sway_notification_center_widgets_pulse_card_profile_type_id = g_type_register_static (G_TYPE_OBJECT, "SwayNotificationCenterWidgetsPulseCardProfile", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsPulseCardProfile_private_offset = g_type_add_instance_private (sway_notification_center_widgets_pulse_card_profile_type_id, sizeof (SwayNotificationCenterWidgetsPulseCardProfilePrivate));
	return sway_notification_center_widgets_pulse_card_profile_type_id;
}

GType
sway_notification_center_widgets_pulse_card_profile_get_type (void)
{
	static gsize sway_notification_center_widgets_pulse_card_profile_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_pulse_card_profile_type_id__once)) {
		GType sway_notification_center_widgets_pulse_card_profile_type_id;
		sway_notification_center_widgets_pulse_card_profile_type_id = sway_notification_center_widgets_pulse_card_profile_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_pulse_card_profile_type_id__once, sway_notification_center_widgets_pulse_card_profile_type_id);
	}
	return sway_notification_center_widgets_pulse_card_profile_type_id__once;
}

static inline gpointer
sway_notification_center_widgets_pulse_device_get_instance_private (SwayNotificationCenterWidgetsPulseDevice* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsPulseDevice_private_offset);
}

/** Gets the name to be shown to the user:
         * "port_description - card_description"
         */
gchar*
sway_notification_center_widgets_pulse_device_get_display_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* _tmp0_;
	gchar* p_desc = NULL;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* c_desc = NULL;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_name;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = self->priv->_device_description;
		_tmp2_ = g_strdup (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = self->priv->_port_description;
	_tmp4_ = g_strdup (_tmp3_);
	p_desc = _tmp4_;
	_tmp5_ = self->priv->_card_description;
	_tmp6_ = g_strdup (_tmp5_);
	c_desc = _tmp6_;
	_tmp7_ = p_desc;
	_tmp8_ = c_desc;
	_tmp9_ = g_strdup_printf ("%s - %s", _tmp7_, _tmp8_);
	result = _tmp9_;
	_g_free0 (c_desc);
	_g_free0 (p_desc);
	return result;
}

/** Compares PulseDevices. Returns true if they're the same */
gboolean
sway_notification_center_widgets_pulse_device_cmp (SwayNotificationCenterWidgetsPulseDevice* self,
                                                   SwayNotificationCenterWidgetsPulseDevice* device)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	guint32 _tmp7_;
	guint32 _tmp8_;
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (device), FALSE);
	_tmp7_ = device->priv->_card_index;
	_tmp8_ = self->priv->_card_index;
	if (_tmp7_ == _tmp8_) {
		guint32 _tmp9_;
		guint32 _tmp10_;
		_tmp9_ = device->priv->_device_index;
		_tmp10_ = self->priv->_device_index;
		_tmp6_ = _tmp9_ == _tmp10_;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp11_ = device->priv->_device_name;
		_tmp12_ = self->priv->_device_name;
		_tmp5_ = g_strcmp0 (_tmp11_, _tmp12_) == 0;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp13_ = device->priv->_device_description;
		_tmp14_ = self->priv->_device_description;
		_tmp4_ = g_strcmp0 (_tmp13_, _tmp14_) == 0;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		gboolean _tmp15_;
		gboolean _tmp16_;
		_tmp15_ = device->priv->_is_default;
		_tmp16_ = self->priv->_is_default;
		_tmp3_ = _tmp15_ == _tmp16_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gboolean _tmp17_;
		gboolean _tmp18_;
		_tmp17_ = device->priv->_removed;
		_tmp18_ = self->priv->_removed;
		_tmp2_ = _tmp17_ == _tmp18_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		_tmp19_ = device->priv->_card_active_profile;
		_tmp20_ = self->priv->_card_active_profile;
		_tmp1_ = g_strcmp0 (_tmp19_, _tmp20_) == 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		_tmp21_ = device->priv->_port_name;
		_tmp22_ = self->priv->_port_name;
		_tmp0_ = g_strcmp0 (_tmp21_, _tmp22_) == 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

/**
         * Gets the name to be shown to the user:
         * If has card: "card_description:port_name"
         * If cardless: "device_index:device_description"
         */
gchar*
sway_notification_center_widgets_pulse_device_get_current_hash_key (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_name;
	if (_tmp0_ == NULL) {
		guint32 _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp1_ = self->priv->_device_index;
		_tmp2_ = g_strdup_printf ("%u", _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = self->priv->_device_description;
		_tmp5_ = sway_notification_center_widgets_pulse_device_get_hash_map_key (_tmp3_, _tmp4_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp3_);
		result = _tmp6_;
		return result;
	}
	_tmp7_ = self->priv->_card_description;
	_tmp8_ = self->priv->_port_name;
	_tmp9_ = sway_notification_center_widgets_pulse_device_get_hash_map_key (_tmp7_, _tmp8_);
	result = _tmp9_;
	return result;
}

/** Gets the name to be shown to the user:
         * "card_description:port_name"
         */
static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

gchar*
sway_notification_center_widgets_pulse_device_get_hash_map_key (const gchar* c_desc,
                                                                const gchar* p_name)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (c_desc != NULL, NULL);
	g_return_val_if_fail (p_name != NULL, NULL);
	_tmp0_ = g_strdup (c_desc);
	_tmp1_ = g_strdup (p_name);
	_tmp2_ = g_new0 (gchar*, 2 + 1);
	_tmp2_[0] = _tmp0_;
	_tmp2_[1] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 2;
	_tmp4_ = _vala_g_strjoinv (":", _tmp3_, (gint) 2);
	_tmp5_ = _tmp4_;
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp5_;
	return result;
}

SwayNotificationCenterWidgetsPulseDevice*
sway_notification_center_widgets_pulse_device_construct (GType object_type)
{
	SwayNotificationCenterWidgetsPulseDevice * self = NULL;
	self = (SwayNotificationCenterWidgetsPulseDevice*) g_object_new (object_type, NULL);
	return self;
}

SwayNotificationCenterWidgetsPulseDevice*
sway_notification_center_widgets_pulse_device_new (void)
{
	return sway_notification_center_widgets_pulse_device_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE);
}

gboolean
sway_notification_center_widgets_pulse_device_get_removed (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_removed;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_removed (SwayNotificationCenterWidgetsPulseDevice* self,
                                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_removed (self);
	if (old_value != value) {
		self->priv->_removed = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY]);
	}
}

gboolean
sway_notification_center_widgets_pulse_device_get_has_card (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_has_card;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_has_card (SwayNotificationCenterWidgetsPulseDevice* self,
                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_has_card (self);
	if (old_value != value) {
		self->priv->_has_card = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY]);
	}
}

guint32
sway_notification_center_widgets_pulse_device_get_card_index (SwayNotificationCenterWidgetsPulseDevice* self)
{
	guint32 result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), 0U);
	result = self->priv->_card_index;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_card_index (SwayNotificationCenterWidgetsPulseDevice* self,
                                                              guint32 value)
{
	guint32 old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_card_index (self);
	if (old_value != value) {
		self->priv->_card_index = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY]);
	}
}

guint32
sway_notification_center_widgets_pulse_device_get_device_index (SwayNotificationCenterWidgetsPulseDevice* self)
{
	guint32 result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), 0U);
	result = self->priv->_device_index;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_device_index (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                guint32 value)
{
	guint32 old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_device_index (self);
	if (old_value != value) {
		self->priv->_device_index = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY]);
	}
}

pa_direction_t
sway_notification_center_widgets_pulse_device_get_direction (SwayNotificationCenterWidgetsPulseDevice* self)
{
	pa_direction_t result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), 0U);
	result = self->priv->_direction;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_direction (SwayNotificationCenterWidgetsPulseDevice* self,
                                                             pa_direction_t value)
{
	pa_direction_t old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_direction (self);
	if (old_value != value) {
		self->priv->_direction = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY]);
	}
}

gboolean
sway_notification_center_widgets_pulse_device_get_is_default (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_is_default;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_is_default (SwayNotificationCenterWidgetsPulseDevice* self,
                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_is_default (self);
	if (old_value != value) {
		self->priv->_is_default = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY]);
	}
}

gboolean
sway_notification_center_widgets_pulse_device_get_is_virtual (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_is_virtual;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_is_virtual (SwayNotificationCenterWidgetsPulseDevice* self,
                                                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_is_virtual (self);
	if (old_value != value) {
		self->priv->_is_virtual = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY]);
	}
}

gboolean
sway_notification_center_widgets_pulse_device_get_is_bluetooth (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_is_bluetooth;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_is_bluetooth (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_is_bluetooth (self);
	if (old_value != value) {
		self->priv->_is_bluetooth = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_icon_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_icon_name;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_icon_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_icon_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_icon_name);
		self->priv->_icon_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_card_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_name;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_card_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_card_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_card_name);
		self->priv->_card_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_card_description (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_description;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_card_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_card_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_card_description);
		self->priv->_card_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_card_active_profile (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_active_profile;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_card_active_profile (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_card_active_profile (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_card_active_profile);
		self->priv->_card_active_profile = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_card_sink_port_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_card_sink_port_name;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_card_sink_port_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_card_sink_port_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_card_sink_port_name);
		self->priv->_card_sink_port_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_device_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_device_name;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_device_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_device_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_device_name);
		self->priv->_device_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_device_description (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_device_description;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_device_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_device_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_device_description);
		self->priv->_device_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY]);
	}
}

gboolean
sway_notification_center_widgets_pulse_device_get_is_muted (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gboolean result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), FALSE);
	result = self->priv->_is_muted;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_is_muted (SwayNotificationCenterWidgetsPulseDevice* self,
                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_is_muted (self);
	if (old_value != value) {
		self->priv->_is_muted = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY]);
	}
}

gdouble
sway_notification_center_widgets_pulse_device_get_volume (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gdouble result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), 0.0);
	result = self->priv->_volume;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_volume (SwayNotificationCenterWidgetsPulseDevice* self,
                                                          gdouble value)
{
	gdouble old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_volume (self);
	if (old_value != value) {
		self->priv->_volume = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY]);
	}
}

gfloat
sway_notification_center_widgets_pulse_device_get_balance (SwayNotificationCenterWidgetsPulseDevice* self)
{
	gfloat result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), 0.0F);
	result = self->priv->_balance;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_balance (SwayNotificationCenterWidgetsPulseDevice* self,
                                                           gfloat value)
{
	gfloat old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_balance (self);
	if (old_value != value) {
		self->priv->_balance = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY]);
	}
}

GeeLinkedList*
sway_notification_center_widgets_pulse_device_get_volume_operations (SwayNotificationCenterWidgetsPulseDevice* self)
{
	GeeLinkedList* result;
	GeeLinkedList* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_volume_operations;
	result = _tmp0_;
	return result;
}

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

void
sway_notification_center_widgets_pulse_device_set_volume_operations (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                     GeeLinkedList* value)
{
	GeeLinkedList* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_volume_operations (self);
	if (old_value != value) {
		GeeLinkedList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_volume_operations);
		self->priv->_volume_operations = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_port_name (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_port_name;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_port_name (SwayNotificationCenterWidgetsPulseDevice* self,
                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_port_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_port_name);
		self->priv->_port_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_port_description (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_port_description;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_port_description (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_port_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_port_description);
		self->priv->_port_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_pulse_device_get_port_id (SwayNotificationCenterWidgetsPulseDevice* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_port_id;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_port_id (SwayNotificationCenterWidgetsPulseDevice* self,
                                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_port_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_port_id);
		self->priv->_port_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY]);
	}
}

gchar**
sway_notification_center_widgets_pulse_device_get_port_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                 gint* result_length1)
{
	gchar** result;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_port_profiles;
	_tmp0__length1 = self->priv->_port_profiles_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static gchar**
_vala_array_dup7 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

void
sway_notification_center_widgets_pulse_device_set_port_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                 gchar** value,
                                                                 gint value_length1)
{
	gchar** old_value;
	gint old_value_length;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_port_profiles (self, &old_value_length);
	if (old_value != value) {
		gchar** _tmp0_;
		gint _tmp0__length1;
		_tmp0_ = (value != NULL) ? _vala_array_dup7 (value, value_length1) : value;
		_tmp0__length1 = value_length1;
		self->priv->_port_profiles = (_vala_array_free (self->priv->_port_profiles, self->priv->_port_profiles_length1, (GDestroyNotify) g_free), NULL);
		self->priv->_port_profiles = _tmp0_;
		self->priv->_port_profiles_length1 = _tmp0__length1;
		self->priv->__port_profiles_size_ = self->priv->_port_profiles_length1;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY]);
	}
}

GArray*
sway_notification_center_widgets_pulse_device_get_profiles (SwayNotificationCenterWidgetsPulseDevice* self)
{
	GArray* result;
	GArray* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_profiles;
	result = _tmp0_;
	return result;
}

static gpointer
_g_array_ref0 (gpointer self)
{
	return self ? g_array_ref (self) : NULL;
}

void
sway_notification_center_widgets_pulse_device_set_profiles (SwayNotificationCenterWidgetsPulseDevice* self,
                                                            GArray* value)
{
	GArray* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_profiles (self);
	if (old_value != value) {
		GArray* _tmp0_;
		_tmp0_ = _g_array_ref0 (value);
		_g_array_unref0 (self->priv->_profiles);
		self->priv->_profiles = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY]);
	}
}

SwayNotificationCenterWidgetsPulseCardProfile*
sway_notification_center_widgets_pulse_device_get_active_profile (SwayNotificationCenterWidgetsPulseDevice* self)
{
	SwayNotificationCenterWidgetsPulseCardProfile* result;
	SwayNotificationCenterWidgetsPulseCardProfile* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self), NULL);
	_tmp0_ = self->priv->_active_profile;
	result = _tmp0_;
	return result;
}

void
sway_notification_center_widgets_pulse_device_set_active_profile (SwayNotificationCenterWidgetsPulseDevice* self,
                                                                  SwayNotificationCenterWidgetsPulseCardProfile* value)
{
	SwayNotificationCenterWidgetsPulseCardProfile* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_PULSE_DEVICE (self));
	old_value = sway_notification_center_widgets_pulse_device_get_active_profile (self);
	if (old_value != value) {
		SwayNotificationCenterWidgetsPulseCardProfile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_active_profile);
		self->priv->_active_profile = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY]);
	}
}

static GObject *
sway_notification_center_widgets_pulse_device_constructor (GType type,
                                                           guint n_construct_properties,
                                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SwayNotificationCenterWidgetsPulseDevice * self;
	GeeLinkedList* _tmp0_;
	GeeLinkedList* _tmp1_;
	parent_class = G_OBJECT_CLASS (sway_notification_center_widgets_pulse_device_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDevice);
	_tmp0_ = gee_linked_list_new (G_TYPE_POINTER, (GBoxedCopyFunc) pa_operation_ref, (GDestroyNotify) pa_operation_unref, NULL, NULL, NULL);
	if (_tmp0_) {
		g_object_set_data ((GObject *) _tmp0_, "vala-creation-function", "");
	}
	_tmp1_ = _tmp0_;
	sway_notification_center_widgets_pulse_device_set_volume_operations (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return obj;
}

static void
sway_notification_center_widgets_pulse_device_class_init (SwayNotificationCenterWidgetsPulseDeviceClass * klass,
                                                          gpointer klass_data)
{
	sway_notification_center_widgets_pulse_device_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsPulseDevice_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_pulse_device_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_sway_notification_center_widgets_pulse_device_set_property;
	G_OBJECT_CLASS (klass)->constructor = sway_notification_center_widgets_pulse_device_constructor;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_pulse_device_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY] = g_param_spec_boolean ("removed", "removed", "removed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY] = g_param_spec_boolean ("has-card", "has-card", "has-card", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The card index: ex. `Card #49` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY] = g_param_spec_uint ("card-index", "card-index", "card-index", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** Sink index: ex. `Sink #55` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY] = g_param_spec_uint ("device-index", "device-index", "device-index", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** Input or Output */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY] = g_param_spec_uint ("direction", "direction", "direction", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** Is default Sink */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY] = g_param_spec_boolean ("is-default", "is-default", "is-default", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** If the device is virtual */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY] = g_param_spec_boolean ("is-virtual", "is-virtual", "is-virtual", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** If the device is a bluetooth device */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY] = g_param_spec_boolean ("is-bluetooth", "is-bluetooth", "is-bluetooth", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The icon name: `device.icon_name` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY] = g_param_spec_string ("icon-name", "icon-name", "icon-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The card name: `Name` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY] = g_param_spec_string ("card-name", "card-name", "card-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The card description: `device.description` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY] = g_param_spec_string ("card-description", "card-description", "card-description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The card active profile: `Active Profile` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY] = g_param_spec_string ("card-active-profile", "card-active-profile", "card-active-profile", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The card sink port name: `Active Port` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY] = g_param_spec_string ("card-sink-port-name", "card-sink-port-name", "card-sink-port-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The Sink name: `Name` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY] = g_param_spec_string ("device-name", "device-name", "device-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The Sink description: `Description` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY] = g_param_spec_string ("device-description", "device-description", "device-description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** If the Sink is muted: `Mute` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY] = g_param_spec_boolean ("is-muted", "is-muted", "is-muted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY] = g_param_spec_double ("volume", "volume", "volume", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY] = g_param_spec_float ("balance", "balance", "balance", -G_MAXFLOAT, G_MAXFLOAT, (gfloat) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY] = g_param_spec_object ("volume-operations", "volume-operations", "volume-operations", GEE_TYPE_LINKED_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The port name: `Name` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY] = g_param_spec_string ("port-name", "port-name", "port-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The port name: `Description` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY] = g_param_spec_string ("port-description", "port-description", "port-description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** The port name: `card.profile.port` */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY] = g_param_spec_string ("port-id", "port-id", "port-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	/** All port profiles */
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY] = g_param_spec_boxed ("port-profiles", "port-profiles", "port-profiles", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY] = g_param_spec_boxed ("profiles", "profiles", "profiles", G_TYPE_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY, sway_notification_center_widgets_pulse_device_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY] = g_param_spec_object ("active-profile", "active-profile", "active-profile", SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_CARD_PROFILE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
sway_notification_center_widgets_pulse_device_instance_init (SwayNotificationCenterWidgetsPulseDevice * self,
                                                             gpointer klass)
{
	self->priv = sway_notification_center_widgets_pulse_device_get_instance_private (self);
	self->priv->_removed = FALSE;
	self->priv->_has_card = TRUE;
	self->priv->_is_virtual = FALSE;
	self->priv->_is_bluetooth = FALSE;
	self->priv->_balance = (gfloat) 0;
}

static void
sway_notification_center_widgets_pulse_device_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsPulseDevice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDevice);
	_g_free0 (self->priv->_icon_name);
	_g_free0 (self->priv->_card_name);
	_g_free0 (self->priv->_card_description);
	_g_free0 (self->priv->_card_active_profile);
	_g_free0 (self->priv->_card_sink_port_name);
	_g_free0 (self->priv->_device_name);
	_g_free0 (self->priv->_device_description);
	_g_object_unref0 (self->priv->_volume_operations);
	_g_free0 (self->priv->_port_name);
	_g_free0 (self->priv->_port_description);
	_g_free0 (self->priv->_port_id);
	self->priv->_port_profiles = (_vala_array_free (self->priv->_port_profiles, self->priv->_port_profiles_length1, (GDestroyNotify) g_free), NULL);
	_g_array_unref0 (self->priv->_profiles);
	_g_object_unref0 (self->priv->_active_profile);
	G_OBJECT_CLASS (sway_notification_center_widgets_pulse_device_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_pulse_device_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsPulseDeviceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_pulse_device_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsPulseDevice), 0, (GInstanceInitFunc) sway_notification_center_widgets_pulse_device_instance_init, NULL };
	GType sway_notification_center_widgets_pulse_device_type_id;
	sway_notification_center_widgets_pulse_device_type_id = g_type_register_static (G_TYPE_OBJECT, "SwayNotificationCenterWidgetsPulseDevice", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsPulseDevice_private_offset = g_type_add_instance_private (sway_notification_center_widgets_pulse_device_type_id, sizeof (SwayNotificationCenterWidgetsPulseDevicePrivate));
	return sway_notification_center_widgets_pulse_device_type_id;
}

GType
sway_notification_center_widgets_pulse_device_get_type (void)
{
	static gsize sway_notification_center_widgets_pulse_device_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_pulse_device_type_id__once)) {
		GType sway_notification_center_widgets_pulse_device_type_id;
		sway_notification_center_widgets_pulse_device_type_id = sway_notification_center_widgets_pulse_device_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_pulse_device_type_id__once, sway_notification_center_widgets_pulse_device_type_id);
	}
	return sway_notification_center_widgets_pulse_device_type_id__once;
}

static void
_vala_sway_notification_center_widgets_pulse_device_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsPulseDevice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDevice);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_removed (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_has_card (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY:
		g_value_set_uint (value, sway_notification_center_widgets_pulse_device_get_card_index (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY:
		g_value_set_uint (value, sway_notification_center_widgets_pulse_device_get_device_index (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY:
		g_value_set_uint (value, sway_notification_center_widgets_pulse_device_get_direction (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_is_default (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_is_virtual (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_is_bluetooth (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_icon_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_card_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_card_description (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_card_active_profile (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_card_sink_port_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_device_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_device_description (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY:
		g_value_set_boolean (value, sway_notification_center_widgets_pulse_device_get_is_muted (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY:
		g_value_set_double (value, sway_notification_center_widgets_pulse_device_get_volume (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY:
		g_value_set_float (value, sway_notification_center_widgets_pulse_device_get_balance (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY:
		g_value_set_object (value, sway_notification_center_widgets_pulse_device_get_volume_operations (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_port_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_port_description (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_pulse_device_get_port_id (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, sway_notification_center_widgets_pulse_device_get_port_profiles (self, &length));
		}
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY:
		g_value_set_boxed (value, sway_notification_center_widgets_pulse_device_get_profiles (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY:
		g_value_set_object (value, sway_notification_center_widgets_pulse_device_get_active_profile (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_sway_notification_center_widgets_pulse_device_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsPulseDevice * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_PULSE_DEVICE, SwayNotificationCenterWidgetsPulseDevice);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_REMOVED_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_removed (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_HAS_CARD_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_has_card (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_INDEX_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_card_index (self, g_value_get_uint (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_INDEX_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_device_index (self, g_value_get_uint (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DIRECTION_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_direction (self, g_value_get_uint (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_DEFAULT_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_is_default (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_VIRTUAL_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_is_virtual (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_BLUETOOTH_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_is_bluetooth (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ICON_NAME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_icon_name (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_NAME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_card_name (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_DESCRIPTION_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_card_description (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_ACTIVE_PROFILE_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_card_active_profile (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_CARD_SINK_PORT_NAME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_card_sink_port_name (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_NAME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_device_name (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_DEVICE_DESCRIPTION_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_device_description (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_IS_MUTED_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_is_muted (self, g_value_get_boolean (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_volume (self, g_value_get_double (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_BALANCE_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_balance (self, g_value_get_float (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_VOLUME_OPERATIONS_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_volume_operations (self, g_value_get_object (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_NAME_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_port_name (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_DESCRIPTION_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_port_description (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_ID_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_port_id (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PORT_PROFILES_PROPERTY:
		{
			gpointer boxed;
			boxed = g_value_get_boxed (value);
			sway_notification_center_widgets_pulse_device_set_port_profiles (self, boxed, (boxed == NULL) ? 0 : g_strv_length (boxed));
		}
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_PROFILES_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_profiles (self, g_value_get_boxed (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_PULSE_DEVICE_ACTIVE_PROFILE_PROPERTY:
		sway_notification_center_widgets_pulse_device_set_active_profile (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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);
}

