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

/*
 * This file is part of budgie-desktop
 *
 * Copyright Budgie Desktop Developers
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>

#define BUDGIE_STATUS_NOTIFIER_WATCHER_FREEDESKTOP_DBUS_NAME "org.freedesktop.StatusNotifierWatcher"
#define BUDGIE_STATUS_NOTIFIER_WATCHER_KDE_DBUS_NAME "org.kde.StatusNotifierWatcher"
#define BUDGIE_STATUS_NOTIFIER_WATCHER_FREEDESKTOP_DBUS_OBJECT_PATH "/org/freedesktop/StatusNotifierWatcher"
#define BUDGIE_STATUS_NOTIFIER_WATCHER_KDE_DBUS_OBJECT_PATH "/org/kde/StatusNotifierWatcher"
#define BUDGIE_STATUS_NOTIFIER_WATCHER_BASIC_DBUS_OBJECT_PATH "/StatusNotifierWatcher"
#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 BUDGIE_STATUS_NOTIFIER_TYPE_DBUS_SERVICE_INFO (budgie_status_notifier_dbus_service_info_get_type ())
typedef struct _BudgieStatusNotifierDBusServiceInfo BudgieStatusNotifierDBusServiceInfo;
#define _g_free0(var) (var = (g_free (var), NULL))

#define BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER (budgie_status_notifier_freedesktop_watcher_get_type ())
#define BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcher))
#define BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcherClass))
#define BUDGIE_STATUS_NOTIFIER_IS_FREEDESKTOP_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER))
#define BUDGIE_STATUS_NOTIFIER_IS_FREEDESKTOP_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER))
#define BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcherClass))

typedef struct _BudgieStatusNotifierFreedesktopWatcher BudgieStatusNotifierFreedesktopWatcher;
typedef struct _BudgieStatusNotifierFreedesktopWatcherClass BudgieStatusNotifierFreedesktopWatcherClass;
typedef struct _BudgieStatusNotifierFreedesktopWatcherPrivate BudgieStatusNotifierFreedesktopWatcherPrivate;

#define BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER (budgie_status_notifier_kde_watcher_get_type ())
#define BUDGIE_STATUS_NOTIFIER_KDE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, BudgieStatusNotifierKdeWatcher))
#define BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, BudgieStatusNotifierKdeWatcherClass))
#define BUDGIE_STATUS_NOTIFIER_IS_KDE_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER))
#define BUDGIE_STATUS_NOTIFIER_IS_KDE_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER))
#define BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, BudgieStatusNotifierKdeWatcherClass))

typedef struct _BudgieStatusNotifierKdeWatcher BudgieStatusNotifierKdeWatcher;
typedef struct _BudgieStatusNotifierKdeWatcherClass BudgieStatusNotifierKdeWatcherClass;
enum  {
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_0_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_NUM_PROPERTIES
};
static GParamSpec* budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _Block8Data Block8Data;
typedef struct _Block9Data Block9Data;
enum  {
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_BUDGIE_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_BUDGIE_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_NUM_SIGNALS
};
static guint budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_NUM_SIGNALS] = {0};
typedef struct _BudgieStatusNotifierKdeWatcherPrivate BudgieStatusNotifierKdeWatcherPrivate;
enum  {
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_0_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_PROTOCOL_VERSION_PROPERTY,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_NUM_PROPERTIES
};
static GParamSpec* budgie_status_notifier_kde_watcher_properties[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_NUM_PROPERTIES];
enum  {
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL,
	BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_NUM_SIGNALS
};
static guint budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_NUM_SIGNALS] = {0};

struct _BudgieStatusNotifierDBusServiceInfo {
	gchar* name;
	gchar* object_path;
	gchar* sender;
	gchar* owner;
};

struct _BudgieStatusNotifierFreedesktopWatcher {
	GObject parent_instance;
	BudgieStatusNotifierFreedesktopWatcherPrivate * priv;
};

struct _BudgieStatusNotifierFreedesktopWatcherClass {
	GObjectClass parent_class;
};

struct _BudgieStatusNotifierFreedesktopWatcherPrivate {
	gboolean _is_status_notifier_host_registered;
	gint32 _protocol_version;
	BudgieStatusNotifierKdeWatcher* kde_watcher;
	guint freedesktop_dbus_identifier;
	guint host_dbus_identifier;
	GHashTable* host_services;
	GHashTable* item_watchers;
	GHashTable* registered_services;
};

struct _Block8Data {
	int _ref_count_;
	BudgieStatusNotifierFreedesktopWatcher* self;
	gchar* object_path;
	gchar* sender_str;
	gchar* service;
};

struct _Block9Data {
	int _ref_count_;
	BudgieStatusNotifierFreedesktopWatcher* self;
	gchar* service;
};

struct _BudgieStatusNotifierKdeWatcher {
	GObject parent_instance;
	BudgieStatusNotifierKdeWatcherPrivate * priv;
};

struct _BudgieStatusNotifierKdeWatcherClass {
	GObjectClass parent_class;
};

struct _BudgieStatusNotifierKdeWatcherPrivate {
	BudgieStatusNotifierFreedesktopWatcher* parent;
	guint kde_dbus_identifier;
};

static gint BudgieStatusNotifierFreedesktopWatcher_private_offset;
static gpointer budgie_status_notifier_freedesktop_watcher_parent_class = NULL;
static gint BudgieStatusNotifierKdeWatcher_private_offset;
static gpointer budgie_status_notifier_kde_watcher_parent_class = NULL;

VALA_EXTERN GType budgie_status_notifier_dbus_service_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BudgieStatusNotifierDBusServiceInfo* budgie_status_notifier_dbus_service_info_dup (const BudgieStatusNotifierDBusServiceInfo* self);
VALA_EXTERN void budgie_status_notifier_dbus_service_info_free (BudgieStatusNotifierDBusServiceInfo* self);
VALA_EXTERN void budgie_status_notifier_dbus_service_info_copy (const BudgieStatusNotifierDBusServiceInfo* self,
                                                    BudgieStatusNotifierDBusServiceInfo* dest);
VALA_EXTERN void budgie_status_notifier_dbus_service_info_destroy (BudgieStatusNotifierDBusServiceInfo* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (BudgieStatusNotifierDBusServiceInfo, budgie_status_notifier_dbus_service_info_destroy)
VALA_EXTERN GType budgie_status_notifier_freedesktop_watcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieStatusNotifierFreedesktopWatcher, g_object_unref)
VALA_EXTERN guint budgie_status_notifier_freedesktop_watcher_register_object (void* object,
                                                                  GDBusConnection* connection,
                                                                  const gchar* path,
                                                                  GError** error);
VALA_EXTERN GType budgie_status_notifier_kde_watcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BudgieStatusNotifierKdeWatcher, g_object_unref)
VALA_EXTERN guint budgie_status_notifier_kde_watcher_register_object (void* object,
                                                          GDBusConnection* connection,
                                                          const gchar* path,
                                                          GError** error);
static void budgie_status_notifier_freedesktop_watcher_on_dbus_acquired (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                  GDBusConnection* conn);
VALA_EXTERN void budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                               const gchar* service,
                                                                               GError** error);
VALA_EXTERN void budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                               const gchar* service,
                                                                               const char* sender,
                                                                               GError** error);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void __lambda36_ (Block8Data* _data8_,
                  GDBusConnection* conn,
                  const gchar* name,
                  const gchar* owner);
static void ___lambda36__gbus_name_appeared_callback (GDBusConnection* connection,
                                               const gchar* name,
                                               const gchar* name_owner,
                                               gpointer self);
static void __lambda37_ (Block8Data* _data8_,
                  GDBusConnection* conn,
                  const gchar* name);
static void ___lambda37__gbus_name_vanished_callback (GDBusConnection* connection,
                                               const gchar* name,
                                               gpointer self);
static Block9Data* block9_data_ref (Block9Data* _data9_);
static void block9_data_unref (void * _userdata_);
static void __lambda38_ (Block9Data* _data9_,
                  GDBusConnection* conn,
                  const gchar* name,
                  const gchar* owner);
static void budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                        gboolean value);
static void ___lambda38__gbus_name_appeared_callback (GDBusConnection* connection,
                                               const gchar* name,
                                               const gchar* name_owner,
                                               gpointer self);
static void __lambda39_ (Block9Data* _data9_,
                  GDBusConnection* conn,
                  const gchar* name);
static void ___lambda39__gbus_name_vanished_callback (GDBusConnection* connection,
                                               const gchar* name,
                                               gpointer self);
VALA_EXTERN BudgieStatusNotifierDBusServiceInfo* budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                                                                 gint* result_length1,
                                                                                                                                 GError** error);
static void _vala_array_add2 (BudgieStatusNotifierDBusServiceInfo* * array,
                       gint* length,
                       gint* size,
                       const BudgieStatusNotifierDBusServiceInfo* value);
VALA_EXTERN BudgieStatusNotifierFreedesktopWatcher* budgie_status_notifier_freedesktop_watcher_new (void);
VALA_EXTERN BudgieStatusNotifierFreedesktopWatcher* budgie_status_notifier_freedesktop_watcher_construct (GType object_type);
VALA_EXTERN gboolean budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self);
VALA_EXTERN gint32 budgie_status_notifier_freedesktop_watcher_get_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self);
static void budgie_status_notifier_freedesktop_watcher_set_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                      gint32 value);
VALA_EXTERN gchar** budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                         gint* result_length1);
static void _vala_array_add3 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void g_cclosure_user_marshal_BOOLEAN__STRING (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static void g_cclosure_user_marshal_BOOLEAN__VOID (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING (GClosure * closure,
                                                                GValue * return_value,
                                                                guint n_param_values,
                                                                const GValue * param_values,
                                                                gpointer invocation_hint,
                                                                gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static GObject * budgie_status_notifier_freedesktop_watcher_constructor (GType type,
                                                                  guint n_construct_properties,
                                                                  GObjectConstructParam * construct_properties);
static void _g_free0_ (gpointer var);
static void _budgie_status_notifier_dbus_service_info_free0_ (gpointer var);
static void _budgie_status_notifier_freedesktop_watcher___lambda40_ (BudgieStatusNotifierFreedesktopWatcher* self,
                                                              GDBusConnection* conn,
                                                              const gchar* name);
static void _budgie_status_notifier_freedesktop_watcher_on_dbus_acquired_gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                               const gchar* name,
                                                                                               gpointer self);
static void __budgie_status_notifier_freedesktop_watcher___lambda40__gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                           const gchar* name,
                                                                                           gpointer self);
VALA_EXTERN BudgieStatusNotifierKdeWatcher* budgie_status_notifier_kde_watcher_new (BudgieStatusNotifierFreedesktopWatcher* parent);
VALA_EXTERN BudgieStatusNotifierKdeWatcher* budgie_status_notifier_kde_watcher_construct (GType object_type,
                                                                              BudgieStatusNotifierFreedesktopWatcher* parent);
static void budgie_status_notifier_freedesktop_watcher_finalize (GObject * obj);
static GType budgie_status_notifier_freedesktop_watcher_get_type_once (void);
static void _vala_budgie_status_notifier_freedesktop_watcher_get_property (GObject * object,
                                                                    guint property_id,
                                                                    GValue * value,
                                                                    GParamSpec * pspec);
static void _vala_budgie_status_notifier_freedesktop_watcher_set_property (GObject * object,
                                                                    guint property_id,
                                                                    const GValue * value,
                                                                    GParamSpec * pspec);
static void _dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                     GVariant* _parameters_,
                                                                                     GDBusMethodInvocation* invocation);
static void _dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                     GVariant* _parameters_,
                                                                                     GDBusMethodInvocation* invocation);
static void _vala_BudgieStatusNotifierDBusServiceInfo_array_free (BudgieStatusNotifierDBusServiceInfo * array,
                                                           gssize array_length);
static void _dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                                       GVariant* _parameters_,
                                                                                                       GDBusMethodInvocation* invocation);
static void budgie_status_notifier_freedesktop_watcher_dbus_interface_method_call (GDBusConnection* connection,
                                                                            const gchar* sender,
                                                                            const gchar* object_path,
                                                                            const gchar* interface_name,
                                                                            const gchar* method_name,
                                                                            GVariant* parameters,
                                                                            GDBusMethodInvocation* invocation,
                                                                            gpointer user_data);
static GVariant* budgie_status_notifier_freedesktop_watcher_dbus_interface_get_property (GDBusConnection* connection,
                                                                                  const gchar* sender,
                                                                                  const gchar* object_path,
                                                                                  const gchar* interface_name,
                                                                                  const gchar* property_name,
                                                                                  GError** error,
                                                                                  gpointer user_data);
static GVariant* _dbus_budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self);
static GVariant* _dbus_budgie_status_notifier_freedesktop_watcher_get_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self);
static GVariant* _dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (BudgieStatusNotifierFreedesktopWatcher* self);
static gboolean budgie_status_notifier_freedesktop_watcher_dbus_interface_set_property (GDBusConnection* connection,
                                                                                 const gchar* sender,
                                                                                 const gchar* object_path,
                                                                                 const gchar* interface_name,
                                                                                 const gchar* property_name,
                                                                                 GVariant* value,
                                                                                 GError** error,
                                                                                 gpointer user_data);
static void _dbus_budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                              GVariant* _value);
static void _dbus_budgie_status_notifier_freedesktop_watcher_set_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                            GVariant* _value);
static void _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered (GObject* _sender,
                                                                                       const gchar* item,
                                                                                       gpointer* _data);
static void _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered (GObject* _sender,
                                                                                         const gchar* item,
                                                                                         gpointer* _data);
static void _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered (GObject* _sender,
                                                                                       gpointer* _data);
static void _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered_budgie (GObject* _sender,
                                                                                              const gchar* name,
                                                                                              const gchar* object_path,
                                                                                              const gchar* sender,
                                                                                              const gchar* owner,
                                                                                              gpointer* _data);
static void _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered_budgie (GObject* _sender,
                                                                                                const gchar* name,
                                                                                                const gchar* object_path,
                                                                                                const gchar* owner,
                                                                                                gpointer* _data);
static void _budgie_status_notifier_freedesktop_watcher_unregister_object (gpointer user_data);
static gboolean __lambda33_ (BudgieStatusNotifierKdeWatcher* self,
                      const gchar* item);
static gboolean ___lambda33__budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                                  const gchar* item,
                                                                                                  gpointer self);
static gboolean __lambda34_ (BudgieStatusNotifierKdeWatcher* self,
                      const gchar* item);
static gboolean ___lambda34__budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                                    const gchar* item,
                                                                                                    gpointer self);
static gboolean __lambda35_ (BudgieStatusNotifierKdeWatcher* self);
static gboolean ___lambda35__budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                                  gpointer self);
static void budgie_status_notifier_kde_watcher_on_dbus_acquired (BudgieStatusNotifierKdeWatcher* self,
                                                          GDBusConnection* conn);
static void _budgie_status_notifier_kde_watcher_on_dbus_acquired_gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                       const gchar* name,
                                                                                       gpointer self);
VALA_EXTERN void budgie_status_notifier_kde_watcher_register_status_notifier_item (BudgieStatusNotifierKdeWatcher* self,
                                                                       const gchar* service,
                                                                       const char* sender,
                                                                       GError** error);
VALA_EXTERN void budgie_status_notifier_kde_watcher_register_status_notifier_host (BudgieStatusNotifierKdeWatcher* self,
                                                                       const gchar* service,
                                                                       GError** error);
VALA_EXTERN gchar** budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (BudgieStatusNotifierKdeWatcher* self,
                                                                                 gint* result_length1);
VALA_EXTERN gboolean budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierKdeWatcher* self);
VALA_EXTERN gint32 budgie_status_notifier_kde_watcher_get_protocol_version (BudgieStatusNotifierKdeWatcher* self);
static void budgie_status_notifier_kde_watcher_finalize (GObject * obj);
static GType budgie_status_notifier_kde_watcher_get_type_once (void);
static void _vala_budgie_status_notifier_kde_watcher_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _dbus_budgie_status_notifier_kde_watcher_register_status_notifier_item (BudgieStatusNotifierKdeWatcher* self,
                                                                             GVariant* _parameters_,
                                                                             GDBusMethodInvocation* invocation);
static void _dbus_budgie_status_notifier_kde_watcher_register_status_notifier_host (BudgieStatusNotifierKdeWatcher* self,
                                                                             GVariant* _parameters_,
                                                                             GDBusMethodInvocation* invocation);
static void budgie_status_notifier_kde_watcher_dbus_interface_method_call (GDBusConnection* connection,
                                                                    const gchar* sender,
                                                                    const gchar* object_path,
                                                                    const gchar* interface_name,
                                                                    const gchar* method_name,
                                                                    GVariant* parameters,
                                                                    GDBusMethodInvocation* invocation,
                                                                    gpointer user_data);
static GVariant* budgie_status_notifier_kde_watcher_dbus_interface_get_property (GDBusConnection* connection,
                                                                          const gchar* sender,
                                                                          const gchar* object_path,
                                                                          const gchar* interface_name,
                                                                          const gchar* property_name,
                                                                          GError** error,
                                                                          gpointer user_data);
static GVariant* _dbus_budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (BudgieStatusNotifierKdeWatcher* self);
static GVariant* _dbus_budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierKdeWatcher* self);
static GVariant* _dbus_budgie_status_notifier_kde_watcher_get_protocol_version (BudgieStatusNotifierKdeWatcher* self);
static gboolean budgie_status_notifier_kde_watcher_dbus_interface_set_property (GDBusConnection* connection,
                                                                         const gchar* sender,
                                                                         const gchar* object_path,
                                                                         const gchar* interface_name,
                                                                         const gchar* property_name,
                                                                         GVariant* value,
                                                                         GError** error,
                                                                         gpointer user_data);
static void _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_registered (GObject* _sender,
                                                                               const gchar* item,
                                                                               gpointer* _data);
static void _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_unregistered (GObject* _sender,
                                                                                 const gchar* item,
                                                                                 gpointer* _data);
static void _dbus_budgie_status_notifier_kde_watcher_status_notifier_host_registered (GObject* _sender,
                                                                               gpointer* _data);
static void _budgie_status_notifier_kde_watcher_unregister_object (gpointer user_data);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_in[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_service, NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_out[] = {NULL};
static const GDBusMethodInfo _budgie_status_notifier_freedesktop_watcher_dbus_method_info_register_status_notifier_item = {-1, "RegisterStatusNotifierItem", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_in), (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_item_out), NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_in[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_service, NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_out[] = {NULL};
static const GDBusMethodInfo _budgie_status_notifier_freedesktop_watcher_dbus_method_info_register_status_notifier_host = {-1, "RegisterStatusNotifierHost", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_in), (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_register_status_notifier_host_out), NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_result = {-1, "result", "a(ssss)", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_in[] = {NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_out[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_result, NULL};
static const GDBusMethodInfo _budgie_status_notifier_freedesktop_watcher_dbus_method_info_get_registered_status_notifier_pathnames_budgie = {-1, "GetRegisteredStatusNotifierPathnamesBudgie", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_in), (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_get_registered_status_notifier_pathnames_budgie_out), NULL};
static const GDBusMethodInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_method_info[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_method_info_register_status_notifier_item, &_budgie_status_notifier_freedesktop_watcher_dbus_method_info_register_status_notifier_host, &_budgie_status_notifier_freedesktop_watcher_dbus_method_info_get_registered_status_notifier_pathnames_budgie, NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_item = {-1, "item", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_item, NULL};
static const GDBusSignalInfo _budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_registered = {-1, "StatusNotifierItemRegistered", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered), NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_item = {-1, "item", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_item, NULL};
static const GDBusSignalInfo _budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_unregistered = {-1, "StatusNotifierItemUnregistered", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered), NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_host_registered[] = {NULL};
static const GDBusSignalInfo _budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_host_registered = {-1, "StatusNotifierHostRegistered", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_host_registered), NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_object_path = {-1, "object_path", "s", NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_sender = {-1, "sender", "s", NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_owner = {-1, "owner", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_name, &_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_object_path, &_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_sender, &_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie_owner, NULL};
static const GDBusSignalInfo _budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_registered_budgie = {-1, "StatusNotifierItemRegisteredBudgie", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_registered_budgie), NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_object_path = {-1, "object_path", "s", NULL};
static const GDBusArgInfo _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_owner = {-1, "owner", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_name, &_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_object_path, &_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie_owner, NULL};
static const GDBusSignalInfo _budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_unregistered_budgie = {-1, "StatusNotifierItemUnregisteredBudgie", (GDBusArgInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_arg_info_status_notifier_item_unregistered_budgie), NULL};
static const GDBusSignalInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_signal_info[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_registered, &_budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_unregistered, &_budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_host_registered, &_budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_registered_budgie, &_budgie_status_notifier_freedesktop_watcher_dbus_signal_info_status_notifier_item_unregistered_budgie, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_freedesktop_watcher_dbus_property_info_is_status_notifier_host_registered = {-1, "IsStatusNotifierHostRegistered", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_freedesktop_watcher_dbus_property_info_protocol_version = {-1, "ProtocolVersion", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_freedesktop_watcher_dbus_property_info_registered_status_notifier_items = {-1, "RegisteredStatusNotifierItems", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _budgie_status_notifier_freedesktop_watcher_dbus_property_info[] = {&_budgie_status_notifier_freedesktop_watcher_dbus_property_info_is_status_notifier_host_registered, &_budgie_status_notifier_freedesktop_watcher_dbus_property_info_protocol_version, &_budgie_status_notifier_freedesktop_watcher_dbus_property_info_registered_status_notifier_items, NULL};
static const GDBusInterfaceInfo _budgie_status_notifier_freedesktop_watcher_dbus_interface_info = {-1, "org.freedesktop.StatusNotifierWatcher", (GDBusMethodInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_method_info), (GDBusSignalInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_status_notifier_freedesktop_watcher_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_status_notifier_freedesktop_watcher_dbus_interface_vtable = {budgie_status_notifier_freedesktop_watcher_dbus_interface_method_call, budgie_status_notifier_freedesktop_watcher_dbus_interface_get_property, budgie_status_notifier_freedesktop_watcher_dbus_interface_set_property};
static const GDBusArgInfo _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_in[] = {&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_service, NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_out[] = {NULL};
static const GDBusMethodInfo _budgie_status_notifier_kde_watcher_dbus_method_info_register_status_notifier_item = {-1, "RegisterStatusNotifierItem", (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_in), (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_item_out), NULL};
static const GDBusArgInfo _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_service = {-1, "service", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_in[] = {&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_service, NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_out[] = {NULL};
static const GDBusMethodInfo _budgie_status_notifier_kde_watcher_dbus_method_info_register_status_notifier_host = {-1, "RegisterStatusNotifierHost", (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_in), (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_register_status_notifier_host_out), NULL};
static const GDBusMethodInfo * const _budgie_status_notifier_kde_watcher_dbus_method_info[] = {&_budgie_status_notifier_kde_watcher_dbus_method_info_register_status_notifier_item, &_budgie_status_notifier_kde_watcher_dbus_method_info_register_status_notifier_host, NULL};
static const GDBusArgInfo _budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_registered_item = {-1, "item", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_registered[] = {&_budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_registered_item, NULL};
static const GDBusSignalInfo _budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_item_registered = {-1, "StatusNotifierItemRegistered", (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_registered), NULL};
static const GDBusArgInfo _budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_unregistered_item = {-1, "item", "s", NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_unregistered[] = {&_budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_unregistered_item, NULL};
static const GDBusSignalInfo _budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_item_unregistered = {-1, "StatusNotifierItemUnregistered", (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_item_unregistered), NULL};
static const GDBusArgInfo * const _budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_host_registered[] = {NULL};
static const GDBusSignalInfo _budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_host_registered = {-1, "StatusNotifierHostRegistered", (GDBusArgInfo **) (&_budgie_status_notifier_kde_watcher_dbus_arg_info_status_notifier_host_registered), NULL};
static const GDBusSignalInfo * const _budgie_status_notifier_kde_watcher_dbus_signal_info[] = {&_budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_item_registered, &_budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_item_unregistered, &_budgie_status_notifier_kde_watcher_dbus_signal_info_status_notifier_host_registered, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_kde_watcher_dbus_property_info_registered_status_notifier_items = {-1, "RegisteredStatusNotifierItems", "as", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_kde_watcher_dbus_property_info_is_status_notifier_host_registered = {-1, "IsStatusNotifierHostRegistered", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo _budgie_status_notifier_kde_watcher_dbus_property_info_protocol_version = {-1, "ProtocolVersion", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL};
static const GDBusPropertyInfo * const _budgie_status_notifier_kde_watcher_dbus_property_info[] = {&_budgie_status_notifier_kde_watcher_dbus_property_info_registered_status_notifier_items, &_budgie_status_notifier_kde_watcher_dbus_property_info_is_status_notifier_host_registered, &_budgie_status_notifier_kde_watcher_dbus_property_info_protocol_version, NULL};
static const GDBusInterfaceInfo _budgie_status_notifier_kde_watcher_dbus_interface_info = {-1, "org.kde.StatusNotifierWatcher", (GDBusMethodInfo **) (&_budgie_status_notifier_kde_watcher_dbus_method_info), (GDBusSignalInfo **) (&_budgie_status_notifier_kde_watcher_dbus_signal_info), (GDBusPropertyInfo **) (&_budgie_status_notifier_kde_watcher_dbus_property_info), NULL};
static const GDBusInterfaceVTable _budgie_status_notifier_kde_watcher_dbus_interface_vtable = {budgie_status_notifier_kde_watcher_dbus_interface_method_call, budgie_status_notifier_kde_watcher_dbus_interface_get_property, budgie_status_notifier_kde_watcher_dbus_interface_set_property};

void
budgie_status_notifier_dbus_service_info_copy (const BudgieStatusNotifierDBusServiceInfo* self,
                                               BudgieStatusNotifierDBusServiceInfo* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = (*self).name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).name);
	(*dest).name = _tmp1_;
	_tmp2_ = (*self).object_path;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).object_path);
	(*dest).object_path = _tmp3_;
	_tmp4_ = (*self).sender;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 ((*dest).sender);
	(*dest).sender = _tmp5_;
	_tmp6_ = (*self).owner;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 ((*dest).owner);
	(*dest).owner = _tmp7_;
}

void
budgie_status_notifier_dbus_service_info_destroy (BudgieStatusNotifierDBusServiceInfo* self)
{
	_g_free0 ((*self).name);
	_g_free0 ((*self).object_path);
	_g_free0 ((*self).sender);
	_g_free0 ((*self).owner);
}

BudgieStatusNotifierDBusServiceInfo*
budgie_status_notifier_dbus_service_info_dup (const BudgieStatusNotifierDBusServiceInfo* self)
{
	BudgieStatusNotifierDBusServiceInfo* dup;
	dup = g_new0 (BudgieStatusNotifierDBusServiceInfo, 1);
	budgie_status_notifier_dbus_service_info_copy (self, dup);
	return dup;
}

void
budgie_status_notifier_dbus_service_info_free (BudgieStatusNotifierDBusServiceInfo* self)
{
	budgie_status_notifier_dbus_service_info_destroy (self);
	g_free (self);
}

static GType
budgie_status_notifier_dbus_service_info_get_type_once (void)
{
	GType budgie_status_notifier_dbus_service_info_type_id;
	budgie_status_notifier_dbus_service_info_type_id = g_boxed_type_register_static ("BudgieStatusNotifierDBusServiceInfo", (GBoxedCopyFunc) budgie_status_notifier_dbus_service_info_dup, (GBoxedFreeFunc) budgie_status_notifier_dbus_service_info_free);
	return budgie_status_notifier_dbus_service_info_type_id;
}

GType
budgie_status_notifier_dbus_service_info_get_type (void)
{
	static volatile gsize budgie_status_notifier_dbus_service_info_type_id__once = 0;
	if (g_once_init_enter (&budgie_status_notifier_dbus_service_info_type_id__once)) {
		GType budgie_status_notifier_dbus_service_info_type_id;
		budgie_status_notifier_dbus_service_info_type_id = budgie_status_notifier_dbus_service_info_get_type_once ();
		g_once_init_leave (&budgie_status_notifier_dbus_service_info_type_id__once, budgie_status_notifier_dbus_service_info_type_id);
	}
	return budgie_status_notifier_dbus_service_info_type_id__once;
}

static inline gpointer
budgie_status_notifier_freedesktop_watcher_get_instance_private (BudgieStatusNotifierFreedesktopWatcher* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieStatusNotifierFreedesktopWatcher_private_offset);
}

static void
budgie_status_notifier_freedesktop_watcher_on_dbus_acquired (BudgieStatusNotifierFreedesktopWatcher* self,
                                                             GDBusConnection* conn)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	{
		budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (self, "org.freedesktop.StatusNotifierHost-budgie_daemon", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		budgie_status_notifier_freedesktop_watcher_register_object (self, conn, BUDGIE_STATUS_NOTIFIER_WATCHER_FREEDESKTOP_DBUS_OBJECT_PATH, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		budgie_status_notifier_freedesktop_watcher_register_object (self, conn, BUDGIE_STATUS_NOTIFIER_WATCHER_BASIC_DBUS_OBJECT_PATH, &_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_critical ("statusnotifier.vala:93: Unable to register status notifier watcher: %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 Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		BudgieStatusNotifierFreedesktopWatcher* self;
		self = _data8_->self;
		_g_free0 (_data8_->sender_str);
		_g_free0 (_data8_->object_path);
		_g_free0 (_data8_->service);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	return result;
}

static gpointer
_budgie_status_notifier_dbus_service_info_dup0 (gpointer self)
{
	return self ? budgie_status_notifier_dbus_service_info_dup (self) : NULL;
}

static void
__lambda36_ (Block8Data* _data8_,
             GDBusConnection* conn,
             const gchar* name,
             const gchar* owner)
{
	BudgieStatusNotifierFreedesktopWatcher* self;
	gchar* service_key = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GHashTable* _tmp8_;
	const gchar* _tmp9_;
	self = _data8_->self;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (owner != NULL);
	_tmp0_ = _data8_->object_path;
	_tmp1_ = _data8_->sender_str;
	_tmp2_ = g_strconcat (_tmp0_, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, name, NULL);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	service_key = _tmp5_;
	_tmp6_ = _data8_->object_path;
	_tmp7_ = _data8_->sender_str;
	g_warning ("statusnotifier.vala:117: Received register request for item with servi" \
"ce=%s, path=%s, name=%s, sender=%s, owner=%s", _data8_->service, _tmp6_, name, _tmp7_, owner);
	_tmp8_ = self->priv->registered_services;
	_tmp9_ = service_key;
	if (!g_hash_table_contains (_tmp8_, _tmp9_)) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GHashTable* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		BudgieStatusNotifierDBusServiceInfo _tmp21_ = {0};
		BudgieStatusNotifierDBusServiceInfo _tmp22_;
		BudgieStatusNotifierDBusServiceInfo* _tmp23_;
		gboolean _tmp24_ = FALSE;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		BudgieStatusNotifierKdeWatcher* _tmp27_;
		gboolean _tmp28_ = FALSE;
		_tmp10_ = _data8_->object_path;
		_tmp11_ = _data8_->sender_str;
		g_warning ("statusnotifier.vala:119: Registering item with service=%s, path=%s, na" \
"me=%s, sender=%s, owner=%s", _data8_->service, _tmp10_, name, _tmp11_, owner);
		_tmp12_ = self->priv->registered_services;
		_tmp13_ = service_key;
		_tmp14_ = g_strdup (_tmp13_);
		_tmp15_ = g_strdup (name);
		_tmp16_ = _data8_->object_path;
		_tmp17_ = g_strdup (_tmp16_);
		_tmp18_ = _data8_->sender_str;
		_tmp19_ = g_strdup (_tmp18_);
		_tmp20_ = g_strdup (owner);
		_g_free0 (_tmp21_.name);
		_tmp21_.name = _tmp15_;
		_g_free0 (_tmp21_.object_path);
		_tmp21_.object_path = _tmp17_;
		_g_free0 (_tmp21_.sender);
		_tmp21_.sender = _tmp19_;
		_g_free0 (_tmp21_.owner);
		_tmp21_.owner = _tmp20_;
		_tmp22_ = _tmp21_;
		_tmp23_ = _budgie_status_notifier_dbus_service_info_dup0 (&_tmp22_);
		g_hash_table_insert (_tmp12_, _tmp14_, _tmp23_);
		budgie_status_notifier_dbus_service_info_destroy (&_tmp22_);
		g_signal_emit (self, budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL], 0, name, &_tmp24_);
		_tmp25_ = _data8_->object_path;
		_tmp26_ = _data8_->sender_str;
		g_signal_emit (self, budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_BUDGIE_SIGNAL], 0, name, _tmp25_, _tmp26_, owner);
		_tmp27_ = self->priv->kde_watcher;
		g_signal_emit (_tmp27_, budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL], 0, name, &_tmp28_);
	}
	_g_free0 (service_key);
}

static void
___lambda36__gbus_name_appeared_callback (GDBusConnection* connection,
                                          const gchar* name,
                                          const gchar* name_owner,
                                          gpointer self)
{
	__lambda36_ (self, connection, name, name_owner);
}

static void
__lambda37_ (Block8Data* _data8_,
             GDBusConnection* conn,
             const gchar* name)
{
	BudgieStatusNotifierFreedesktopWatcher* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* service_key = NULL;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GHashTable* _tmp8_;
	const gchar* _tmp9_;
	self = _data8_->self;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = _data8_->object_path;
	_tmp1_ = _data8_->sender_str;
	g_warning ("statusnotifier.vala:127: Received unregister request for item with ser" \
"vice=%s, path=%s, name=%s, sender=%s", _data8_->service, _tmp0_, name, _tmp1_);
	_tmp2_ = _data8_->object_path;
	_tmp3_ = _data8_->sender_str;
	_tmp4_ = g_strconcat (_tmp2_, _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strconcat (_tmp5_, name, NULL);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	service_key = _tmp7_;
	_tmp8_ = self->priv->registered_services;
	_tmp9_ = service_key;
	if (g_hash_table_contains (_tmp8_, _tmp9_)) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		GHashTable* _tmp12_;
		const gchar* _tmp13_;
		gboolean _tmp14_ = FALSE;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		BudgieStatusNotifierKdeWatcher* _tmp17_;
		gboolean _tmp18_ = FALSE;
		_tmp10_ = _data8_->object_path;
		_tmp11_ = _data8_->sender_str;
		g_warning ("statusnotifier.vala:130: Unregistering item with service=%s, path=%s, " \
"name=%s, sender=%s", _data8_->service, _tmp10_, name, _tmp11_);
		_tmp12_ = self->priv->registered_services;
		_tmp13_ = service_key;
		g_hash_table_remove (_tmp12_, _tmp13_);
		g_signal_emit (self, budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL], 0, name, &_tmp14_);
		_tmp15_ = _data8_->object_path;
		_tmp16_ = _data8_->sender_str;
		g_signal_emit (self, budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_BUDGIE_SIGNAL], 0, name, _tmp15_, _tmp16_);
		_tmp17_ = self->priv->kde_watcher;
		g_signal_emit (_tmp17_, budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL], 0, name, &_tmp18_);
	}
	_g_free0 (service_key);
}

static void
___lambda37__gbus_name_vanished_callback (GDBusConnection* connection,
                                          const gchar* name,
                                          gpointer self)
{
	__lambda37_ (self, connection, name);
}

void
budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                          const gchar* service,
                                                                          const char* sender,
                                                                          GError** error)
{
	Block8Data* _data8_;
	gchar* _tmp0_;
	gchar* name = NULL;
	GHashTable* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	guint watch_identifier = 0U;
	const gchar* _tmp8_;
	GHashTable* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (sender != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_tmp0_ = g_strdup (service);
	_g_free0 (_data8_->service);
	_data8_->service = _tmp0_;
	if (string_get (_data8_->service, (glong) 0) == '/') {
		gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = g_strdup ((const gchar*) sender);
		_g_free0 (name);
		name = _tmp1_;
		_tmp2_ = g_strdup (_data8_->service);
		_g_free0 (_data8_->object_path);
		_data8_->object_path = _tmp2_;
	} else {
		gchar* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = g_strdup (_data8_->service);
		_g_free0 (name);
		name = _tmp3_;
		_tmp4_ = g_strdup ("/StatusNotifierItem");
		_g_free0 (_data8_->object_path);
		_data8_->object_path = _tmp4_;
	}
	_tmp5_ = self->priv->item_watchers;
	_tmp6_ = name;
	if (g_hash_table_contains (_tmp5_, _tmp6_)) {
		_g_free0 (name);
		block8_data_unref (_data8_);
		_data8_ = NULL;
		return;
	}
	_tmp7_ = g_strdup ((const gchar*) sender);
	_data8_->sender_str = _tmp7_;
	_tmp8_ = name;
	watch_identifier = g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, _tmp8_, G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((___lambda36__gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda36__gbus_name_appeared_callback, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref)), (GClosure*) ((___lambda37__gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda37__gbus_name_vanished_callback, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref)));
	_tmp9_ = self->priv->item_watchers;
	_tmp10_ = name;
	_tmp11_ = g_strdup (_tmp10_);
	g_hash_table_insert (_tmp9_, _tmp11_, (gpointer) ((guintptr) watch_identifier));
	_g_free0 (name);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}

static Block9Data*
block9_data_ref (Block9Data* _data9_)
{
	g_atomic_int_inc (&_data9_->_ref_count_);
	return _data9_;
}

static void
block9_data_unref (void * _userdata_)
{
	Block9Data* _data9_;
	_data9_ = (Block9Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) {
		BudgieStatusNotifierFreedesktopWatcher* self;
		self = _data9_->self;
		_g_free0 (_data9_->service);
		_g_object_unref0 (self);
		g_slice_free (Block9Data, _data9_);
	}
}

static void
__lambda38_ (Block9Data* _data9_,
             GDBusConnection* conn,
             const gchar* name,
             const gchar* owner)
{
	BudgieStatusNotifierFreedesktopWatcher* self;
	gboolean _tmp0_ = FALSE;
	self = _data9_->self;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (owner != NULL);
	g_warning ("statusnotifier.vala:149: Registered status notifier host %s", _data9_->service);
	budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (self, TRUE);
	g_signal_emit (self, budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL], 0, &_tmp0_);
}

static void
___lambda38__gbus_name_appeared_callback (GDBusConnection* connection,
                                          const gchar* name,
                                          const gchar* name_owner,
                                          gpointer self)
{
	__lambda38_ (self, connection, name, name_owner);
}

static void
__lambda39_ (Block9Data* _data9_,
             GDBusConnection* conn,
             const gchar* name)
{
	BudgieStatusNotifierFreedesktopWatcher* self;
	GHashTable* _tmp0_;
	GHashTable* _tmp1_;
	guint _tmp2_ = 0;
	gconstpointer* _tmp3_;
	const gchar** _tmp4_;
	gint _tmp4__length1;
	self = _data9_->self;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->host_services;
	g_hash_table_remove (_tmp0_, _data9_->service);
	g_warning ("statusnotifier.vala:155: Unregistered status notifier host %s", _data9_->service);
	_tmp1_ = self->priv->host_services;
	_tmp3_ = g_hash_table_get_keys_as_array (_tmp1_, &_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp2_;
	budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (self, _tmp2_ != 0);
	_tmp4_ = (g_free (_tmp4_), NULL);
}

static void
___lambda39__gbus_name_vanished_callback (GDBusConnection* connection,
                                          const gchar* name,
                                          gpointer self)
{
	__lambda39_ (self, connection, name);
}

void
budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                          const gchar* service,
                                                                          GError** error)
{
	Block9Data* _data9_;
	gchar* _tmp0_;
	guint watch_identifier = 0U;
	GHashTable* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	_data9_ = g_slice_new0 (Block9Data);
	_data9_->_ref_count_ = 1;
	_data9_->self = g_object_ref (self);
	_tmp0_ = g_strdup (service);
	_g_free0 (_data9_->service);
	_data9_->service = _tmp0_;
	watch_identifier = g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, _data9_->service, G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((___lambda38__gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda38__gbus_name_appeared_callback, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref)), (GClosure*) ((___lambda39__gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ___lambda39__gbus_name_vanished_callback, block9_data_ref (_data9_), (GClosureNotify) block9_data_unref)));
	_tmp1_ = self->priv->host_services;
	_tmp2_ = g_strdup (_data9_->service);
	g_hash_table_insert (_tmp1_, _tmp2_, (gpointer) ((guintptr) watch_identifier));
	block9_data_unref (_data9_);
	_data9_ = NULL;
}

static void
_vala_array_add2 (BudgieStatusNotifierDBusServiceInfo* * array,
                  gint* length,
                  gint* size,
                  const BudgieStatusNotifierDBusServiceInfo* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (BudgieStatusNotifierDBusServiceInfo, *array, *size);
	}
	(*array)[(*length)++] = *value;
}

BudgieStatusNotifierDBusServiceInfo*
budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                            gint* result_length1,
                                                                                            GError** error)
{
	BudgieStatusNotifierDBusServiceInfo* ret = NULL;
	BudgieStatusNotifierDBusServiceInfo* _tmp0_;
	gint ret_length1;
	gint _ret_size_;
	GHashTable* _tmp1_;
	GList* _tmp2_;
	BudgieStatusNotifierDBusServiceInfo* _tmp8_;
	gint _tmp8__length1;
	BudgieStatusNotifierDBusServiceInfo* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (BudgieStatusNotifierDBusServiceInfo, 0);
	ret = _tmp0_;
	ret_length1 = 0;
	_ret_size_ = ret_length1;
	_tmp1_ = self->priv->registered_services;
	_tmp2_ = g_hash_table_get_values (_tmp1_);
	{
		GList* val_collection = NULL;
		GList* val_it = NULL;
		val_collection = _tmp2_;
		for (val_it = val_collection; val_it != NULL; val_it = val_it->next) {
			BudgieStatusNotifierDBusServiceInfo _tmp3_;
			BudgieStatusNotifierDBusServiceInfo _tmp4_ = {0};
			BudgieStatusNotifierDBusServiceInfo val = {0};
			_tmp3_ = *((BudgieStatusNotifierDBusServiceInfo*) val_it->data);
			budgie_status_notifier_dbus_service_info_copy (&_tmp3_, &_tmp4_);
			val = _tmp4_;
			{
				BudgieStatusNotifierDBusServiceInfo _tmp5_;
				BudgieStatusNotifierDBusServiceInfo _tmp6_;
				BudgieStatusNotifierDBusServiceInfo _tmp7_ = {0};
				_tmp5_ = val;
				_tmp6_ = _tmp5_;
				budgie_status_notifier_dbus_service_info_copy (&_tmp6_, &_tmp7_);
				_vala_array_add2 (&ret, &ret_length1, &_ret_size_, &_tmp7_);
				budgie_status_notifier_dbus_service_info_destroy (&val);
			}
		}
		(val_collection == NULL) ? NULL : (val_collection = (g_list_free (val_collection), NULL));
	}
	_tmp8_ = ret;
	_tmp8__length1 = ret_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

BudgieStatusNotifierFreedesktopWatcher*
budgie_status_notifier_freedesktop_watcher_construct (GType object_type)
{
	BudgieStatusNotifierFreedesktopWatcher * self = NULL;
	self = (BudgieStatusNotifierFreedesktopWatcher*) g_object_new (object_type, NULL);
	return self;
}

BudgieStatusNotifierFreedesktopWatcher*
budgie_status_notifier_freedesktop_watcher_new (void)
{
	return budgie_status_notifier_freedesktop_watcher_construct (BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER);
}

gboolean
budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_status_notifier_host_registered;
	return result;
}

static void
budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                   gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (self);
	if (old_value != value) {
		self->priv->_is_status_notifier_host_registered = value;
		g_object_notify_by_pspec ((GObject *) self, budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY]);
	}
}

gint32
budgie_status_notifier_freedesktop_watcher_get_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self)
{
	gint32 result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_protocol_version;
	return result;
}

static void
budgie_status_notifier_freedesktop_watcher_set_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                 gint32 value)
{
	gint32 old_value;
	g_return_if_fail (self != NULL);
	old_value = budgie_status_notifier_freedesktop_watcher_get_protocol_version (self);
	if (old_value != value) {
		self->priv->_protocol_version = value;
		g_object_notify_by_pspec ((GObject *) self, budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY]);
	}
}

static void
_vala_array_add3 (gchar** * array,
                  gint* length,
                  gint* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}

gchar**
budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                 gint* result_length1)
{
	gchar** result;
	gchar** ret = NULL;
	gchar** _tmp0_;
	gint ret_length1;
	gint _ret_size_;
	GHashTable* _tmp1_;
	GList* _tmp2_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	ret = _tmp0_;
	ret_length1 = 0;
	_ret_size_ = ret_length1;
	_tmp1_ = self->priv->registered_services;
	_tmp2_ = g_hash_table_get_values (_tmp1_);
	{
		GList* val_collection = NULL;
		GList* val_it = NULL;
		val_collection = _tmp2_;
		for (val_it = val_collection; val_it != NULL; val_it = val_it->next) {
			BudgieStatusNotifierDBusServiceInfo _tmp3_;
			BudgieStatusNotifierDBusServiceInfo _tmp4_ = {0};
			BudgieStatusNotifierDBusServiceInfo val = {0};
			_tmp3_ = *((BudgieStatusNotifierDBusServiceInfo*) val_it->data);
			budgie_status_notifier_dbus_service_info_copy (&_tmp3_, &_tmp4_);
			val = _tmp4_;
			{
				BudgieStatusNotifierDBusServiceInfo _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				_tmp5_ = val;
				_tmp6_ = _tmp5_.name;
				_tmp7_ = g_strdup (_tmp6_);
				_vala_array_add3 (&ret, &ret_length1, &_ret_size_, _tmp7_);
				budgie_status_notifier_dbus_service_info_destroy (&val);
			}
		}
		(val_collection == NULL) ? NULL : (val_collection = (g_list_free (val_collection), NULL));
	}
	_tmp8_ = ret;
	_tmp8__length1 = ret_length1;
	if (result_length1) {
		*result_length1 = _tmp8__length1;
	}
	result = _tmp8_;
	return result;
}

static void
g_cclosure_user_marshal_BOOLEAN__STRING (GClosure * closure,
                                         GValue * return_value,
                                         guint n_param_values,
                                         const GValue * param_values,
                                         gpointer invocation_hint,
                                         gpointer marshal_data)
{
	typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1, const char* arg_1, gpointer data2);
	register GMarshalFunc_BOOLEAN__STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gboolean v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_string (param_values + 1), data2);
	g_value_set_boolean (return_value, v_return);
}

static void
g_cclosure_user_marshal_BOOLEAN__VOID (GClosure * closure,
                                       GValue * return_value,
                                       guint n_param_values,
                                       const GValue * param_values,
                                       gpointer invocation_hint,
                                       gpointer marshal_data)
{
	typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1, gpointer data2);
	register GMarshalFunc_BOOLEAN__VOID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gboolean v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 1);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, data2);
	g_value_set_boolean (return_value, v_return);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, const char* arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), g_value_get_string (param_values + 4), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), data2);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static void
_budgie_status_notifier_dbus_service_info_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (budgie_status_notifier_dbus_service_info_free (var), NULL));
}

static void
_budgie_status_notifier_freedesktop_watcher_on_dbus_acquired_gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                          const gchar* name,
                                                                                          gpointer self)
{
	budgie_status_notifier_freedesktop_watcher_on_dbus_acquired ((BudgieStatusNotifierFreedesktopWatcher*) self, connection);
}

static void
_budgie_status_notifier_freedesktop_watcher___lambda40_ (BudgieStatusNotifierFreedesktopWatcher* self,
                                                         GDBusConnection* conn,
                                                         const gchar* name)
{
	g_return_if_fail (conn != NULL);
	g_return_if_fail (name != NULL);
	self->priv->freedesktop_dbus_identifier = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, BUDGIE_STATUS_NOTIFIER_WATCHER_FREEDESKTOP_DBUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((_budgie_status_notifier_freedesktop_watcher_on_dbus_acquired_gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_status_notifier_freedesktop_watcher_on_dbus_acquired_gbus_name_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
}

static void
__budgie_status_notifier_freedesktop_watcher___lambda40__gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                      const gchar* name,
                                                                                      gpointer self)
{
	_budgie_status_notifier_freedesktop_watcher___lambda40_ ((BudgieStatusNotifierFreedesktopWatcher*) self, connection, name);
}

static GObject *
budgie_status_notifier_freedesktop_watcher_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	BudgieStatusNotifierFreedesktopWatcher * self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashFunc _tmp3_;
	GEqualFunc _tmp4_;
	GHashTable* _tmp5_;
	GHashFunc _tmp6_;
	GEqualFunc _tmp7_;
	GHashTable* _tmp8_;
	BudgieStatusNotifierKdeWatcher* _tmp9_;
	parent_class = G_OBJECT_CLASS (budgie_status_notifier_freedesktop_watcher_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcher);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL);
	_g_hash_table_unref0 (self->priv->host_services);
	self->priv->host_services = _tmp2_;
	_tmp3_ = g_str_hash;
	_tmp4_ = g_str_equal;
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_free0_, NULL);
	_g_hash_table_unref0 (self->priv->item_watchers);
	self->priv->item_watchers = _tmp5_;
	_tmp6_ = g_str_hash;
	_tmp7_ = g_str_equal;
	_tmp8_ = g_hash_table_new_full (_tmp6_, _tmp7_, _g_free0_, _budgie_status_notifier_dbus_service_info_free0_);
	_g_hash_table_unref0 (self->priv->registered_services);
	self->priv->registered_services = _tmp8_;
	self->priv->host_dbus_identifier = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.freedesktop.StatusNotifierHost-budgie_daemon", G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | G_BUS_NAME_OWNER_FLAGS_REPLACE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((__budgie_status_notifier_freedesktop_watcher___lambda40__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __budgie_status_notifier_freedesktop_watcher___lambda40__gbus_name_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp9_ = budgie_status_notifier_kde_watcher_new (self);
	_g_object_unref0 (self->priv->kde_watcher);
	self->priv->kde_watcher = _tmp9_;
	return obj;
}

static void
budgie_status_notifier_freedesktop_watcher_class_init (BudgieStatusNotifierFreedesktopWatcherClass * klass,
                                                       gpointer klass_data)
{
	budgie_status_notifier_freedesktop_watcher_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieStatusNotifierFreedesktopWatcher_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_budgie_status_notifier_freedesktop_watcher_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_budgie_status_notifier_freedesktop_watcher_set_property;
	G_OBJECT_CLASS (klass)->constructor = budgie_status_notifier_freedesktop_watcher_constructor;
	G_OBJECT_CLASS (klass)->finalize = budgie_status_notifier_freedesktop_watcher_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY, budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY] = g_param_spec_boolean ("is-status-notifier-host-registered", "is-status-notifier-host-registered", "is-status-notifier-host-registered", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY, budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY] = g_param_spec_int ("protocol-version", "protocol-version", "protocol-version", G_MININT, G_MAXINT, (gint32) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY, budgie_status_notifier_freedesktop_watcher_properties[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY] = g_param_spec_boxed ("registered-status-notifier-items", "registered-status-notifier-items", "registered-status-notifier-items", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL] = g_signal_new ("status-notifier-item-registered", BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
	budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL] = g_signal_new ("status-notifier-item-unregistered", BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
	budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL] = g_signal_new ("status-notifier-host-registered", BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0);
	budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_BUDGIE_SIGNAL] = g_signal_new ("status-notifier-item-registered-budgie", BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING_STRING, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
	budgie_status_notifier_freedesktop_watcher_signals[BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_BUDGIE_SIGNAL] = g_signal_new ("status-notifier-item-unregistered-budgie", BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}

static void
budgie_status_notifier_freedesktop_watcher_instance_init (BudgieStatusNotifierFreedesktopWatcher * self,
                                                          gpointer klass)
{
	self->priv = budgie_status_notifier_freedesktop_watcher_get_instance_private (self);
	self->priv->_is_status_notifier_host_registered = FALSE;
	self->priv->_protocol_version = (gint32) 0;
	self->priv->freedesktop_dbus_identifier = (guint) 0;
}

static void
budgie_status_notifier_freedesktop_watcher_finalize (GObject * obj)
{
	BudgieStatusNotifierFreedesktopWatcher * self;
	BudgieStatusNotifierKdeWatcher* _tmp0_;
	GHashTable* _tmp1_;
	GList* _tmp2_;
	GHashTable* _tmp3_;
	GList* _tmp4_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcher);
	_tmp0_ = self->priv->kde_watcher;
	g_object_unref ((GObject*) _tmp0_);
	if (self->priv->freedesktop_dbus_identifier != ((guint) 0)) {
		g_bus_unown_name (self->priv->freedesktop_dbus_identifier);
	}
	if (self->priv->host_dbus_identifier != ((guint) 0)) {
		g_bus_unown_name (self->priv->host_dbus_identifier);
	}
	_tmp1_ = self->priv->host_services;
	_tmp2_ = g_hash_table_get_values (_tmp1_);
	{
		GList* identifier_collection = NULL;
		GList* identifier_it = NULL;
		identifier_collection = _tmp2_;
		for (identifier_it = identifier_collection; identifier_it != NULL; identifier_it = identifier_it->next) {
			guint identifier = 0U;
			identifier = (guint) ((guintptr) identifier_it->data);
			{
				g_bus_unwatch_name (identifier);
			}
		}
		(identifier_collection == NULL) ? NULL : (identifier_collection = (g_list_free (identifier_collection), NULL));
	}
	_tmp3_ = self->priv->item_watchers;
	_tmp4_ = g_hash_table_get_keys (_tmp3_);
	{
		GList* service_collection = NULL;
		GList* service_it = NULL;
		service_collection = _tmp4_;
		for (service_it = service_collection; service_it != NULL; service_it = service_it->next) {
			gchar* _tmp5_;
			gchar* service = NULL;
			_tmp5_ = g_strdup ((const gchar*) service_it->data);
			service = _tmp5_;
			{
				GHashTable* _tmp6_;
				const gchar* _tmp7_;
				gconstpointer _tmp8_;
				_tmp6_ = self->priv->item_watchers;
				_tmp7_ = service;
				_tmp8_ = g_hash_table_lookup (_tmp6_, _tmp7_);
				g_bus_unwatch_name ((guint) ((guintptr) _tmp8_));
				_g_free0 (service);
			}
		}
		(service_collection == NULL) ? NULL : (service_collection = (g_list_free (service_collection), NULL));
	}
	_g_object_unref0 (self->priv->kde_watcher);
	_g_hash_table_unref0 (self->priv->host_services);
	_g_hash_table_unref0 (self->priv->item_watchers);
	_g_hash_table_unref0 (self->priv->registered_services);
	G_OBJECT_CLASS (budgie_status_notifier_freedesktop_watcher_parent_class)->finalize (obj);
}

static GType
budgie_status_notifier_freedesktop_watcher_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieStatusNotifierFreedesktopWatcherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_status_notifier_freedesktop_watcher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieStatusNotifierFreedesktopWatcher), 0, (GInstanceInitFunc) budgie_status_notifier_freedesktop_watcher_instance_init, NULL };
	GType budgie_status_notifier_freedesktop_watcher_type_id;
	budgie_status_notifier_freedesktop_watcher_type_id = g_type_register_static (G_TYPE_OBJECT, "BudgieStatusNotifierFreedesktopWatcher", &g_define_type_info, 0);
	g_type_set_qdata (budgie_status_notifier_freedesktop_watcher_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_status_notifier_freedesktop_watcher_register_object);
	BudgieStatusNotifierFreedesktopWatcher_private_offset = g_type_add_instance_private (budgie_status_notifier_freedesktop_watcher_type_id, sizeof (BudgieStatusNotifierFreedesktopWatcherPrivate));
	return budgie_status_notifier_freedesktop_watcher_type_id;
}

GType
budgie_status_notifier_freedesktop_watcher_get_type (void)
{
	static volatile gsize budgie_status_notifier_freedesktop_watcher_type_id__once = 0;
	if (g_once_init_enter (&budgie_status_notifier_freedesktop_watcher_type_id__once)) {
		GType budgie_status_notifier_freedesktop_watcher_type_id;
		budgie_status_notifier_freedesktop_watcher_type_id = budgie_status_notifier_freedesktop_watcher_get_type_once ();
		g_once_init_leave (&budgie_status_notifier_freedesktop_watcher_type_id__once, budgie_status_notifier_freedesktop_watcher_type_id);
	}
	return budgie_status_notifier_freedesktop_watcher_type_id__once;
}

static void
_vala_budgie_status_notifier_freedesktop_watcher_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec)
{
	BudgieStatusNotifierFreedesktopWatcher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcher);
	switch (property_id) {
		case BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY:
		g_value_set_boolean (value, budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (self));
		break;
		case BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY:
		g_value_set_int (value, budgie_status_notifier_freedesktop_watcher_get_protocol_version (self));
		break;
		case BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_budgie_status_notifier_freedesktop_watcher_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec)
{
	BudgieStatusNotifierFreedesktopWatcher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_STATUS_NOTIFIER_TYPE_FREEDESKTOP_WATCHER, BudgieStatusNotifierFreedesktopWatcher);
	switch (property_id) {
		case BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY:
		budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (self, g_value_get_boolean (value));
		break;
		case BUDGIE_STATUS_NOTIFIER_FREEDESKTOP_WATCHER_PROTOCOL_VERSION_PROPERTY:
		budgie_status_notifier_freedesktop_watcher_set_protocol_version (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                GVariant* _parameters_,
                                                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* service = NULL;
	GVariant* _tmp38_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp38_ = g_variant_iter_next_value (&_arguments_iter);
	service = g_variant_dup_string (_tmp38_, NULL);
	g_variant_unref (_tmp38_);
	budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (self, service, g_dbus_method_invocation_get_sender (invocation), &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (service);
	;
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                GVariant* _parameters_,
                                                                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* service = NULL;
	GVariant* _tmp39_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp39_ = g_variant_iter_next_value (&_arguments_iter);
	service = g_variant_dup_string (_tmp39_, NULL);
	g_variant_unref (_tmp39_);
	budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (self, service, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (service);
	;
}

static void
_vala_BudgieStatusNotifierDBusServiceInfo_array_free (BudgieStatusNotifierDBusServiceInfo * array,
                                                      gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			budgie_status_notifier_dbus_service_info_destroy (&array[i]);
		}
	}
	g_free (array);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                                  GVariant* _parameters_,
                                                                                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	BudgieStatusNotifierDBusServiceInfo* result;
	gint result_length1 = 0;
	BudgieStatusNotifierDBusServiceInfo* _tmp40_;
	GVariantBuilder _tmp41_;
	gint _tmp42_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (self, &result_length1, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_tmp40_ = result;
	g_variant_builder_init (&_tmp41_, G_VARIANT_TYPE ("a(ssss)"));
	for (_tmp42_ = 0; _tmp42_ < result_length1; _tmp42_++) {
		GVariantBuilder _tmp43_;
		g_variant_builder_init (&_tmp43_, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_tmp43_, g_variant_new_string ((*_tmp40_).name));
		g_variant_builder_add_value (&_tmp43_, g_variant_new_string ((*_tmp40_).object_path));
		g_variant_builder_add_value (&_tmp43_, g_variant_new_string ((*_tmp40_).sender));
		g_variant_builder_add_value (&_tmp43_, g_variant_new_string ((*_tmp40_).owner));
		g_variant_builder_add_value (&_tmp41_, g_variant_builder_end (&_tmp43_));
		_tmp40_++;
	}
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp41_));
	result = (_vala_BudgieStatusNotifierDBusServiceInfo_array_free (result, result_length1), NULL);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
budgie_status_notifier_freedesktop_watcher_dbus_interface_method_call (GDBusConnection* connection,
                                                                       const gchar* sender,
                                                                       const gchar* object_path,
                                                                       const gchar* interface_name,
                                                                       const gchar* method_name,
                                                                       GVariant* parameters,
                                                                       GDBusMethodInvocation* invocation,
                                                                       gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "RegisterStatusNotifierItem") == 0) {
		_dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (object, parameters, invocation);
	} else if (strcmp (method_name, "RegisterStatusNotifierHost") == 0) {
		_dbus_budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (object, parameters, invocation);
	} else if (strcmp (method_name, "GetRegisteredStatusNotifierPathnamesBudgie") == 0) {
		_dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_pathnames_budgie (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self)
{
	gboolean result;
	GVariant* _reply;
	result = budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_budgie_status_notifier_freedesktop_watcher_get_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self)
{
	gint32 result;
	GVariant* _reply;
	result = budgie_status_notifier_freedesktop_watcher_get_protocol_version (self);
	_reply = g_variant_new_int32 (result);
	return _reply;
}

static GVariant*
_dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (BudgieStatusNotifierFreedesktopWatcher* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp44_;
	GVariantBuilder _tmp45_;
	gint _tmp46_;
	result = budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (self, &result_length1);
	_tmp44_ = result;
	g_variant_builder_init (&_tmp45_, G_VARIANT_TYPE ("as"));
	for (_tmp46_ = 0; _tmp46_ < result_length1; _tmp46_++) {
		g_variant_builder_add_value (&_tmp45_, g_variant_new_string (*_tmp44_));
		_tmp44_++;
	}
	_reply = g_variant_builder_end (&_tmp45_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
budgie_status_notifier_freedesktop_watcher_dbus_interface_get_property (GDBusConnection* connection,
                                                                        const gchar* sender,
                                                                        const gchar* object_path,
                                                                        const gchar* interface_name,
                                                                        const gchar* property_name,
                                                                        GError** error,
                                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "IsStatusNotifierHostRegistered") == 0) {
		return _dbus_budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (object);
	} else if (strcmp (property_name, "ProtocolVersion") == 0) {
		return _dbus_budgie_status_notifier_freedesktop_watcher_get_protocol_version (object);
	} else if (strcmp (property_name, "RegisteredStatusNotifierItems") == 0) {
		return _dbus_budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (object);
	}
	return NULL;
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                                         GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (self, value);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_set_protocol_version (BudgieStatusNotifierFreedesktopWatcher* self,
                                                                       GVariant* _value)
{
	gint32 value = 0;
	value = g_variant_get_int32 (_value);
	budgie_status_notifier_freedesktop_watcher_set_protocol_version (self, value);
}

static gboolean
budgie_status_notifier_freedesktop_watcher_dbus_interface_set_property (GDBusConnection* connection,
                                                                        const gchar* sender,
                                                                        const gchar* object_path,
                                                                        const gchar* interface_name,
                                                                        const gchar* property_name,
                                                                        GVariant* value,
                                                                        GError** error,
                                                                        gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "IsStatusNotifierHostRegistered") == 0) {
		_dbus_budgie_status_notifier_freedesktop_watcher_set_is_status_notifier_host_registered (object, value);
		return TRUE;
	} else if (strcmp (property_name, "ProtocolVersion") == 0) {
		_dbus_budgie_status_notifier_freedesktop_watcher_set_protocol_version (object, value);
		return TRUE;
	}
	return FALSE;
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered (GObject* _sender,
                                                                                  const gchar* item,
                                                                                  gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (item));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.StatusNotifierWatcher", "StatusNotifierItemRegistered", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered (GObject* _sender,
                                                                                    const gchar* item,
                                                                                    gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (item));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.StatusNotifierWatcher", "StatusNotifierItemUnregistered", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered (GObject* _sender,
                                                                                  gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.StatusNotifierWatcher", "StatusNotifierHostRegistered", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered_budgie (GObject* _sender,
                                                                                         const gchar* name,
                                                                                         const gchar* object_path,
                                                                                         const gchar* sender,
                                                                                         const gchar* owner,
                                                                                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (object_path));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (sender));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (owner));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.StatusNotifierWatcher", "StatusNotifierItemRegisteredBudgie", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered_budgie (GObject* _sender,
                                                                                           const gchar* name,
                                                                                           const gchar* object_path,
                                                                                           const gchar* owner,
                                                                                           gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (object_path));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (owner));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.StatusNotifierWatcher", "StatusNotifierItemUnregisteredBudgie", _arguments, NULL);
}

guint
budgie_status_notifier_freedesktop_watcher_register_object (gpointer object,
                                                            GDBusConnection* connection,
                                                            const gchar* path,
                                                            GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_budgie_status_notifier_freedesktop_watcher_dbus_interface_info), &_budgie_status_notifier_freedesktop_watcher_dbus_interface_vtable, data, _budgie_status_notifier_freedesktop_watcher_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "status-notifier-item-registered", (GCallback) _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered, data);
	g_signal_connect (object, "status-notifier-item-unregistered", (GCallback) _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered, data);
	g_signal_connect (object, "status-notifier-host-registered", (GCallback) _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered, data);
	g_signal_connect (object, "status-notifier-item-registered-budgie", (GCallback) _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered_budgie, data);
	g_signal_connect (object, "status-notifier-item-unregistered-budgie", (GCallback) _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered_budgie, data);
	return result;
}

static void
_budgie_status_notifier_freedesktop_watcher_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered_budgie, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered_budgie, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
budgie_status_notifier_kde_watcher_get_instance_private (BudgieStatusNotifierKdeWatcher* self)
{
	return G_STRUCT_MEMBER_P (self, BudgieStatusNotifierKdeWatcher_private_offset);
}

static gboolean
__lambda33_ (BudgieStatusNotifierKdeWatcher* self,
             const gchar* item)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (item != NULL, FALSE);
	g_signal_emit (self, budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL], 0, item, &_tmp0_);
	result = _tmp0_;
	return result;
}

static gboolean
___lambda33__budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                         const gchar* item,
                                                                                         gpointer self)
{
	gboolean result;
	result = __lambda33_ ((BudgieStatusNotifierKdeWatcher*) self, item);
	return result;
}

static gboolean
__lambda34_ (BudgieStatusNotifierKdeWatcher* self,
             const gchar* item)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (item != NULL, FALSE);
	g_signal_emit (self, budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL], 0, item, &_tmp0_);
	result = _tmp0_;
	return result;
}

static gboolean
___lambda34__budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                           const gchar* item,
                                                                                           gpointer self)
{
	gboolean result;
	result = __lambda34_ ((BudgieStatusNotifierKdeWatcher*) self, item);
	return result;
}

static gboolean
__lambda35_ (BudgieStatusNotifierKdeWatcher* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_signal_emit (self, budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL], 0, &_tmp0_);
	result = _tmp0_;
	return result;
}

static gboolean
___lambda35__budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered (BudgieStatusNotifierFreedesktopWatcher* _sender,
                                                                                         gpointer self)
{
	gboolean result;
	result = __lambda35_ ((BudgieStatusNotifierKdeWatcher*) self);
	return result;
}

static void
_budgie_status_notifier_kde_watcher_on_dbus_acquired_gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                  const gchar* name,
                                                                                  gpointer self)
{
	budgie_status_notifier_kde_watcher_on_dbus_acquired ((BudgieStatusNotifierKdeWatcher*) self, connection);
}

BudgieStatusNotifierKdeWatcher*
budgie_status_notifier_kde_watcher_construct (GType object_type,
                                              BudgieStatusNotifierFreedesktopWatcher* parent)
{
	BudgieStatusNotifierKdeWatcher * self = NULL;
	g_return_val_if_fail (parent != NULL, NULL);
	self = (BudgieStatusNotifierKdeWatcher*) g_object_new (object_type, NULL);
	self->priv->parent = parent;
	g_signal_connect_object (parent, "status-notifier-item-registered", (GCallback) ___lambda33__budgie_status_notifier_freedesktop_watcher_status_notifier_item_registered, self, 0);
	g_signal_connect_object (parent, "status-notifier-item-unregistered", (GCallback) ___lambda34__budgie_status_notifier_freedesktop_watcher_status_notifier_item_unregistered, self, 0);
	g_signal_connect_object (parent, "status-notifier-host-registered", (GCallback) ___lambda35__budgie_status_notifier_freedesktop_watcher_status_notifier_host_registered, self, 0);
	self->priv->kde_dbus_identifier = g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, BUDGIE_STATUS_NOTIFIER_WATCHER_KDE_DBUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((_budgie_status_notifier_kde_watcher_on_dbus_acquired_gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _budgie_status_notifier_kde_watcher_on_dbus_acquired_gbus_name_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	return self;
}

BudgieStatusNotifierKdeWatcher*
budgie_status_notifier_kde_watcher_new (BudgieStatusNotifierFreedesktopWatcher* parent)
{
	return budgie_status_notifier_kde_watcher_construct (BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, parent);
}

static void
budgie_status_notifier_kde_watcher_on_dbus_acquired (BudgieStatusNotifierKdeWatcher* self,
                                                     GDBusConnection* conn)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conn != NULL);
	{
		budgie_status_notifier_kde_watcher_register_object (self, conn, BUDGIE_STATUS_NOTIFIER_WATCHER_KDE_DBUS_OBJECT_PATH, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		budgie_status_notifier_kde_watcher_register_object (self, conn, BUDGIE_STATUS_NOTIFIER_WATCHER_BASIC_DBUS_OBJECT_PATH, &_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_critical ("statusnotifier.vala:221: Unable to register status notifier watcher: %" \
"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;
	}
}

void
budgie_status_notifier_kde_watcher_register_status_notifier_item (BudgieStatusNotifierKdeWatcher* self,
                                                                  const gchar* service,
                                                                  const char* sender,
                                                                  GError** error)
{
	BudgieStatusNotifierFreedesktopWatcher* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (sender != NULL);
	_tmp0_ = self->priv->parent;
	budgie_status_notifier_freedesktop_watcher_register_status_notifier_item (_tmp0_, service, sender, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			g_propagate_error (error, _inner_error0_);
			return;
		} else {
			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;
		}
	}
}

void
budgie_status_notifier_kde_watcher_register_status_notifier_host (BudgieStatusNotifierKdeWatcher* self,
                                                                  const gchar* service,
                                                                  GError** error)
{
	BudgieStatusNotifierFreedesktopWatcher* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	_tmp0_ = self->priv->parent;
	budgie_status_notifier_freedesktop_watcher_register_status_notifier_host (_tmp0_, service, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if ((_inner_error0_->domain == G_DBUS_ERROR) || (_inner_error0_->domain == G_IO_ERROR)) {
			g_propagate_error (error, _inner_error0_);
			return;
		} else {
			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;
		}
	}
}

gchar**
budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (BudgieStatusNotifierKdeWatcher* self,
                                                                         gint* result_length1)
{
	gchar** result;
	BudgieStatusNotifierFreedesktopWatcher* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_ = 0;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar** _tmp4_;
	gint _tmp4__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->parent;
	_tmp1_ = budgie_status_notifier_freedesktop_watcher_get_registered_status_notifier_items (_tmp0_, &_tmp2_);
	_tmp1__length1 = _tmp2_;
	_tmp3_ = _tmp1_;
	_tmp3__length1 = _tmp1__length1;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}

gboolean
budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierKdeWatcher* self)
{
	gboolean result;
	BudgieStatusNotifierFreedesktopWatcher* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->parent;
	_tmp1_ = budgie_status_notifier_freedesktop_watcher_get_is_status_notifier_host_registered (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

gint32
budgie_status_notifier_kde_watcher_get_protocol_version (BudgieStatusNotifierKdeWatcher* self)
{
	gint32 result;
	BudgieStatusNotifierFreedesktopWatcher* _tmp0_;
	gint32 _tmp1_;
	gint32 _tmp2_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->parent;
	_tmp1_ = budgie_status_notifier_freedesktop_watcher_get_protocol_version (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static void
budgie_status_notifier_kde_watcher_class_init (BudgieStatusNotifierKdeWatcherClass * klass,
                                               gpointer klass_data)
{
	budgie_status_notifier_kde_watcher_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BudgieStatusNotifierKdeWatcher_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_budgie_status_notifier_kde_watcher_get_property;
	G_OBJECT_CLASS (klass)->finalize = budgie_status_notifier_kde_watcher_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY, budgie_status_notifier_kde_watcher_properties[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY] = g_param_spec_boxed ("registered-status-notifier-items", "registered-status-notifier-items", "registered-status-notifier-items", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY, budgie_status_notifier_kde_watcher_properties[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY] = g_param_spec_boolean ("is-status-notifier-host-registered", "is-status-notifier-host-registered", "is-status-notifier-host-registered", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_PROTOCOL_VERSION_PROPERTY, budgie_status_notifier_kde_watcher_properties[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_PROTOCOL_VERSION_PROPERTY] = g_param_spec_int ("protocol-version", "protocol-version", "protocol-version", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_REGISTERED_SIGNAL] = g_signal_new ("status-notifier-item-registered", BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
	budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_ITEM_UNREGISTERED_SIGNAL] = g_signal_new ("status-notifier-item-unregistered", BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
	budgie_status_notifier_kde_watcher_signals[BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_STATUS_NOTIFIER_HOST_REGISTERED_SIGNAL] = g_signal_new ("status-notifier-host-registered", BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0);
}

static void
budgie_status_notifier_kde_watcher_instance_init (BudgieStatusNotifierKdeWatcher * self,
                                                  gpointer klass)
{
	self->priv = budgie_status_notifier_kde_watcher_get_instance_private (self);
	self->priv->kde_dbus_identifier = (guint) 0;
}

static void
budgie_status_notifier_kde_watcher_finalize (GObject * obj)
{
	BudgieStatusNotifierKdeWatcher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, BudgieStatusNotifierKdeWatcher);
	if (self->priv->kde_dbus_identifier != ((guint) 0)) {
		g_bus_unown_name (self->priv->kde_dbus_identifier);
	}
	G_OBJECT_CLASS (budgie_status_notifier_kde_watcher_parent_class)->finalize (obj);
}

static GType
budgie_status_notifier_kde_watcher_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BudgieStatusNotifierKdeWatcherClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) budgie_status_notifier_kde_watcher_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BudgieStatusNotifierKdeWatcher), 0, (GInstanceInitFunc) budgie_status_notifier_kde_watcher_instance_init, NULL };
	GType budgie_status_notifier_kde_watcher_type_id;
	budgie_status_notifier_kde_watcher_type_id = g_type_register_static (G_TYPE_OBJECT, "BudgieStatusNotifierKdeWatcher", &g_define_type_info, 0);
	g_type_set_qdata (budgie_status_notifier_kde_watcher_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) budgie_status_notifier_kde_watcher_register_object);
	BudgieStatusNotifierKdeWatcher_private_offset = g_type_add_instance_private (budgie_status_notifier_kde_watcher_type_id, sizeof (BudgieStatusNotifierKdeWatcherPrivate));
	return budgie_status_notifier_kde_watcher_type_id;
}

GType
budgie_status_notifier_kde_watcher_get_type (void)
{
	static volatile gsize budgie_status_notifier_kde_watcher_type_id__once = 0;
	if (g_once_init_enter (&budgie_status_notifier_kde_watcher_type_id__once)) {
		GType budgie_status_notifier_kde_watcher_type_id;
		budgie_status_notifier_kde_watcher_type_id = budgie_status_notifier_kde_watcher_get_type_once ();
		g_once_init_leave (&budgie_status_notifier_kde_watcher_type_id__once, budgie_status_notifier_kde_watcher_type_id);
	}
	return budgie_status_notifier_kde_watcher_type_id__once;
}

static void
_vala_budgie_status_notifier_kde_watcher_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	BudgieStatusNotifierKdeWatcher * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BUDGIE_STATUS_NOTIFIER_TYPE_KDE_WATCHER, BudgieStatusNotifierKdeWatcher);
	switch (property_id) {
		case BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_REGISTERED_STATUS_NOTIFIER_ITEMS_PROPERTY:
		{
			int length;
			g_value_take_boxed (value, budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (self, &length));
		}
		break;
		case BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_IS_STATUS_NOTIFIER_HOST_REGISTERED_PROPERTY:
		g_value_set_boolean (value, budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (self));
		break;
		case BUDGIE_STATUS_NOTIFIER_KDE_WATCHER_PROTOCOL_VERSION_PROPERTY:
		g_value_set_int (value, budgie_status_notifier_kde_watcher_get_protocol_version (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_dbus_budgie_status_notifier_kde_watcher_register_status_notifier_item (BudgieStatusNotifierKdeWatcher* self,
                                                                        GVariant* _parameters_,
                                                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* service = NULL;
	GVariant* _tmp47_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp47_ = g_variant_iter_next_value (&_arguments_iter);
	service = g_variant_dup_string (_tmp47_, NULL);
	g_variant_unref (_tmp47_);
	budgie_status_notifier_kde_watcher_register_status_notifier_item (self, service, g_dbus_method_invocation_get_sender (invocation), &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (service);
	;
}

static void
_dbus_budgie_status_notifier_kde_watcher_register_status_notifier_host (BudgieStatusNotifierKdeWatcher* self,
                                                                        GVariant* _parameters_,
                                                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* service = NULL;
	GVariant* _tmp48_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp48_ = g_variant_iter_next_value (&_arguments_iter);
	service = g_variant_dup_string (_tmp48_, NULL);
	g_variant_unref (_tmp48_);
	budgie_status_notifier_kde_watcher_register_status_notifier_host (self, service, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (service);
	;
}

static void
budgie_status_notifier_kde_watcher_dbus_interface_method_call (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* method_name,
                                                               GVariant* parameters,
                                                               GDBusMethodInvocation* invocation,
                                                               gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "RegisterStatusNotifierItem") == 0) {
		_dbus_budgie_status_notifier_kde_watcher_register_status_notifier_item (object, parameters, invocation);
	} else if (strcmp (method_name, "RegisterStatusNotifierHost") == 0) {
		_dbus_budgie_status_notifier_kde_watcher_register_status_notifier_host (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
_dbus_budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (BudgieStatusNotifierKdeWatcher* self)
{
	gchar** result;
	gint result_length1 = 0;
	GVariant* _reply;
	gchar** _tmp49_;
	GVariantBuilder _tmp50_;
	gint _tmp51_;
	result = budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (self, &result_length1);
	_tmp49_ = result;
	g_variant_builder_init (&_tmp50_, G_VARIANT_TYPE ("as"));
	for (_tmp51_ = 0; _tmp51_ < result_length1; _tmp51_++) {
		g_variant_builder_add_value (&_tmp50_, g_variant_new_string (*_tmp49_));
		_tmp49_++;
	}
	_reply = g_variant_builder_end (&_tmp50_);
	result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
	return _reply;
}

static GVariant*
_dbus_budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (BudgieStatusNotifierKdeWatcher* self)
{
	gboolean result;
	GVariant* _reply;
	result = budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
_dbus_budgie_status_notifier_kde_watcher_get_protocol_version (BudgieStatusNotifierKdeWatcher* self)
{
	gint32 result;
	GVariant* _reply;
	result = budgie_status_notifier_kde_watcher_get_protocol_version (self);
	_reply = g_variant_new_int32 (result);
	return _reply;
}

static GVariant*
budgie_status_notifier_kde_watcher_dbus_interface_get_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GError** error,
                                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "RegisteredStatusNotifierItems") == 0) {
		return _dbus_budgie_status_notifier_kde_watcher_get_registered_status_notifier_items (object);
	} else if (strcmp (property_name, "IsStatusNotifierHostRegistered") == 0) {
		return _dbus_budgie_status_notifier_kde_watcher_get_is_status_notifier_host_registered (object);
	} else if (strcmp (property_name, "ProtocolVersion") == 0) {
		return _dbus_budgie_status_notifier_kde_watcher_get_protocol_version (object);
	}
	return NULL;
}

static gboolean
budgie_status_notifier_kde_watcher_dbus_interface_set_property (GDBusConnection* connection,
                                                                const gchar* sender,
                                                                const gchar* object_path,
                                                                const gchar* interface_name,
                                                                const gchar* property_name,
                                                                GVariant* value,
                                                                GError** error,
                                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_budgie_status_notifier_kde_watcher_status_notifier_item_registered (GObject* _sender,
                                                                          const gchar* item,
                                                                          gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (item));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.kde.StatusNotifierWatcher", "StatusNotifierItemRegistered", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_kde_watcher_status_notifier_item_unregistered (GObject* _sender,
                                                                            const gchar* item,
                                                                            gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (item));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.kde.StatusNotifierWatcher", "StatusNotifierItemUnregistered", _arguments, NULL);
}

static void
_dbus_budgie_status_notifier_kde_watcher_status_notifier_host_registered (GObject* _sender,
                                                                          gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.kde.StatusNotifierWatcher", "StatusNotifierHostRegistered", _arguments, NULL);
}

guint
budgie_status_notifier_kde_watcher_register_object (gpointer object,
                                                    GDBusConnection* connection,
                                                    const gchar* path,
                                                    GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_budgie_status_notifier_kde_watcher_dbus_interface_info), &_budgie_status_notifier_kde_watcher_dbus_interface_vtable, data, _budgie_status_notifier_kde_watcher_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "status-notifier-item-registered", (GCallback) _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_registered, data);
	g_signal_connect (object, "status-notifier-item-unregistered", (GCallback) _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_unregistered, data);
	g_signal_connect (object, "status-notifier-host-registered", (GCallback) _dbus_budgie_status_notifier_kde_watcher_status_notifier_host_registered, data);
	return result;
}

static void
_budgie_status_notifier_kde_watcher_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_registered, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_kde_watcher_status_notifier_item_unregistered, data);
	g_signal_handlers_disconnect_by_func (data[0], _dbus_budgie_status_notifier_kde_watcher_status_notifier_host_registered, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

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

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

