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

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

#define CONSTANTS_VERSION "swaync 0.12.6"
#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 TYPE_SWAYNC_DAEMON_DATA (swaync_daemon_data_get_type ())
typedef struct _SwayncDaemonData SwayncDaemonData;

#define TYPE_CC_DAEMON (cc_daemon_get_type ())
#define CC_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CC_DAEMON, CcDaemon))
#define IS_CC_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CC_DAEMON))
#define CC_DAEMON_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CC_DAEMON, CcDaemonIface))

typedef struct _CcDaemon CcDaemon;
typedef struct _CcDaemonIface CcDaemonIface;

#define TYPE_CC_DAEMON_PROXY (cc_daemon_proxy_get_type ())
enum  {
	CC_DAEMON_SUBSCRIBE_V2_SIGNAL,
	CC_DAEMON_NUM_SIGNALS
};
static guint cc_daemon_signals[CC_DAEMON_NUM_SIGNALS] = {0};
typedef GDBusProxy CcDaemonProxy;
typedef GDBusProxyClass CcDaemonProxyClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;

struct _SwayncDaemonData {
	gboolean dnd;
	gboolean cc_open;
	guint count;
	gboolean inhibited;
};

struct _CcDaemonIface {
	GTypeInterface parent_iface;
	gboolean (*reload_css) (CcDaemon* self, GError** error);
	void (*reload_config) (CcDaemon* self, GError** error);
	void (*hide_latest_notifications) (CcDaemon* self, gboolean close, GError** error);
	void (*hide_all_notifications) (CcDaemon* self, GError** error);
	void (*close_all_notifications) (CcDaemon* self, GError** error);
	guint (*notification_count) (CcDaemon* self, GError** error);
	gboolean (*get_dnd) (CcDaemon* self, GError** error);
	void (*set_dnd) (CcDaemon* self, gboolean state, GError** error);
	gboolean (*get_visibility) (CcDaemon* self, GError** error);
	void (*toggle_visibility) (CcDaemon* self, GError** error);
	gboolean (*toggle_dnd) (CcDaemon* self, GError** error);
	void (*set_visibility) (CcDaemon* self, gboolean value, GError** error);
	void (*latest_invoke_action) (CcDaemon* self, guint32 action_index, GError** error);
	gboolean (*set_cc_monitor) (CcDaemon* self, const gchar* monitor, GError** error);
	gboolean (*set_noti_window_monitor) (CcDaemon* self, const gchar* monitor, GError** error);
	void (*get_subscribe_data) (CcDaemon* self, SwayncDaemonData* result, GError** error);
	gboolean (*add_inhibitor) (CcDaemon* self, const gchar* application_id, GError** error);
	gboolean (*remove_inhibitor) (CcDaemon* self, const gchar* application_id, GError** error);
	guint (*number_of_inhibitors) (CcDaemon* self, GError** error);
	gboolean (*is_inhibited) (CcDaemon* self, GError** error);
	gboolean (*clear_inhibitors) (CcDaemon* self, GError** error);
};

struct _Block1Data {
	int _ref_count_;
	gchar** args;
	gint args_length1;
};

struct _Block2Data {
	int _ref_count_;
	Block1Data * _data1_;
	GMainLoop* loop;
};

VALA_EXTERN CcDaemon* cc_daemon;
CcDaemon* cc_daemon = NULL;

VALA_EXTERN GType swaync_daemon_data_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayncDaemonData* swaync_daemon_data_dup (const SwayncDaemonData* self);
VALA_EXTERN void swaync_daemon_data_free (SwayncDaemonData* self);
VALA_EXTERN GType cc_daemon_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint cc_daemon_register_object (void* object,
                                 GDBusConnection* connection,
                                 const gchar* path,
                                 GError** error);
VALA_EXTERN GType cc_daemon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CcDaemon, g_object_unref)
VALA_EXTERN gboolean cc_daemon_reload_css (CcDaemon* self,
                               GError** error);
VALA_EXTERN void cc_daemon_reload_config (CcDaemon* self,
                              GError** error);
VALA_EXTERN void cc_daemon_hide_latest_notifications (CcDaemon* self,
                                          gboolean close,
                                          GError** error);
VALA_EXTERN void cc_daemon_hide_all_notifications (CcDaemon* self,
                                       GError** error);
VALA_EXTERN void cc_daemon_close_all_notifications (CcDaemon* self,
                                        GError** error);
VALA_EXTERN guint cc_daemon_notification_count (CcDaemon* self,
                                    GError** error);
VALA_EXTERN gboolean cc_daemon_get_dnd (CcDaemon* self,
                            GError** error);
VALA_EXTERN void cc_daemon_set_dnd (CcDaemon* self,
                        gboolean state,
                        GError** error);
VALA_EXTERN gboolean cc_daemon_get_visibility (CcDaemon* self,
                                   GError** error);
VALA_EXTERN void cc_daemon_toggle_visibility (CcDaemon* self,
                                  GError** error);
VALA_EXTERN gboolean cc_daemon_toggle_dnd (CcDaemon* self,
                               GError** error);
VALA_EXTERN void cc_daemon_set_visibility (CcDaemon* self,
                               gboolean value,
                               GError** error);
VALA_EXTERN void cc_daemon_latest_invoke_action (CcDaemon* self,
                                     guint32 action_index,
                                     GError** error);
VALA_EXTERN gboolean cc_daemon_set_cc_monitor (CcDaemon* self,
                                   const gchar* monitor,
                                   GError** error);
VALA_EXTERN gboolean cc_daemon_set_noti_window_monitor (CcDaemon* self,
                                            const gchar* monitor,
                                            GError** error);
VALA_EXTERN void cc_daemon_get_subscribe_data (CcDaemon* self,
                                   SwayncDaemonData* result,
                                   GError** error);
VALA_EXTERN gboolean cc_daemon_add_inhibitor (CcDaemon* self,
                                  const gchar* application_id,
                                  GError** error);
VALA_EXTERN gboolean cc_daemon_remove_inhibitor (CcDaemon* self,
                                     const gchar* application_id,
                                     GError** error);
VALA_EXTERN guint cc_daemon_number_of_inhibitors (CcDaemon* self,
                                      GError** error);
VALA_EXTERN gboolean cc_daemon_is_inhibited (CcDaemon* self,
                                 GError** error);
VALA_EXTERN gboolean cc_daemon_clear_inhibitors (CcDaemon* self,
                                     GError** error);
static void g_cclosure_user_marshal_VOID__UINT_BOOLEAN_BOOLEAN_BOOLEAN (GClosure * closure,
                                                                 GValue * return_value,
                                                                 guint n_param_values,
                                                                 const GValue * param_values,
                                                                 gpointer invocation_hint,
                                                                 gpointer marshal_data);
static GType cc_daemon_get_type_once (void);
static void cc_daemon_proxy_g_signal (GDBusProxy* proxy,
                               const gchar* sender_name,
                               const gchar* signal_name,
                               GVariant* parameters);
static void _dbus_handle_cc_daemon_subscribe_v2 (CcDaemon* self,
                                          GVariant* parameters);
static gboolean cc_daemon_proxy_reload_css (CcDaemon* self,
                                     GError** error);
static void cc_daemon_proxy_reload_config (CcDaemon* self,
                                    GError** error);
static void cc_daemon_proxy_hide_latest_notifications (CcDaemon* self,
                                                gboolean close,
                                                GError** error);
static void cc_daemon_proxy_hide_all_notifications (CcDaemon* self,
                                             GError** error);
static void cc_daemon_proxy_close_all_notifications (CcDaemon* self,
                                              GError** error);
static guint cc_daemon_proxy_notification_count (CcDaemon* self,
                                          GError** error);
static gboolean cc_daemon_proxy_get_dnd (CcDaemon* self,
                                  GError** error);
static void cc_daemon_proxy_set_dnd (CcDaemon* self,
                              gboolean state,
                              GError** error);
static gboolean cc_daemon_proxy_get_visibility (CcDaemon* self,
                                         GError** error);
static void cc_daemon_proxy_toggle_visibility (CcDaemon* self,
                                        GError** error);
static gboolean cc_daemon_proxy_toggle_dnd (CcDaemon* self,
                                     GError** error);
static void cc_daemon_proxy_set_visibility (CcDaemon* self,
                                     gboolean value,
                                     GError** error);
static void cc_daemon_proxy_latest_invoke_action (CcDaemon* self,
                                           guint32 action_index,
                                           GError** error);
static gboolean cc_daemon_proxy_set_cc_monitor (CcDaemon* self,
                                         const gchar* monitor,
                                         GError** error);
static gboolean cc_daemon_proxy_set_noti_window_monitor (CcDaemon* self,
                                                  const gchar* monitor,
                                                  GError** error);
static void cc_daemon_proxy_get_subscribe_data (CcDaemon* self,
                                         SwayncDaemonData* result,
                                         GError** error);
static gboolean cc_daemon_proxy_add_inhibitor (CcDaemon* self,
                                        const gchar* application_id,
                                        GError** error);
static gboolean cc_daemon_proxy_remove_inhibitor (CcDaemon* self,
                                           const gchar* application_id,
                                           GError** error);
static guint cc_daemon_proxy_number_of_inhibitors (CcDaemon* self,
                                            GError** error);
static gboolean cc_daemon_proxy_is_inhibited (CcDaemon* self,
                                       GError** error);
static gboolean cc_daemon_proxy_clear_inhibitors (CcDaemon* self,
                                           GError** error);
static void cc_daemon_proxy_cc_daemon_interface_init (CcDaemonIface* iface);
static void _dbus_cc_daemon_reload_css (CcDaemon* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_reload_config (CcDaemon* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_hide_latest_notifications (CcDaemon* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_hide_all_notifications (CcDaemon* self,
                                             GVariant* _parameters_,
                                             GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_close_all_notifications (CcDaemon* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_notification_count (CcDaemon* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_get_dnd (CcDaemon* self,
                              GVariant* _parameters_,
                              GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_set_dnd (CcDaemon* self,
                              GVariant* _parameters_,
                              GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_get_visibility (CcDaemon* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_toggle_visibility (CcDaemon* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_toggle_dnd (CcDaemon* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_set_visibility (CcDaemon* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_latest_invoke_action (CcDaemon* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_set_cc_monitor (CcDaemon* self,
                                     GVariant* _parameters_,
                                     GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_set_noti_window_monitor (CcDaemon* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_get_subscribe_data (CcDaemon* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_add_inhibitor (CcDaemon* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_remove_inhibitor (CcDaemon* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_number_of_inhibitors (CcDaemon* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_is_inhibited (CcDaemon* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation);
static void _dbus_cc_daemon_clear_inhibitors (CcDaemon* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation);
static void cc_daemon_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* cc_daemon_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 gboolean cc_daemon_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_cc_daemon_subscribe_v2 (GObject* _sender,
                                   guint count,
                                   gboolean dnd,
                                   gboolean cc_open,
                                   gboolean inhibited,
                                   gpointer* _data);
static void _cc_daemon_unregister_object (gpointer user_data);
VALA_EXTERN void print_help (gchar** args,
                 gint args_length1);
VALA_EXTERN void on_subscribe (guint count,
                   gboolean dnd,
                   gboolean cc_open,
                   gboolean inhibited);
VALA_EXTERN void print_subscribe (void);
VALA_EXTERN void on_subscribe_waybar (guint count,
                          gboolean dnd,
                          gboolean cc_open,
                          gboolean inhibited);
VALA_EXTERN void print_subscribe_waybar (void);
VALA_EXTERN gint command_line (gchar*** args,
                   gint* args_length1,
                   gboolean skip_wait);
static void _on_subscribe_cc_daemon_subscribe_v2 (CcDaemon* _sender,
                                           guint count,
                                           gboolean dnd,
                                           gboolean cc_open,
                                           gboolean inhibited,
                                           gpointer self);
static void _print_subscribe_gbus_name_appeared_callback (GDBusConnection* connection,
                                                   const gchar* name,
                                                   const gchar* name_owner,
                                                   gpointer self);
static void _print_subscribe_gbus_name_vanished_callback (GDBusConnection* connection,
                                                   const gchar* name,
                                                   gpointer self);
static void _on_subscribe_waybar_cc_daemon_subscribe_v2 (CcDaemon* _sender,
                                                  guint count,
                                                  gboolean dnd,
                                                  gboolean cc_open,
                                                  gboolean inhibited,
                                                  gpointer self);
static void _print_subscribe_waybar_gbus_name_appeared_callback (GDBusConnection* connection,
                                                          const gchar* name,
                                                          const gchar* name_owner,
                                                          gpointer self);
static void _print_subscribe_waybar_gbus_name_vanished_callback (GDBusConnection* connection,
                                                          const gchar* name,
                                                          gpointer self);
static gchar** _vala_array_dup1 (gchar** self,
                          gssize length);
VALA_EXTERN void print_connection_error (void);
VALA_EXTERN gint try_connect (gchar** args,
                  gint args_length1);
static gboolean _vala_string_array_contains (gchar* * stack,
                                      gssize stack_length,
                                      const gchar* needle);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static gint _vala_main (gchar** args,
                 gint args_length1);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gchar** _vala_array_dup3 (gchar** self,
                          gssize length);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ___lambda4_ (Block2Data* _data2_,
                  GDBusConnection* conn,
                  const gchar* name,
                  const gchar* name_owner);
static gchar** _vala_array_dup4 (gchar** self,
                          gssize length);
static void ____lambda4__gbus_name_appeared_callback (GDBusConnection* connection,
                                               const gchar* name,
                                               const gchar* name_owner,
                                               gpointer self);
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 _cc_daemon_dbus_arg_info_reload_css_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_reload_css_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_reload_css_out[] = {&_cc_daemon_dbus_arg_info_reload_css_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_reload_css = {-1, "ReloadCss", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_reload_css_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_reload_css_out), NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_reload_config_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_reload_config_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_reload_config = {-1, "ReloadConfig", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_reload_config_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_reload_config_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_hide_latest_notifications_close = {-1, "close", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_hide_latest_notifications_in[] = {&_cc_daemon_dbus_arg_info_hide_latest_notifications_close, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_hide_latest_notifications_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_hide_latest_notifications = {-1, "HideLatestNotifications", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_hide_latest_notifications_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_hide_latest_notifications_out), NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_hide_all_notifications_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_hide_all_notifications_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_hide_all_notifications = {-1, "HideAllNotifications", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_hide_all_notifications_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_hide_all_notifications_out), NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_close_all_notifications_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_close_all_notifications_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_close_all_notifications = {-1, "CloseAllNotifications", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_close_all_notifications_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_close_all_notifications_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_notification_count_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_notification_count_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_notification_count_out[] = {&_cc_daemon_dbus_arg_info_notification_count_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_notification_count = {-1, "NotificationCount", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_notification_count_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_notification_count_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_get_dnd_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_dnd_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_dnd_out[] = {&_cc_daemon_dbus_arg_info_get_dnd_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_get_dnd = {-1, "GetDnd", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_dnd_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_dnd_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_dnd_state = {-1, "state", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_dnd_in[] = {&_cc_daemon_dbus_arg_info_set_dnd_state, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_dnd_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_set_dnd = {-1, "SetDnd", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_dnd_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_dnd_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_get_visibility_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_visibility_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_visibility_out[] = {&_cc_daemon_dbus_arg_info_get_visibility_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_get_visibility = {-1, "GetVisibility", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_visibility_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_visibility_out), NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_toggle_visibility_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_toggle_visibility_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_toggle_visibility = {-1, "ToggleVisibility", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_toggle_visibility_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_toggle_visibility_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_toggle_dnd_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_toggle_dnd_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_toggle_dnd_out[] = {&_cc_daemon_dbus_arg_info_toggle_dnd_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_toggle_dnd = {-1, "ToggleDnd", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_toggle_dnd_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_toggle_dnd_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_visibility_value = {-1, "value", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_visibility_in[] = {&_cc_daemon_dbus_arg_info_set_visibility_value, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_visibility_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_set_visibility = {-1, "SetVisibility", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_visibility_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_visibility_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_latest_invoke_action_action_index = {-1, "action_index", "u", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_latest_invoke_action_in[] = {&_cc_daemon_dbus_arg_info_latest_invoke_action_action_index, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_latest_invoke_action_out[] = {NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_latest_invoke_action = {-1, "LatestInvokeAction", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_latest_invoke_action_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_latest_invoke_action_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_cc_monitor_monitor = {-1, "monitor", "s", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_cc_monitor_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_cc_monitor_in[] = {&_cc_daemon_dbus_arg_info_set_cc_monitor_monitor, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_cc_monitor_out[] = {&_cc_daemon_dbus_arg_info_set_cc_monitor_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_set_cc_monitor = {-1, "SetCcMonitor", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_cc_monitor_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_cc_monitor_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_noti_window_monitor_monitor = {-1, "monitor", "s", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_set_noti_window_monitor_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_noti_window_monitor_in[] = {&_cc_daemon_dbus_arg_info_set_noti_window_monitor_monitor, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_set_noti_window_monitor_out[] = {&_cc_daemon_dbus_arg_info_set_noti_window_monitor_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_set_noti_window_monitor = {-1, "SetNotiWindowMonitor", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_noti_window_monitor_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_set_noti_window_monitor_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_get_subscribe_data_result = {-1, "result", "(bbub)", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_subscribe_data_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_get_subscribe_data_out[] = {&_cc_daemon_dbus_arg_info_get_subscribe_data_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_get_subscribe_data = {-1, "GetSubscribeData", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_subscribe_data_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_get_subscribe_data_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_add_inhibitor_application_id = {-1, "application_id", "s", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_add_inhibitor_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_add_inhibitor_in[] = {&_cc_daemon_dbus_arg_info_add_inhibitor_application_id, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_add_inhibitor_out[] = {&_cc_daemon_dbus_arg_info_add_inhibitor_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_add_inhibitor = {-1, "AddInhibitor", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_add_inhibitor_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_add_inhibitor_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_remove_inhibitor_application_id = {-1, "application_id", "s", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_remove_inhibitor_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_remove_inhibitor_in[] = {&_cc_daemon_dbus_arg_info_remove_inhibitor_application_id, NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_remove_inhibitor_out[] = {&_cc_daemon_dbus_arg_info_remove_inhibitor_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_remove_inhibitor = {-1, "RemoveInhibitor", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_remove_inhibitor_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_remove_inhibitor_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_number_of_inhibitors_result = {-1, "result", "u", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_number_of_inhibitors_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_number_of_inhibitors_out[] = {&_cc_daemon_dbus_arg_info_number_of_inhibitors_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_number_of_inhibitors = {-1, "NumberOfInhibitors", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_number_of_inhibitors_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_number_of_inhibitors_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_is_inhibited_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_is_inhibited_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_is_inhibited_out[] = {&_cc_daemon_dbus_arg_info_is_inhibited_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_is_inhibited = {-1, "IsInhibited", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_is_inhibited_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_is_inhibited_out), NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_clear_inhibitors_result = {-1, "result", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_clear_inhibitors_in[] = {NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_clear_inhibitors_out[] = {&_cc_daemon_dbus_arg_info_clear_inhibitors_result, NULL};
static const GDBusMethodInfo _cc_daemon_dbus_method_info_clear_inhibitors = {-1, "ClearInhibitors", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_clear_inhibitors_in), (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_clear_inhibitors_out), NULL};
static const GDBusMethodInfo * const _cc_daemon_dbus_method_info[] = {&_cc_daemon_dbus_method_info_reload_css, &_cc_daemon_dbus_method_info_reload_config, &_cc_daemon_dbus_method_info_hide_latest_notifications, &_cc_daemon_dbus_method_info_hide_all_notifications, &_cc_daemon_dbus_method_info_close_all_notifications, &_cc_daemon_dbus_method_info_notification_count, &_cc_daemon_dbus_method_info_get_dnd, &_cc_daemon_dbus_method_info_set_dnd, &_cc_daemon_dbus_method_info_get_visibility, &_cc_daemon_dbus_method_info_toggle_visibility, &_cc_daemon_dbus_method_info_toggle_dnd, &_cc_daemon_dbus_method_info_set_visibility, &_cc_daemon_dbus_method_info_latest_invoke_action, &_cc_daemon_dbus_method_info_set_cc_monitor, &_cc_daemon_dbus_method_info_set_noti_window_monitor, &_cc_daemon_dbus_method_info_get_subscribe_data, &_cc_daemon_dbus_method_info_add_inhibitor, &_cc_daemon_dbus_method_info_remove_inhibitor, &_cc_daemon_dbus_method_info_number_of_inhibitors, &_cc_daemon_dbus_method_info_is_inhibited, &_cc_daemon_dbus_method_info_clear_inhibitors, NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_subscribe_v2_count = {-1, "count", "u", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_subscribe_v2_dnd = {-1, "dnd", "b", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_subscribe_v2_cc_open = {-1, "cc_open", "b", NULL};
static const GDBusArgInfo _cc_daemon_dbus_arg_info_subscribe_v2_inhibited = {-1, "inhibited", "b", NULL};
static const GDBusArgInfo * const _cc_daemon_dbus_arg_info_subscribe_v2[] = {&_cc_daemon_dbus_arg_info_subscribe_v2_count, &_cc_daemon_dbus_arg_info_subscribe_v2_dnd, &_cc_daemon_dbus_arg_info_subscribe_v2_cc_open, &_cc_daemon_dbus_arg_info_subscribe_v2_inhibited, NULL};
static const GDBusSignalInfo _cc_daemon_dbus_signal_info_subscribe_v2 = {-1, "SubscribeV2", (GDBusArgInfo **) (&_cc_daemon_dbus_arg_info_subscribe_v2), NULL};
static const GDBusSignalInfo * const _cc_daemon_dbus_signal_info[] = {&_cc_daemon_dbus_signal_info_subscribe_v2, NULL};
static const GDBusPropertyInfo * const _cc_daemon_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _cc_daemon_dbus_interface_info = {-1, "org.erikreider.swaync.cc", (GDBusMethodInfo **) (&_cc_daemon_dbus_method_info), (GDBusSignalInfo **) (&_cc_daemon_dbus_signal_info), (GDBusPropertyInfo **) (&_cc_daemon_dbus_property_info), NULL};
static const GDBusInterfaceVTable _cc_daemon_dbus_interface_vtable = {cc_daemon_dbus_interface_method_call, cc_daemon_dbus_interface_get_property, cc_daemon_dbus_interface_set_property};

SwayncDaemonData*
swaync_daemon_data_dup (const SwayncDaemonData* self)
{
	SwayncDaemonData* dup;
	dup = g_new0 (SwayncDaemonData, 1);
	memcpy (dup, self, sizeof (SwayncDaemonData));
	return dup;
}

void
swaync_daemon_data_free (SwayncDaemonData* self)
{
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
swaync_daemon_data_get_type_once (void)
{
	GType swaync_daemon_data_type_id;
	swaync_daemon_data_type_id = g_boxed_type_register_static ("SwayncDaemonData", (GBoxedCopyFunc) swaync_daemon_data_dup, (GBoxedFreeFunc) swaync_daemon_data_free);
	return swaync_daemon_data_type_id;
}

GType
swaync_daemon_data_get_type (void)
{
	static gsize swaync_daemon_data_type_id__once = 0;
	if (g_once_init_enter (&swaync_daemon_data_type_id__once)) {
		GType swaync_daemon_data_type_id;
		swaync_daemon_data_type_id = swaync_daemon_data_get_type_once ();
		g_once_init_leave (&swaync_daemon_data_type_id__once, swaync_daemon_data_type_id);
	}
	return swaync_daemon_data_type_id__once;
}

gboolean
cc_daemon_reload_css (CcDaemon* self,
                      GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->reload_css) {
		return _iface_->reload_css (self, error);
	}
	return FALSE;
}

void
cc_daemon_reload_config (CcDaemon* self,
                         GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->reload_config) {
		_iface_->reload_config (self, error);
	}
}

void
cc_daemon_hide_latest_notifications (CcDaemon* self,
                                     gboolean close,
                                     GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->hide_latest_notifications) {
		_iface_->hide_latest_notifications (self, close, error);
	}
}

void
cc_daemon_hide_all_notifications (CcDaemon* self,
                                  GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->hide_all_notifications) {
		_iface_->hide_all_notifications (self, error);
	}
}

void
cc_daemon_close_all_notifications (CcDaemon* self,
                                   GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->close_all_notifications) {
		_iface_->close_all_notifications (self, error);
	}
}

guint
cc_daemon_notification_count (CcDaemon* self,
                              GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), 0U);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->notification_count) {
		return _iface_->notification_count (self, error);
	}
	return 0U;
}

gboolean
cc_daemon_get_dnd (CcDaemon* self,
                   GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->get_dnd) {
		return _iface_->get_dnd (self, error);
	}
	return FALSE;
}

void
cc_daemon_set_dnd (CcDaemon* self,
                   gboolean state,
                   GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->set_dnd) {
		_iface_->set_dnd (self, state, error);
	}
}

gboolean
cc_daemon_get_visibility (CcDaemon* self,
                          GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->get_visibility) {
		return _iface_->get_visibility (self, error);
	}
	return FALSE;
}

void
cc_daemon_toggle_visibility (CcDaemon* self,
                             GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->toggle_visibility) {
		_iface_->toggle_visibility (self, error);
	}
}

gboolean
cc_daemon_toggle_dnd (CcDaemon* self,
                      GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->toggle_dnd) {
		return _iface_->toggle_dnd (self, error);
	}
	return FALSE;
}

void
cc_daemon_set_visibility (CcDaemon* self,
                          gboolean value,
                          GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->set_visibility) {
		_iface_->set_visibility (self, value, error);
	}
}

void
cc_daemon_latest_invoke_action (CcDaemon* self,
                                guint32 action_index,
                                GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->latest_invoke_action) {
		_iface_->latest_invoke_action (self, action_index, error);
	}
}

gboolean
cc_daemon_set_cc_monitor (CcDaemon* self,
                          const gchar* monitor,
                          GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->set_cc_monitor) {
		return _iface_->set_cc_monitor (self, monitor, error);
	}
	return FALSE;
}

gboolean
cc_daemon_set_noti_window_monitor (CcDaemon* self,
                                   const gchar* monitor,
                                   GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->set_noti_window_monitor) {
		return _iface_->set_noti_window_monitor (self, monitor, error);
	}
	return FALSE;
}

void
cc_daemon_get_subscribe_data (CcDaemon* self,
                              SwayncDaemonData* result,
                              GError** error)
{
	CcDaemonIface* _iface_;
	g_return_if_fail (IS_CC_DAEMON (self));
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->get_subscribe_data) {
		_iface_->get_subscribe_data (self, result, error);
	}
}

gboolean
cc_daemon_add_inhibitor (CcDaemon* self,
                         const gchar* application_id,
                         GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->add_inhibitor) {
		return _iface_->add_inhibitor (self, application_id, error);
	}
	return FALSE;
}

gboolean
cc_daemon_remove_inhibitor (CcDaemon* self,
                            const gchar* application_id,
                            GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->remove_inhibitor) {
		return _iface_->remove_inhibitor (self, application_id, error);
	}
	return FALSE;
}

guint
cc_daemon_number_of_inhibitors (CcDaemon* self,
                                GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), 0U);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->number_of_inhibitors) {
		return _iface_->number_of_inhibitors (self, error);
	}
	return 0U;
}

gboolean
cc_daemon_is_inhibited (CcDaemon* self,
                        GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->is_inhibited) {
		return _iface_->is_inhibited (self, error);
	}
	return FALSE;
}

gboolean
cc_daemon_clear_inhibitors (CcDaemon* self,
                            GError** error)
{
	CcDaemonIface* _iface_;
	g_return_val_if_fail (IS_CC_DAEMON (self), FALSE);
	_iface_ = CC_DAEMON_GET_INTERFACE (self);
	if (_iface_->clear_inhibitors) {
		return _iface_->clear_inhibitors (self, error);
	}
	return FALSE;
}

static void
g_cclosure_user_marshal_VOID__UINT_BOOLEAN_BOOLEAN_BOOLEAN (GClosure * closure,
                                                            GValue * return_value,
                                                            guint n_param_values,
                                                            const GValue * param_values,
                                                            gpointer invocation_hint,
                                                            gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_BOOLEAN_BOOLEAN_BOOLEAN) (gpointer data1, guint arg_1, gboolean arg_2, gboolean arg_3, gboolean arg_4, gpointer data2);
	register GMarshalFunc_VOID__UINT_BOOLEAN_BOOLEAN_BOOLEAN 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__UINT_BOOLEAN_BOOLEAN_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_boolean (param_values + 2), g_value_get_boolean (param_values + 3), g_value_get_boolean (param_values + 4), data2);
}

static void
cc_daemon_default_init (CcDaemonIface * iface,
                        gpointer iface_data)
{
	cc_daemon_signals[CC_DAEMON_SUBSCRIBE_V2_SIGNAL] = g_signal_new ("subscribe-v2", TYPE_CC_DAEMON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_BOOLEAN_BOOLEAN_BOOLEAN, G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
}

 G_GNUC_NO_INLINE static GType
cc_daemon_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (CcDaemonIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) cc_daemon_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType cc_daemon_type_id;
	cc_daemon_type_id = g_type_register_static (G_TYPE_INTERFACE, "CcDaemon", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (cc_daemon_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (cc_daemon_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) cc_daemon_proxy_get_type);
	g_type_set_qdata (cc_daemon_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.erikreider.swaync.cc");
	g_type_set_qdata (cc_daemon_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_cc_daemon_dbus_interface_info));
	g_type_set_qdata (cc_daemon_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) cc_daemon_register_object);
	return cc_daemon_type_id;
}

GType
cc_daemon_get_type (void)
{
	static gsize cc_daemon_type_id__once = 0;
	if (g_once_init_enter (&cc_daemon_type_id__once)) {
		GType cc_daemon_type_id;
		cc_daemon_type_id = cc_daemon_get_type_once ();
		g_once_init_leave (&cc_daemon_type_id__once, cc_daemon_type_id);
	}
	return cc_daemon_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (CcDaemonProxy, cc_daemon_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_CC_DAEMON, cc_daemon_proxy_cc_daemon_interface_init) )
static void
cc_daemon_proxy_class_init (CcDaemonProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = cc_daemon_proxy_g_signal;
}

static void
_dbus_handle_cc_daemon_subscribe_v2 (CcDaemon* self,
                                     GVariant* parameters)
{
	GVariantIter _arguments_iter;
	guint count = 0U;
	GVariant* _tmp0_;
	gboolean dnd = FALSE;
	GVariant* _tmp1_;
	gboolean cc_open = FALSE;
	GVariant* _tmp2_;
	gboolean inhibited = FALSE;
	GVariant* _tmp3_;
	g_variant_iter_init (&_arguments_iter, parameters);
	_tmp0_ = g_variant_iter_next_value (&_arguments_iter);
	count = g_variant_get_uint32 (_tmp0_);
	g_variant_unref (_tmp0_);
	_tmp1_ = g_variant_iter_next_value (&_arguments_iter);
	dnd = g_variant_get_boolean (_tmp1_);
	g_variant_unref (_tmp1_);
	_tmp2_ = g_variant_iter_next_value (&_arguments_iter);
	cc_open = g_variant_get_boolean (_tmp2_);
	g_variant_unref (_tmp2_);
	_tmp3_ = g_variant_iter_next_value (&_arguments_iter);
	inhibited = g_variant_get_boolean (_tmp3_);
	g_variant_unref (_tmp3_);
	g_signal_emit_by_name (self, "subscribe-v2", count, dnd, cc_open, inhibited);
}

static void
cc_daemon_proxy_g_signal (GDBusProxy* proxy,
                          const gchar* sender_name,
                          const gchar* signal_name,
                          GVariant* parameters)
{
	if (strcmp (signal_name, "SubscribeV2") == 0) {
		_dbus_handle_cc_daemon_subscribe_v2 ((CcDaemon*) proxy, parameters);
	}
}

static void
cc_daemon_proxy_init (CcDaemonProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_cc_daemon_dbus_interface_info));
}

static gboolean
cc_daemon_proxy_reload_css (CcDaemon* self,
                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp6_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "ReloadCss");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp4_ = FALSE;
		return _tmp4_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp5_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp5_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp6_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp6_);
	g_variant_unref (_tmp6_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_reload_config (CcDaemon* self,
                               GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "ReloadConfig");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
cc_daemon_proxy_hide_latest_notifications (CcDaemon* self,
                                           gboolean close,
                                           GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "HideLatestNotifications");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (close));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
cc_daemon_proxy_hide_all_notifications (CcDaemon* self,
                                        GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "HideAllNotifications");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
cc_daemon_proxy_close_all_notifications (CcDaemon* self,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "CloseAllNotifications");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static guint
cc_daemon_proxy_notification_count (CcDaemon* self,
                                    GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint _result = 0U;
	GVariant* _tmp9_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "NotificationCount");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		guint _tmp7_ = 0U;
		return _tmp7_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint _tmp8_ = 0U;
		g_object_unref (_reply_message);
		return _tmp8_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp9_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp9_);
	g_variant_unref (_tmp9_);
	g_object_unref (_reply_message);
	return _result;
}

static gboolean
cc_daemon_proxy_get_dnd (CcDaemon* self,
                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp12_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "GetDnd");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp10_ = FALSE;
		return _tmp10_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp11_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp11_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp12_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp12_);
	g_variant_unref (_tmp12_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_set_dnd (CcDaemon* self,
                         gboolean state,
                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "SetDnd");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (state));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gboolean
cc_daemon_proxy_get_visibility (CcDaemon* self,
                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp15_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "GetVisibility");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp13_ = FALSE;
		return _tmp13_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp14_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp14_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp15_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp15_);
	g_variant_unref (_tmp15_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_toggle_visibility (CcDaemon* self,
                                   GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "ToggleVisibility");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gboolean
cc_daemon_proxy_toggle_dnd (CcDaemon* self,
                            GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp18_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "ToggleDnd");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp16_ = FALSE;
		return _tmp16_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp17_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp17_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp18_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp18_);
	g_variant_unref (_tmp18_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_set_visibility (CcDaemon* self,
                                gboolean value,
                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "SetVisibility");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
cc_daemon_proxy_latest_invoke_action (CcDaemon* self,
                                      guint32 action_index,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "LatestInvokeAction");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_uint32 (action_index));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static gboolean
cc_daemon_proxy_set_cc_monitor (CcDaemon* self,
                                const gchar* monitor,
                                GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp21_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "SetCcMonitor");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (monitor));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp19_ = FALSE;
		return _tmp19_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp20_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp20_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp21_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp21_);
	g_variant_unref (_tmp21_);
	g_object_unref (_reply_message);
	return _result;
}

static gboolean
cc_daemon_proxy_set_noti_window_monitor (CcDaemon* self,
                                         const gchar* monitor,
                                         GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp24_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "SetNotiWindowMonitor");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (monitor));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp22_ = FALSE;
		return _tmp22_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp23_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp23_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp24_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp24_);
	g_variant_unref (_tmp24_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_get_subscribe_data (CcDaemon* self,
                                    SwayncDaemonData* result,
                                    GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	GVariant* _tmp25_;
	SwayncDaemonData _tmp26_;
	GVariantIter _tmp27_;
	GVariant* _tmp28_;
	GVariant* _tmp29_;
	GVariant* _tmp30_;
	GVariant* _tmp31_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "GetSubscribeData");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp25_ = g_variant_iter_next_value (&_reply_iter);
	g_variant_iter_init (&_tmp27_, _tmp25_);
	_tmp28_ = g_variant_iter_next_value (&_tmp27_);
	_tmp26_.dnd = g_variant_get_boolean (_tmp28_);
	g_variant_unref (_tmp28_);
	_tmp29_ = g_variant_iter_next_value (&_tmp27_);
	_tmp26_.cc_open = g_variant_get_boolean (_tmp29_);
	g_variant_unref (_tmp29_);
	_tmp30_ = g_variant_iter_next_value (&_tmp27_);
	_tmp26_.count = g_variant_get_uint32 (_tmp30_);
	g_variant_unref (_tmp30_);
	_tmp31_ = g_variant_iter_next_value (&_tmp27_);
	_tmp26_.inhibited = g_variant_get_boolean (_tmp31_);
	g_variant_unref (_tmp31_);
	*result = _tmp26_;
	g_variant_unref (_tmp25_);
	g_object_unref (_reply_message);
}

static gboolean
cc_daemon_proxy_add_inhibitor (CcDaemon* self,
                               const gchar* application_id,
                               GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp34_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "AddInhibitor");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (application_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp32_ = FALSE;
		return _tmp32_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp33_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp33_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp34_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp34_);
	g_variant_unref (_tmp34_);
	g_object_unref (_reply_message);
	return _result;
}

static gboolean
cc_daemon_proxy_remove_inhibitor (CcDaemon* self,
                                  const gchar* application_id,
                                  GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp37_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "RemoveInhibitor");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (application_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp35_ = FALSE;
		return _tmp35_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp36_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp36_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp37_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp37_);
	g_variant_unref (_tmp37_);
	g_object_unref (_reply_message);
	return _result;
}

static guint
cc_daemon_proxy_number_of_inhibitors (CcDaemon* self,
                                      GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	guint _result = 0U;
	GVariant* _tmp40_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "NumberOfInhibitors");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		guint _tmp38_ = 0U;
		return _tmp38_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		guint _tmp39_ = 0U;
		g_object_unref (_reply_message);
		return _tmp39_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp40_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_uint32 (_tmp40_);
	g_variant_unref (_tmp40_);
	g_object_unref (_reply_message);
	return _result;
}

static gboolean
cc_daemon_proxy_is_inhibited (CcDaemon* self,
                              GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp43_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "IsInhibited");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp41_ = FALSE;
		return _tmp41_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp42_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp42_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp43_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp43_);
	g_variant_unref (_tmp43_);
	g_object_unref (_reply_message);
	return _result;
}

static gboolean
cc_daemon_proxy_clear_inhibitors (CcDaemon* self,
                                  GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gboolean _result = FALSE;
	GVariant* _tmp46_;
	G_DBUS_ERROR;
	G_IO_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.erikreider.swaync.cc", "ClearInhibitors");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		gboolean _tmp44_ = FALSE;
		return _tmp44_;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		gboolean _tmp45_ = FALSE;
		g_object_unref (_reply_message);
		return _tmp45_;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp46_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_get_boolean (_tmp46_);
	g_variant_unref (_tmp46_);
	g_object_unref (_reply_message);
	return _result;
}

static void
cc_daemon_proxy_cc_daemon_interface_init (CcDaemonIface* iface)
{
	iface->reload_css = cc_daemon_proxy_reload_css;
	iface->reload_config = cc_daemon_proxy_reload_config;
	iface->hide_latest_notifications = cc_daemon_proxy_hide_latest_notifications;
	iface->hide_all_notifications = cc_daemon_proxy_hide_all_notifications;
	iface->close_all_notifications = cc_daemon_proxy_close_all_notifications;
	iface->notification_count = cc_daemon_proxy_notification_count;
	iface->get_dnd = cc_daemon_proxy_get_dnd;
	iface->set_dnd = cc_daemon_proxy_set_dnd;
	iface->get_visibility = cc_daemon_proxy_get_visibility;
	iface->toggle_visibility = cc_daemon_proxy_toggle_visibility;
	iface->toggle_dnd = cc_daemon_proxy_toggle_dnd;
	iface->set_visibility = cc_daemon_proxy_set_visibility;
	iface->latest_invoke_action = cc_daemon_proxy_latest_invoke_action;
	iface->set_cc_monitor = cc_daemon_proxy_set_cc_monitor;
	iface->set_noti_window_monitor = cc_daemon_proxy_set_noti_window_monitor;
	iface->get_subscribe_data = cc_daemon_proxy_get_subscribe_data;
	iface->add_inhibitor = cc_daemon_proxy_add_inhibitor;
	iface->remove_inhibitor = cc_daemon_proxy_remove_inhibitor;
	iface->number_of_inhibitors = cc_daemon_proxy_number_of_inhibitors;
	iface->is_inhibited = cc_daemon_proxy_is_inhibited;
	iface->clear_inhibitors = cc_daemon_proxy_clear_inhibitors;
}

static void
_dbus_cc_daemon_reload_css (CcDaemon* self,
                            GVariant* _parameters_,
                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_reload_css (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_reload_config (CcDaemon* self,
                               GVariant* _parameters_,
                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	cc_daemon_reload_config (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_hide_latest_notifications (CcDaemon* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean close = FALSE;
	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);
	close = g_variant_get_boolean (_tmp47_);
	g_variant_unref (_tmp47_);
	cc_daemon_hide_latest_notifications (self, close, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_hide_all_notifications (CcDaemon* self,
                                        GVariant* _parameters_,
                                        GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	cc_daemon_hide_all_notifications (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_close_all_notifications (CcDaemon* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	cc_daemon_close_all_notifications (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_notification_count (CcDaemon* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_notification_count (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_get_dnd (CcDaemon* self,
                         GVariant* _parameters_,
                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_get_dnd (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_set_dnd (CcDaemon* self,
                         GVariant* _parameters_,
                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean state = FALSE;
	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);
	state = g_variant_get_boolean (_tmp48_);
	g_variant_unref (_tmp48_);
	cc_daemon_set_dnd (self, state, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_get_visibility (CcDaemon* self,
                                GVariant* _parameters_,
                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_get_visibility (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_toggle_visibility (CcDaemon* self,
                                   GVariant* _parameters_,
                                   GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	cc_daemon_toggle_visibility (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_toggle_dnd (CcDaemon* self,
                            GVariant* _parameters_,
                            GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_toggle_dnd (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_set_visibility (CcDaemon* self,
                                GVariant* _parameters_,
                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gboolean value = FALSE;
	GVariant* _tmp49_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp49_ = g_variant_iter_next_value (&_arguments_iter);
	value = g_variant_get_boolean (_tmp49_);
	g_variant_unref (_tmp49_);
	cc_daemon_set_visibility (self, value, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_latest_invoke_action (CcDaemon* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	guint32 action_index = 0U;
	GVariant* _tmp50_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp50_ = g_variant_iter_next_value (&_arguments_iter);
	action_index = g_variant_get_uint32 (_tmp50_);
	g_variant_unref (_tmp50_);
	cc_daemon_latest_invoke_action (self, action_index, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_set_cc_monitor (CcDaemon* self,
                                GVariant* _parameters_,
                                GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* monitor = NULL;
	GVariant* _tmp51_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp51_ = g_variant_iter_next_value (&_arguments_iter);
	monitor = g_variant_dup_string (_tmp51_, NULL);
	g_variant_unref (_tmp51_);
	result = cc_daemon_set_cc_monitor (self, monitor, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_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 (monitor);
	;
}

static void
_dbus_cc_daemon_set_noti_window_monitor (CcDaemon* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* monitor = NULL;
	GVariant* _tmp52_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp52_ = g_variant_iter_next_value (&_arguments_iter);
	monitor = g_variant_dup_string (_tmp52_, NULL);
	g_variant_unref (_tmp52_);
	result = cc_daemon_set_noti_window_monitor (self, monitor, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_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 (monitor);
	;
}

static void
_dbus_cc_daemon_get_subscribe_data (CcDaemon* self,
                                    GVariant* _parameters_,
                                    GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	SwayncDaemonData result = {0};
	GVariantBuilder _tmp53_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	cc_daemon_get_subscribe_data (self, &result, &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);
	g_variant_builder_init (&_tmp53_, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_tmp53_, g_variant_new_boolean (result.dnd));
	g_variant_builder_add_value (&_tmp53_, g_variant_new_boolean (result.cc_open));
	g_variant_builder_add_value (&_tmp53_, g_variant_new_uint32 (result.count));
	g_variant_builder_add_value (&_tmp53_, g_variant_new_boolean (result.inhibited));
	g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp53_));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_add_inhibitor (CcDaemon* self,
                               GVariant* _parameters_,
                               GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* application_id = NULL;
	GVariant* _tmp54_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp54_ = g_variant_iter_next_value (&_arguments_iter);
	application_id = g_variant_dup_string (_tmp54_, NULL);
	g_variant_unref (_tmp54_);
	result = cc_daemon_add_inhibitor (self, application_id, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_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 (application_id);
	;
}

static void
_dbus_cc_daemon_remove_inhibitor (CcDaemon* self,
                                  GVariant* _parameters_,
                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	gchar* application_id = NULL;
	GVariant* _tmp55_;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_tmp55_ = g_variant_iter_next_value (&_arguments_iter);
	application_id = g_variant_dup_string (_tmp55_, NULL);
	g_variant_unref (_tmp55_);
	result = cc_daemon_remove_inhibitor (self, application_id, &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);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_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 (application_id);
	;
}

static void
_dbus_cc_daemon_number_of_inhibitors (CcDaemon* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	guint result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_number_of_inhibitors (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_uint32 (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_is_inhibited (CcDaemon* self,
                              GVariant* _parameters_,
                              GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_is_inhibited (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
_dbus_cc_daemon_clear_inhibitors (CcDaemon* self,
                                  GVariant* _parameters_,
                                  GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gboolean result;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	result = cc_daemon_clear_inhibitors (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
	_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
cc_daemon_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, "ReloadCss") == 0) {
		_dbus_cc_daemon_reload_css (object, parameters, invocation);
	} else if (strcmp (method_name, "ReloadConfig") == 0) {
		_dbus_cc_daemon_reload_config (object, parameters, invocation);
	} else if (strcmp (method_name, "HideLatestNotifications") == 0) {
		_dbus_cc_daemon_hide_latest_notifications (object, parameters, invocation);
	} else if (strcmp (method_name, "HideAllNotifications") == 0) {
		_dbus_cc_daemon_hide_all_notifications (object, parameters, invocation);
	} else if (strcmp (method_name, "CloseAllNotifications") == 0) {
		_dbus_cc_daemon_close_all_notifications (object, parameters, invocation);
	} else if (strcmp (method_name, "NotificationCount") == 0) {
		_dbus_cc_daemon_notification_count (object, parameters, invocation);
	} else if (strcmp (method_name, "GetDnd") == 0) {
		_dbus_cc_daemon_get_dnd (object, parameters, invocation);
	} else if (strcmp (method_name, "SetDnd") == 0) {
		_dbus_cc_daemon_set_dnd (object, parameters, invocation);
	} else if (strcmp (method_name, "GetVisibility") == 0) {
		_dbus_cc_daemon_get_visibility (object, parameters, invocation);
	} else if (strcmp (method_name, "ToggleVisibility") == 0) {
		_dbus_cc_daemon_toggle_visibility (object, parameters, invocation);
	} else if (strcmp (method_name, "ToggleDnd") == 0) {
		_dbus_cc_daemon_toggle_dnd (object, parameters, invocation);
	} else if (strcmp (method_name, "SetVisibility") == 0) {
		_dbus_cc_daemon_set_visibility (object, parameters, invocation);
	} else if (strcmp (method_name, "LatestInvokeAction") == 0) {
		_dbus_cc_daemon_latest_invoke_action (object, parameters, invocation);
	} else if (strcmp (method_name, "SetCcMonitor") == 0) {
		_dbus_cc_daemon_set_cc_monitor (object, parameters, invocation);
	} else if (strcmp (method_name, "SetNotiWindowMonitor") == 0) {
		_dbus_cc_daemon_set_noti_window_monitor (object, parameters, invocation);
	} else if (strcmp (method_name, "GetSubscribeData") == 0) {
		_dbus_cc_daemon_get_subscribe_data (object, parameters, invocation);
	} else if (strcmp (method_name, "AddInhibitor") == 0) {
		_dbus_cc_daemon_add_inhibitor (object, parameters, invocation);
	} else if (strcmp (method_name, "RemoveInhibitor") == 0) {
		_dbus_cc_daemon_remove_inhibitor (object, parameters, invocation);
	} else if (strcmp (method_name, "NumberOfInhibitors") == 0) {
		_dbus_cc_daemon_number_of_inhibitors (object, parameters, invocation);
	} else if (strcmp (method_name, "IsInhibited") == 0) {
		_dbus_cc_daemon_is_inhibited (object, parameters, invocation);
	} else if (strcmp (method_name, "ClearInhibitors") == 0) {
		_dbus_cc_daemon_clear_inhibitors (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
cc_daemon_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];
	return NULL;
}

static gboolean
cc_daemon_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_cc_daemon_subscribe_v2 (GObject* _sender,
                              guint count,
                              gboolean dnd,
                              gboolean cc_open,
                              gboolean inhibited,
                              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_uint32 (count));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (dnd));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (cc_open));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (inhibited));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "org.erikreider.swaync.cc", "SubscribeV2", _arguments, NULL);
}

guint
cc_daemon_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 *) (&_cc_daemon_dbus_interface_info), &_cc_daemon_dbus_interface_vtable, data, _cc_daemon_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "subscribe-v2", (GCallback) _dbus_cc_daemon_subscribe_v2, data);
	return result;
}

static void
_cc_daemon_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_cc_daemon_subscribe_v2, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
print_help (gchar** args,
            gint args_length1)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_print ("Usage:\n");
	_tmp0_ = args[0];
	_tmp1_ = g_strdup_printf ("  %s <OPTION>\n", _tmp0_);
	_tmp2_ = _tmp1_;
	g_print ("%s", _tmp2_);
	_g_free0 (_tmp2_);
	g_print ("Help:\n");
	g_print ("  -h, \t --help \t\t\t Show help options\n");
	g_print ("  -v, \t --version \t\t\t Prints version\n");
	g_print ("Options:\n");
	g_print ("  -R, \t --reload-config \t\t Reload the config file\n");
	g_print ("  -rs, \t --reload-css \t\t\t Reload the css file. Location change req" \
"uires restart\n");
	g_print ("  -t, \t --toggle-panel \t\t Toggle the notification panel\n");
	g_print ("  -op, \t --open-panel \t\t\t Opens the notification panel\n");
	g_print ("  -cp, \t --close-panel \t\t\t Closes the notification panel\n");
	g_print ("  -d, \t --toggle-dnd \t\t\t Toggle and print the current dnd state\n");
	g_print ("  -D, \t --get-dnd \t\t\t Print the current dnd state\n");
	g_print ("  -dn, \t --dnd-on \t\t\t Turn dnd on and print the new dnd state\n");
	g_print ("  -df, \t --dnd-off \t\t\t Turn dnd off and print the new dnd state\n");
	g_print ("  -I, \t --get-inhibited \t\t Print if currently inhibited or not\n");
	g_print ("  -In, \t --get-num-inhibitors \t\t Print number of inhibitors\n");
	g_print ("  -Ia, \t --inhibitor-add [APP_ID] \t Add an inhibitor\n");
	g_print ("  -Ir, \t --inhibitor-remove [APP_ID] \t Remove an inhibitor\n");
	g_print ("  -Ic, \t --inhibitors-clear \t\t Clears all inhibitors\n");
	g_print ("  -c, \t --count \t\t\t Print the current notification count\n");
	g_print ("      \t --hide-latest \t\t\t Hides latest notification. Still shown i" \
"n Control Center\n");
	g_print ("      \t --hide-all \t\t\t Hides all notifications. Still shown in Con" \
"trol Center\n");
	g_print ("      \t --close-latest \t\t Closes latest notification\n");
	g_print ("  -C, \t --close-all \t\t\t Closes all notifications\n");
	g_print ("%s", "  -a, \t --action [ACTION_INDEX]\t " "Invokes the action [ACTION_INDEX] of the latest notification\n");
	g_print ("  -sw, \t --skip-wait \t\t\t Doesn't wait when swaync hasn't been star" \
"ted\n");
	g_print ("  -s, \t --subscribe \t\t\t Subscribe to notification add and close ev" \
"ents\n");
	g_print ("%s", "  -swb,  --subscribe-waybar \t\t Subscribe to notification add and clo" \
"se events " "with waybar support. Read README for example\n");
	g_print ("%s", "      \t --change-cc-monitor \t\t Changes the preferred control center" \
" monitor" " (resets on config reload)\n");
	g_print ("%s", "      \t --change-noti-monitor \t\t Changes the preferred notification" \
" monitor" " (resets on config reload)\n");
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

void
on_subscribe (guint count,
              gboolean dnd,
              gboolean cc_open,
              gboolean inhibited)
{
	FILE* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	FILE* _tmp7_;
	_tmp0_ = stdout;
	_tmp1_ = bool_to_string (dnd);
	_tmp2_ = _tmp1_;
	_tmp3_ = bool_to_string (cc_open);
	_tmp4_ = _tmp3_;
	_tmp5_ = bool_to_string (inhibited);
	_tmp6_ = _tmp5_;
	fprintf (_tmp0_, "{ \"count\": %u, \"dnd\": %s, \"visible\": %s, \"inhibited\": %s }\n", count, _tmp2_, _tmp4_, _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	_tmp7_ = stdout;
	fflush (_tmp7_);
}

void
print_subscribe (void)
{
	GError* _inner_error0_ = NULL;
	{
		SwayncDaemonData data = {0};
		CcDaemon* _tmp0_;
		SwayncDaemonData _tmp1_ = {0};
		SwayncDaemonData _tmp2_;
		SwayncDaemonData _tmp3_;
		SwayncDaemonData _tmp4_;
		SwayncDaemonData _tmp5_;
		_tmp0_ = cc_daemon;
		cc_daemon_get_subscribe_data (_tmp0_, &_tmp1_, &_inner_error0_);
		data = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = data;
		_tmp3_ = data;
		_tmp4_ = data;
		_tmp5_ = data;
		on_subscribe (_tmp2_.count, _tmp3_.dnd, _tmp4_.cc_open, _tmp5_.inhibited);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		on_subscribe ((guint) 0, FALSE, FALSE, FALSE);
	}
	__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
on_subscribe_waybar (guint count,
                     gboolean dnd,
                     gboolean cc_open,
                     gboolean inhibited)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* state = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* tooltip = NULL;
	gchar* _tmp7_;
	gchar* _class = NULL;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	if (dnd) {
		_tmp0_ = "dnd-";
	} else {
		_tmp0_ = "";
	}
	if (inhibited) {
		_tmp1_ = "inhibited-";
	} else {
		_tmp1_ = "";
	}
	if (count > ((guint) 0)) {
		_tmp2_ = "notification";
	} else {
		_tmp2_ = "none";
	}
	_tmp3_ = g_strconcat (_tmp0_, _tmp1_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat (_tmp4_, _tmp2_, NULL);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	state = _tmp6_;
	_tmp7_ = g_strdup ("");
	tooltip = _tmp7_;
	if (count > ((guint) 0)) {
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		if (count > ((guint) 1)) {
			_tmp8_ = "s";
		} else {
			_tmp8_ = "";
		}
		_tmp9_ = g_strdup_printf ("%u Notification%s", count, _tmp8_);
		_g_free0 (tooltip);
		tooltip = _tmp9_;
	}
	_tmp10_ = state;
	_tmp11_ = g_strdup_printf ("\"%s\"", _tmp10_);
	_class = _tmp11_;
	if (cc_open) {
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp12_ = _class;
		_tmp13_ = g_strdup_printf ("[%s, \"cc-open\"]", _tmp12_);
		_g_free0 (_class);
		_class = _tmp13_;
	}
	_tmp14_ = state;
	_tmp15_ = tooltip;
	_tmp16_ = _class;
	g_print ("{\"text\": \"%u\", \"alt\": \"%s\", \"tooltip\": \"%s\", \"class\": %s" \
"}\n", count, _tmp14_, _tmp15_, _tmp16_);
	_g_free0 (_class);
	_g_free0 (tooltip);
	_g_free0 (state);
}

void
print_subscribe_waybar (void)
{
	GError* _inner_error0_ = NULL;
	{
		SwayncDaemonData data = {0};
		CcDaemon* _tmp0_;
		SwayncDaemonData _tmp1_ = {0};
		SwayncDaemonData _tmp2_;
		SwayncDaemonData _tmp3_;
		SwayncDaemonData _tmp4_;
		SwayncDaemonData _tmp5_;
		_tmp0_ = cc_daemon;
		cc_daemon_get_subscribe_data (_tmp0_, &_tmp1_, &_inner_error0_);
		data = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = data;
		_tmp3_ = data;
		_tmp4_ = data;
		_tmp5_ = data;
		on_subscribe_waybar (_tmp2_.count, _tmp3_.dnd, _tmp4_.cc_open, _tmp5_.inhibited);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		on_subscribe_waybar ((guint) 0, FALSE, FALSE, FALSE);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_on_subscribe_cc_daemon_subscribe_v2 (CcDaemon* _sender,
                                      guint count,
                                      gboolean dnd,
                                      gboolean cc_open,
                                      gboolean inhibited,
                                      gpointer self)
{
	on_subscribe (count, dnd, cc_open, inhibited);
}

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

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

static void
_on_subscribe_waybar_cc_daemon_subscribe_v2 (CcDaemon* _sender,
                                             guint count,
                                             gboolean dnd,
                                             gboolean cc_open,
                                             gboolean inhibited,
                                             gpointer self)
{
	on_subscribe_waybar (count, dnd, cc_open, inhibited);
}

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

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

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

gint
command_line (gchar*** args,
              gint* args_length1,
              gboolean skip_wait)
{
	gint used_args = 0;
	gchar** _tmp103_;
	gint _tmp103__length1;
	GError* _inner_error0_ = NULL;
	gint result;
	used_args = 1;
	{
		const gchar* _tmp0_;
		const gchar* _tmp1_;
		GQuark _tmp3_ = 0U;
		static GQuark _tmp2_label0 = 0;
		static GQuark _tmp2_label1 = 0;
		static GQuark _tmp2_label2 = 0;
		static GQuark _tmp2_label3 = 0;
		static GQuark _tmp2_label4 = 0;
		static GQuark _tmp2_label5 = 0;
		static GQuark _tmp2_label6 = 0;
		static GQuark _tmp2_label7 = 0;
		static GQuark _tmp2_label8 = 0;
		static GQuark _tmp2_label9 = 0;
		static GQuark _tmp2_label10 = 0;
		static GQuark _tmp2_label11 = 0;
		static GQuark _tmp2_label12 = 0;
		static GQuark _tmp2_label13 = 0;
		static GQuark _tmp2_label14 = 0;
		static GQuark _tmp2_label15 = 0;
		static GQuark _tmp2_label16 = 0;
		static GQuark _tmp2_label17 = 0;
		static GQuark _tmp2_label18 = 0;
		static GQuark _tmp2_label19 = 0;
		static GQuark _tmp2_label20 = 0;
		static GQuark _tmp2_label21 = 0;
		static GQuark _tmp2_label22 = 0;
		static GQuark _tmp2_label23 = 0;
		static GQuark _tmp2_label24 = 0;
		static GQuark _tmp2_label25 = 0;
		static GQuark _tmp2_label26 = 0;
		static GQuark _tmp2_label27 = 0;
		static GQuark _tmp2_label28 = 0;
		static GQuark _tmp2_label29 = 0;
		static GQuark _tmp2_label30 = 0;
		static GQuark _tmp2_label31 = 0;
		static GQuark _tmp2_label32 = 0;
		static GQuark _tmp2_label33 = 0;
		static GQuark _tmp2_label34 = 0;
		static GQuark _tmp2_label35 = 0;
		static GQuark _tmp2_label36 = 0;
		static GQuark _tmp2_label37 = 0;
		static GQuark _tmp2_label38 = 0;
		static GQuark _tmp2_label39 = 0;
		static GQuark _tmp2_label40 = 0;
		static GQuark _tmp2_label41 = 0;
		static GQuark _tmp2_label42 = 0;
		static GQuark _tmp2_label43 = 0;
		static GQuark _tmp2_label44 = 0;
		static GQuark _tmp2_label45 = 0;
		static GQuark _tmp2_label46 = 0;
		if ((*args_length1) < 1) {
			print_help (*args, (gint) (*args_length1));
			exit (1);
		}
		_tmp0_ = (*args)[0];
		_tmp1_ = _tmp0_;
		_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
		if ((_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("--help")))) || (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("-h"))))) {
			switch (0) {
				default:
				{
					print_help (*args, (gint) (*args_length1));
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("--version")))) || (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("-v"))))) {
			switch (0) {
				default:
				{
					FILE* _tmp4_;
					_tmp4_ = stdout;
					fprintf (_tmp4_, "%s\n", CONSTANTS_VERSION);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("--reload-config")))) || (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("-R"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp5_;
					_tmp5_ = cc_daemon;
					cc_daemon_reload_config (_tmp5_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("--reload-css")))) || (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("-rs"))))) {
			switch (0) {
				default:
				{
					gboolean _tmp6_ = FALSE;
					CcDaemon* _tmp7_;
					FILE* _tmp8_;
					gchar* _tmp9_;
					gchar* _tmp10_;
					_tmp7_ = cc_daemon;
					_tmp6_ = cc_daemon_reload_css (_tmp7_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp8_ = stdout;
					_tmp9_ = bool_to_string (_tmp6_);
					_tmp10_ = _tmp9_;
					fprintf (_tmp8_, "CSS reload success: %s\n", _tmp10_);
					_g_free0 (_tmp10_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string ("--count")))) || (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string ("-c"))))) {
			switch (0) {
				default:
				{
					guint _tmp11_ = 0U;
					CcDaemon* _tmp12_;
					gchar* _tmp13_;
					gchar* _tmp14_;
					_tmp12_ = cc_daemon;
					_tmp11_ = cc_daemon_notification_count (_tmp12_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp13_ = g_strdup_printf ("%u", _tmp11_);
					_tmp14_ = _tmp13_;
					g_print ("%s", _tmp14_);
					_g_free0 (_tmp14_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label10) ? _tmp2_label10 : (_tmp2_label10 = g_quark_from_static_string ("--close-latest")))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp15_;
					_tmp15_ = cc_daemon;
					cc_daemon_hide_latest_notifications (_tmp15_, TRUE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label11) ? _tmp2_label11 : (_tmp2_label11 = g_quark_from_static_string ("--hide-latest")))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp16_;
					_tmp16_ = cc_daemon;
					cc_daemon_hide_latest_notifications (_tmp16_, FALSE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label12) ? _tmp2_label12 : (_tmp2_label12 = g_quark_from_static_string ("--hide-all")))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp17_;
					_tmp17_ = cc_daemon;
					cc_daemon_hide_all_notifications (_tmp17_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label13) ? _tmp2_label13 : (_tmp2_label13 = g_quark_from_static_string ("--close-all")))) || (_tmp3_ == ((0 != _tmp2_label14) ? _tmp2_label14 : (_tmp2_label14 = g_quark_from_static_string ("-C"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp18_;
					_tmp18_ = cc_daemon;
					cc_daemon_close_all_notifications (_tmp18_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label15) ? _tmp2_label15 : (_tmp2_label15 = g_quark_from_static_string ("--toggle-panel")))) || (_tmp3_ == ((0 != _tmp2_label16) ? _tmp2_label16 : (_tmp2_label16 = g_quark_from_static_string ("-t"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp19_;
					_tmp19_ = cc_daemon;
					cc_daemon_toggle_visibility (_tmp19_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label17) ? _tmp2_label17 : (_tmp2_label17 = g_quark_from_static_string ("--open-panel")))) || (_tmp3_ == ((0 != _tmp2_label18) ? _tmp2_label18 : (_tmp2_label18 = g_quark_from_static_string ("-op"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp20_;
					_tmp20_ = cc_daemon;
					cc_daemon_set_visibility (_tmp20_, TRUE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label19) ? _tmp2_label19 : (_tmp2_label19 = g_quark_from_static_string ("--close-panel")))) || (_tmp3_ == ((0 != _tmp2_label20) ? _tmp2_label20 : (_tmp2_label20 = g_quark_from_static_string ("-cp"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp21_;
					_tmp21_ = cc_daemon;
					cc_daemon_set_visibility (_tmp21_, FALSE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label21) ? _tmp2_label21 : (_tmp2_label21 = g_quark_from_static_string ("--toggle-dnd")))) || (_tmp3_ == ((0 != _tmp2_label22) ? _tmp2_label22 : (_tmp2_label22 = g_quark_from_static_string ("-d"))))) {
			switch (0) {
				default:
				{
					gboolean _tmp22_ = FALSE;
					CcDaemon* _tmp23_;
					gchar* _tmp24_;
					gchar* _tmp25_;
					_tmp23_ = cc_daemon;
					_tmp22_ = cc_daemon_toggle_dnd (_tmp23_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp24_ = bool_to_string (_tmp22_);
					_tmp25_ = _tmp24_;
					g_print ("%s", _tmp25_);
					_g_free0 (_tmp25_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label23) ? _tmp2_label23 : (_tmp2_label23 = g_quark_from_static_string ("--get-dnd")))) || (_tmp3_ == ((0 != _tmp2_label24) ? _tmp2_label24 : (_tmp2_label24 = g_quark_from_static_string ("-D"))))) {
			switch (0) {
				default:
				{
					gboolean _tmp26_ = FALSE;
					CcDaemon* _tmp27_;
					gchar* _tmp28_;
					gchar* _tmp29_;
					_tmp27_ = cc_daemon;
					_tmp26_ = cc_daemon_get_dnd (_tmp27_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp28_ = bool_to_string (_tmp26_);
					_tmp29_ = _tmp28_;
					g_print ("%s", _tmp29_);
					_g_free0 (_tmp29_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label25) ? _tmp2_label25 : (_tmp2_label25 = g_quark_from_static_string ("--dnd-on")))) || (_tmp3_ == ((0 != _tmp2_label26) ? _tmp2_label26 : (_tmp2_label26 = g_quark_from_static_string ("-dn"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp30_;
					gboolean _tmp31_ = FALSE;
					CcDaemon* _tmp32_;
					gchar* _tmp33_;
					gchar* _tmp34_;
					_tmp30_ = cc_daemon;
					cc_daemon_set_dnd (_tmp30_, TRUE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp32_ = cc_daemon;
					_tmp31_ = cc_daemon_get_dnd (_tmp32_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp33_ = bool_to_string (_tmp31_);
					_tmp34_ = _tmp33_;
					g_print ("%s", _tmp34_);
					_g_free0 (_tmp34_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label27) ? _tmp2_label27 : (_tmp2_label27 = g_quark_from_static_string ("--dnd-off")))) || (_tmp3_ == ((0 != _tmp2_label28) ? _tmp2_label28 : (_tmp2_label28 = g_quark_from_static_string ("-df"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp35_;
					gboolean _tmp36_ = FALSE;
					CcDaemon* _tmp37_;
					gchar* _tmp38_;
					gchar* _tmp39_;
					_tmp35_ = cc_daemon;
					cc_daemon_set_dnd (_tmp35_, FALSE, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp37_ = cc_daemon;
					_tmp36_ = cc_daemon_get_dnd (_tmp37_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp38_ = bool_to_string (_tmp36_);
					_tmp39_ = _tmp38_;
					g_print ("%s", _tmp39_);
					_g_free0 (_tmp39_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label29) ? _tmp2_label29 : (_tmp2_label29 = g_quark_from_static_string ("--action")))) || (_tmp3_ == ((0 != _tmp2_label30) ? _tmp2_label30 : (_tmp2_label30 = g_quark_from_static_string ("-a"))))) {
			switch (0) {
				default:
				{
					gint action_index = 0;
					CcDaemon* _tmp42_;
					action_index = 0;
					if ((*args_length1) >= 2) {
						gint _tmp40_;
						const gchar* _tmp41_;
						_tmp40_ = used_args;
						used_args = _tmp40_ + 1;
						_tmp41_ = (*args)[1];
						action_index = atoi (_tmp41_);
					}
					_tmp42_ = cc_daemon;
					cc_daemon_latest_invoke_action (_tmp42_, (guint32) action_index, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label31) ? _tmp2_label31 : (_tmp2_label31 = g_quark_from_static_string ("--get-inhibited")))) || (_tmp3_ == ((0 != _tmp2_label32) ? _tmp2_label32 : (_tmp2_label32 = g_quark_from_static_string ("-I"))))) {
			switch (0) {
				default:
				{
					gboolean _tmp43_ = FALSE;
					CcDaemon* _tmp44_;
					gchar* _tmp45_;
					gchar* _tmp46_;
					_tmp44_ = cc_daemon;
					_tmp43_ = cc_daemon_is_inhibited (_tmp44_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp45_ = bool_to_string (_tmp43_);
					_tmp46_ = _tmp45_;
					g_print ("%s", _tmp46_);
					_g_free0 (_tmp46_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label33) ? _tmp2_label33 : (_tmp2_label33 = g_quark_from_static_string ("--get-num-inhibitors")))) || (_tmp3_ == ((0 != _tmp2_label34) ? _tmp2_label34 : (_tmp2_label34 = g_quark_from_static_string ("-In"))))) {
			switch (0) {
				default:
				{
					guint _tmp47_ = 0U;
					CcDaemon* _tmp48_;
					gchar* _tmp49_;
					gchar* _tmp50_;
					_tmp48_ = cc_daemon;
					_tmp47_ = cc_daemon_number_of_inhibitors (_tmp48_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp49_ = g_strdup_printf ("%u", _tmp47_);
					_tmp50_ = _tmp49_;
					g_print ("%s", _tmp50_);
					_g_free0 (_tmp50_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label35) ? _tmp2_label35 : (_tmp2_label35 = g_quark_from_static_string ("--inhibitor-add")))) || (_tmp3_ == ((0 != _tmp2_label36) ? _tmp2_label36 : (_tmp2_label36 = g_quark_from_static_string ("-Ia"))))) {
			switch (0) {
				default:
				{
					gint _tmp52_;
					gboolean _tmp53_ = FALSE;
					CcDaemon* _tmp54_;
					const gchar* _tmp55_;
					FILE* _tmp57_;
					const gchar* _tmp58_;
					if ((*args_length1) < 2) {
						FILE* _tmp51_;
						_tmp51_ = stderr;
						fprintf (_tmp51_, "Application ID needed!");
						exit (1);
					}
					_tmp52_ = used_args;
					used_args = _tmp52_ + 1;
					_tmp54_ = cc_daemon;
					_tmp55_ = (*args)[1];
					_tmp53_ = cc_daemon_add_inhibitor (_tmp54_, _tmp55_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					if (_tmp53_) {
						const gchar* _tmp56_;
						_tmp56_ = (*args)[1];
						g_print ("Added inhibitor: \"%s\"", _tmp56_);
						break;
					}
					_tmp57_ = stderr;
					_tmp58_ = (*args)[1];
					fprintf (_tmp57_, "Inhibitor: \"%s\" already added!...", _tmp58_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label37) ? _tmp2_label37 : (_tmp2_label37 = g_quark_from_static_string ("--inhibitor-remove")))) || (_tmp3_ == ((0 != _tmp2_label38) ? _tmp2_label38 : (_tmp2_label38 = g_quark_from_static_string ("-Ir"))))) {
			switch (0) {
				default:
				{
					gint _tmp60_;
					gboolean _tmp61_ = FALSE;
					CcDaemon* _tmp62_;
					const gchar* _tmp63_;
					FILE* _tmp65_;
					const gchar* _tmp66_;
					if ((*args_length1) < 2) {
						FILE* _tmp59_;
						_tmp59_ = stderr;
						fprintf (_tmp59_, "Application ID needed!");
						exit (1);
					}
					_tmp60_ = used_args;
					used_args = _tmp60_ + 1;
					_tmp62_ = cc_daemon;
					_tmp63_ = (*args)[1];
					_tmp61_ = cc_daemon_remove_inhibitor (_tmp62_, _tmp63_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					if (_tmp61_) {
						const gchar* _tmp64_;
						_tmp64_ = (*args)[1];
						g_print ("Removed inhibitor: \"%s\"", _tmp64_);
						break;
					}
					_tmp65_ = stderr;
					_tmp66_ = (*args)[1];
					fprintf (_tmp65_, "Inhibitor: \"%s\" does not exist!...", _tmp66_);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label39) ? _tmp2_label39 : (_tmp2_label39 = g_quark_from_static_string ("inhibitors-clear")))) || (_tmp3_ == ((0 != _tmp2_label40) ? _tmp2_label40 : (_tmp2_label40 = g_quark_from_static_string ("-Ic"))))) {
			switch (0) {
				default:
				{
					gboolean _tmp67_ = FALSE;
					CcDaemon* _tmp68_;
					_tmp68_ = cc_daemon;
					_tmp67_ = cc_daemon_clear_inhibitors (_tmp68_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					if (_tmp67_) {
						g_print ("Cleared all inhibitors");
						break;
					}
					g_print ("No inhibitors to clear...");
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label41) ? _tmp2_label41 : (_tmp2_label41 = g_quark_from_static_string ("--subscribe")))) || (_tmp3_ == ((0 != _tmp2_label42) ? _tmp2_label42 : (_tmp2_label42 = g_quark_from_static_string ("-s"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp69_;
					SwayncDaemonData data = {0};
					CcDaemon* _tmp70_;
					SwayncDaemonData _tmp71_ = {0};
					SwayncDaemonData _tmp72_;
					SwayncDaemonData _tmp73_;
					SwayncDaemonData _tmp74_;
					SwayncDaemonData _tmp75_;
					GMainLoop* loop = NULL;
					GMainLoop* _tmp76_;
					GMainLoop* _tmp77_;
					_tmp69_ = cc_daemon;
					g_signal_connect (_tmp69_, "subscribe-v2", (GCallback) _on_subscribe_cc_daemon_subscribe_v2, NULL);
					_tmp70_ = cc_daemon;
					cc_daemon_get_subscribe_data (_tmp70_, &_tmp71_, &_inner_error0_);
					data = _tmp71_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp72_ = data;
					_tmp73_ = data;
					_tmp74_ = data;
					_tmp75_ = data;
					on_subscribe (_tmp72_.count, _tmp73_.dnd, _tmp74_.cc_open, _tmp75_.inhibited);
					_tmp76_ = g_main_loop_new (NULL, FALSE);
					loop = _tmp76_;
					g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.erikreider.swaync.cc", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) g_cclosure_new ((GCallback) _print_subscribe_gbus_name_appeared_callback, NULL, (GClosureNotify) NULL), (GClosure*) g_cclosure_new ((GCallback) _print_subscribe_gbus_name_vanished_callback, NULL, (GClosureNotify) NULL));
					_tmp77_ = loop;
					g_main_loop_run (_tmp77_);
					_g_main_loop_unref0 (loop);
					break;
				}
			}
		} else if ((_tmp3_ == ((0 != _tmp2_label43) ? _tmp2_label43 : (_tmp2_label43 = g_quark_from_static_string ("--subscribe-waybar")))) || (_tmp3_ == ((0 != _tmp2_label44) ? _tmp2_label44 : (_tmp2_label44 = g_quark_from_static_string ("-swb"))))) {
			switch (0) {
				default:
				{
					CcDaemon* _tmp78_;
					GMainLoop* loop = NULL;
					GMainLoop* _tmp79_;
					GMainLoop* _tmp80_;
					_tmp78_ = cc_daemon;
					g_signal_connect (_tmp78_, "subscribe-v2", (GCallback) _on_subscribe_waybar_cc_daemon_subscribe_v2, NULL);
					_tmp79_ = g_main_loop_new (NULL, FALSE);
					loop = _tmp79_;
					g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.erikreider.swaync.cc", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) g_cclosure_new ((GCallback) _print_subscribe_waybar_gbus_name_appeared_callback, NULL, (GClosureNotify) NULL), (GClosure*) g_cclosure_new ((GCallback) _print_subscribe_waybar_gbus_name_vanished_callback, NULL, (GClosureNotify) NULL));
					_tmp80_ = loop;
					g_main_loop_run (_tmp80_);
					_g_main_loop_unref0 (loop);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label45) ? _tmp2_label45 : (_tmp2_label45 = g_quark_from_static_string ("--change-cc-monitor")))) {
			switch (0) {
				default:
				{
					gint _tmp82_;
					gboolean _tmp83_ = FALSE;
					CcDaemon* _tmp84_;
					const gchar* _tmp85_;
					FILE* _tmp87_;
					const gchar* _tmp88_;
					if ((*args_length1) < 2) {
						FILE* _tmp81_;
						_tmp81_ = stderr;
						fprintf (_tmp81_, "Monitor connector name needed!");
						exit (1);
					}
					_tmp82_ = used_args;
					used_args = _tmp82_ + 1;
					_tmp84_ = cc_daemon;
					_tmp85_ = (*args)[1];
					_tmp83_ = cc_daemon_set_cc_monitor (_tmp84_, _tmp85_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					if (_tmp83_) {
						const gchar* _tmp86_;
						_tmp86_ = (*args)[1];
						g_print ("Changed monitor to: \"%s\"", _tmp86_);
						break;
					}
					_tmp87_ = stderr;
					_tmp88_ = (*args)[1];
					fprintf (_tmp87_, "Could not find monitor: \"%s\"!", _tmp88_);
					break;
				}
			}
		} else if (_tmp3_ == ((0 != _tmp2_label46) ? _tmp2_label46 : (_tmp2_label46 = g_quark_from_static_string ("--change-noti-monitor")))) {
			switch (0) {
				default:
				{
					gint _tmp90_;
					gboolean _tmp91_ = FALSE;
					CcDaemon* _tmp92_;
					const gchar* _tmp93_;
					FILE* _tmp95_;
					const gchar* _tmp96_;
					if ((*args_length1) < 2) {
						FILE* _tmp89_;
						_tmp89_ = stderr;
						fprintf (_tmp89_, "Monitor connector name needed!");
						exit (1);
					}
					_tmp90_ = used_args;
					used_args = _tmp90_ + 1;
					_tmp92_ = cc_daemon;
					_tmp93_ = (*args)[1];
					_tmp91_ = cc_daemon_set_noti_window_monitor (_tmp92_, _tmp93_, &_inner_error0_);
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					if (_tmp91_) {
						const gchar* _tmp94_;
						_tmp94_ = (*args)[1];
						g_print ("Changed monitor to: \"%s\"", _tmp94_);
						break;
					}
					_tmp95_ = stderr;
					_tmp96_ = (*args)[1];
					fprintf (_tmp95_, "Could not find monitor: \"%s\"!", _tmp96_);
					break;
				}
			}
		} else {
			switch (0) {
				default:
				{
					const gchar* _tmp97_;
					_tmp97_ = (*args)[0];
					g_printerr ("Unknown command: \"%s\"\n", _tmp97_);
					print_help (*args, (gint) (*args_length1));
					break;
				}
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FILE* _tmp98_;
		const gchar* _tmp99_;
		gchar* _tmp100_;
		gchar* _tmp101_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp98_ = stderr;
		_tmp99_ = e->message;
		_tmp100_ = g_strconcat (_tmp99_, "\n", NULL);
		_tmp101_ = _tmp100_;
		fprintf (_tmp98_, "%s", _tmp101_);
		_g_free0 (_tmp101_);
		if (skip_wait) {
			exit (1);
		}
		result = 1;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp102_ = -1;
		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 _tmp102_;
	}
	_tmp103_ = ((*args) != NULL) ? _vala_array_dup1 ((*args) + used_args, (*args_length1) - used_args) : (*args);
	_tmp103__length1 = (*args_length1) - used_args;
	*args = (_vala_array_free (*args, *args_length1, (GDestroyNotify) g_free), NULL);
	*args = _tmp103_;
	*args_length1 = _tmp103__length1;
	result = 0;
	return result;
}

void
print_connection_error (void)
{
	FILE* _tmp0_;
	_tmp0_ = stderr;
	fprintf (_tmp0_, "Could not connect to CC service. Will wait for connection...\n");
}

static gboolean
_vala_string_array_contains (gchar* * stack,
                             gssize stack_length,
                             const gchar* needle)
{
	gssize i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}

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

gint
try_connect (gchar** args,
             gint args_length1)
{
	gint _tmp10_ = -1;
	GError* _inner_error0_ = NULL;
	gint result;
	{
		CcDaemon* _tmp0_ = NULL;
		CcDaemon* _tmp1_;
		CcDaemon* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean skip_wait = FALSE;
		gboolean one_arg = FALSE;
		_tmp1_ = (CcDaemon*) g_initable_new (TYPE_CC_DAEMON_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.erikreider.swaync.cc", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/erikreider/swaync/cc", "g-interface-name", "org.erikreider.swaync.cc", NULL);
		_tmp0_ = (CcDaemon*) _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (cc_daemon);
		cc_daemon = _tmp2_;
		if (_vala_string_array_contains (args, args_length1, "--skip-wait")) {
			_tmp3_ = TRUE;
		} else {
			_tmp3_ = _vala_string_array_contains (args, args_length1, "-sw");
		}
		skip_wait = _tmp3_;
		one_arg = TRUE;
		while (TRUE) {
			gboolean _tmp4_ = FALSE;
			const gchar* _tmp5_;
			gint _tmp8_;
			if (!(args_length1 > 0)) {
				break;
			}
			_tmp5_ = args[0];
			if (g_strcmp0 (_tmp5_, "--skip-wait") == 0) {
				_tmp4_ = TRUE;
			} else {
				const gchar* _tmp6_;
				_tmp6_ = args[0];
				_tmp4_ = g_strcmp0 (_tmp6_, "-sw") == 0;
			}
			if (_tmp4_) {
				gchar** _tmp7_;
				gint _tmp7__length1;
				_tmp7_ = (args != NULL) ? _vala_array_dup2 (args + 1, args_length1 - 1) : args;
				_tmp7__length1 = args_length1 - 1;
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				args = _tmp7_;
				args_length1 = _tmp7__length1;
				continue;
			}
			if (!one_arg) {
				g_print ("\n");
			}
			_tmp8_ = command_line (&args, (gint*) (&args_length1), skip_wait);
			if (_tmp8_ == 1) {
				print_connection_error ();
				result = 1;
				_g_object_unref0 (_tmp0_);
				args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
				return result;
			}
			one_arg = FALSE;
		}
		if (one_arg) {
			FILE* _tmp9_;
			_tmp9_ = stderr;
			fprintf (_tmp9_, "Skipping wait, but with no action.");
		}
		result = 0;
		_g_object_unref0 (_tmp0_);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		print_connection_error ();
		result = 1;
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		return result;
	}
	__finally0:
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), 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 _tmp10_;
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		g_slice_free (Block1Data, _data1_);
	}
}

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

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		_g_main_loop_unref0 (_data2_->loop);
		block1_data_unref (_data2_->_data1_);
		_data2_->_data1_ = NULL;
		g_slice_free (Block2Data, _data2_);
	}
}

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

static void
___lambda4_ (Block2Data* _data2_,
             GDBusConnection* conn,
             const gchar* name,
             const gchar* name_owner)
{
	Block1Data* _data1_;
	gchar** _tmp0_;
	gint _tmp0__length1;
	_data1_ = _data2_->_data1_;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (conn, g_dbus_connection_get_type ()));
	g_return_if_fail (name != NULL);
	g_return_if_fail (name_owner != NULL);
	_tmp0_ = (_data1_->args != NULL) ? _vala_array_dup4 (_data1_->args + 1, _data1_->args_length1 - 1) : _data1_->args;
	_tmp0__length1 = _data1_->args_length1 - 1;
	if (try_connect (_tmp0_, (gint) _tmp0__length1) == 0) {
		GMainLoop* _tmp1_;
		_tmp1_ = _data2_->loop;
		g_main_loop_quit (_tmp1_);
	}
}

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

static gint
_vala_main (gchar** args,
            gint args_length1)
{
	Block1Data* _data1_;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gint result;
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->args = args;
	_data1_->args_length1 = args_length1;
	_tmp0_ = (_data1_->args != NULL) ? _vala_array_dup3 (_data1_->args + 1, _data1_->args_length1 - 1) : _data1_->args;
	_tmp0__length1 = _data1_->args_length1 - 1;
	if (try_connect (_tmp0_, (gint) _tmp0__length1) == 1) {
		Block2Data* _data2_;
		GMainLoop* _tmp1_;
		GMainLoop* _tmp2_;
		_data2_ = g_slice_new0 (Block2Data);
		_data2_->_ref_count_ = 1;
		_data2_->_data1_ = block1_data_ref (_data1_);
		_tmp1_ = g_main_loop_new (NULL, FALSE);
		_data2_->loop = _tmp1_;
		g_bus_watch_name_with_closures (G_BUS_TYPE_SESSION, "org.erikreider.swaync.cc", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((____lambda4__gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) ____lambda4__gbus_name_appeared_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp2_ = _data2_->loop;
		g_main_loop_run (_tmp2_);
		block2_data_unref (_data2_);
		_data2_ = NULL;
	}
	result = 0;
	block1_data_unref (_data1_);
	_data1_ = NULL;
	return result;
}

int
main (int argc,
      char ** argv)
{
	return _vala_main (argv, argc);
}

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

