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

/*
 * Copyright 2020-2023 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <stdio.h>
#include <fwupd.h>
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
#include <locale.h>

#define SETTINGS_DAEMON_APPLICATION_ACTION_PREFIX "app."
#define SETTINGS_DAEMON_APPLICATION_SHOW_UPDATES_ACTION "show-updates"
#define SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME "org.freedesktop.Accounts"
#define SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_PATH "/org/freedesktop/Accounts"
#define BUILD_PROJECT_NAME "io.elementary.settings-daemon"
#define BUILD_VERSION "8.5.0"
#define BUILD_GETTEXT_PACKAGE "io.elementary.settings-daemon"
#define BUILD_LOCALEDIR "/usr/share/locale"
#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 SETTINGS_DAEMON_TYPE_APPLICATION (settings_daemon_application_get_type ())
#define SETTINGS_DAEMON_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_TYPE_APPLICATION, SettingsDaemonApplication))
#define SETTINGS_DAEMON_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_TYPE_APPLICATION, SettingsDaemonApplicationClass))
#define SETTINGS_DAEMON_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_TYPE_APPLICATION))
#define SETTINGS_DAEMON_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_TYPE_APPLICATION))
#define SETTINGS_DAEMON_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_TYPE_APPLICATION, SettingsDaemonApplicationClass))

typedef struct _SettingsDaemonApplication SettingsDaemonApplication;
typedef struct _SettingsDaemonApplicationClass SettingsDaemonApplicationClass;
typedef struct _SettingsDaemonApplicationPrivate SettingsDaemonApplicationPrivate;

#define SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE (settings_daemon_accounts_service_get_type ())
#define SETTINGS_DAEMON_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE, SettingsDaemonAccountsService))
#define SETTINGS_DAEMON_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE))
#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE, SettingsDaemonAccountsServiceIface))

typedef struct _SettingsDaemonAccountsService SettingsDaemonAccountsService;
typedef struct _SettingsDaemonAccountsServiceIface SettingsDaemonAccountsServiceIface;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_KEYBOARD_LAYOUT (settings_daemon_accounts_service_keyboard_layout_get_type ())
typedef struct _SettingsDaemonAccountsServiceKeyboardLayout SettingsDaemonAccountsServiceKeyboardLayout;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_XKB_OPTION (settings_daemon_accounts_service_xkb_option_get_type ())
typedef struct _SettingsDaemonAccountsServiceXkbOption SettingsDaemonAccountsServiceXkbOption;

#define SETTINGS_DAEMON_ACCOUNTS_SERVICE_TYPE_COORDINATES (settings_daemon_accounts_service_coordinates_get_type ())
typedef struct _SettingsDaemonAccountsServiceCoordinates SettingsDaemonAccountsServiceCoordinates;

#define SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE_PROXY (settings_daemon_accounts_service_proxy_get_type ())

#define PANTHEON_TYPE_ACCOUNTS_SERVICE (pantheon_accounts_service_get_type ())
#define PANTHEON_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE, PantheonAccountsService))
#define PANTHEON_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE))
#define PANTHEON_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PANTHEON_TYPE_ACCOUNTS_SERVICE, PantheonAccountsServiceIface))

typedef struct _PantheonAccountsService PantheonAccountsService;
typedef struct _PantheonAccountsServiceIface PantheonAccountsServiceIface;

#define PANTHEON_TYPE_ACCOUNTS_SERVICE_PROXY (pantheon_accounts_service_proxy_get_type ())

#define DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE (display_manager_accounts_service_get_type ())
#define DISPLAY_MANAGER_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE, DisplayManagerAccountsService))
#define DISPLAY_MANAGER_IS_ACCOUNTS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE))
#define DISPLAY_MANAGER_ACCOUNTS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE, DisplayManagerAccountsServiceIface))

typedef struct _DisplayManagerAccountsService DisplayManagerAccountsService;
typedef struct _DisplayManagerAccountsServiceIface DisplayManagerAccountsServiceIface;

#define DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE_PROXY (display_manager_accounts_service_proxy_get_type ())

#define SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS (settings_daemon_backends_keyboard_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettings))
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_KEYBOARD_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_KEYBOARD_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_KEYBOARD_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_KEYBOARD_SETTINGS, SettingsDaemonBackendsKeyboardSettingsClass))

typedef struct _SettingsDaemonBackendsKeyboardSettings SettingsDaemonBackendsKeyboardSettings;
typedef struct _SettingsDaemonBackendsKeyboardSettingsClass SettingsDaemonBackendsKeyboardSettingsClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS (settings_daemon_backends_mouse_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettings))
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_MOUSE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_MOUSE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_MOUSE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_MOUSE_SETTINGS, SettingsDaemonBackendsMouseSettingsClass))

typedef struct _SettingsDaemonBackendsMouseSettings SettingsDaemonBackendsMouseSettings;
typedef struct _SettingsDaemonBackendsMouseSettingsClass SettingsDaemonBackendsMouseSettingsClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS (settings_daemon_backends_interface_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_INTERFACE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS, SettingsDaemonBackendsInterfaceSettings))
#define SETTINGS_DAEMON_BACKENDS_INTERFACE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS, SettingsDaemonBackendsInterfaceSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_INTERFACE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_INTERFACE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_INTERFACE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_INTERFACE_SETTINGS, SettingsDaemonBackendsInterfaceSettingsClass))

typedef struct _SettingsDaemonBackendsInterfaceSettings SettingsDaemonBackendsInterfaceSettings;
typedef struct _SettingsDaemonBackendsInterfaceSettingsClass SettingsDaemonBackendsInterfaceSettingsClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS (settings_daemon_backends_night_light_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_NIGHT_LIGHT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS, SettingsDaemonBackendsNightLightSettings))
#define SETTINGS_DAEMON_BACKENDS_NIGHT_LIGHT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS, SettingsDaemonBackendsNightLightSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_NIGHT_LIGHT_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_NIGHT_LIGHT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_NIGHT_LIGHT_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_NIGHT_LIGHT_SETTINGS, SettingsDaemonBackendsNightLightSettingsClass))

typedef struct _SettingsDaemonBackendsNightLightSettings SettingsDaemonBackendsNightLightSettings;
typedef struct _SettingsDaemonBackendsNightLightSettingsClass SettingsDaemonBackendsNightLightSettingsClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS (settings_daemon_backends_prefers_color_scheme_settings_get_type ())
#define SETTINGS_DAEMON_BACKENDS_PREFERS_COLOR_SCHEME_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS, SettingsDaemonBackendsPrefersColorSchemeSettings))
#define SETTINGS_DAEMON_BACKENDS_PREFERS_COLOR_SCHEME_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS, SettingsDaemonBackendsPrefersColorSchemeSettingsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_PREFERS_COLOR_SCHEME_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_IS_PREFERS_COLOR_SCHEME_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS))
#define SETTINGS_DAEMON_BACKENDS_PREFERS_COLOR_SCHEME_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_PREFERS_COLOR_SCHEME_SETTINGS, SettingsDaemonBackendsPrefersColorSchemeSettingsClass))

typedef struct _SettingsDaemonBackendsPrefersColorSchemeSettings SettingsDaemonBackendsPrefersColorSchemeSettings;
typedef struct _SettingsDaemonBackendsPrefersColorSchemeSettingsClass SettingsDaemonBackendsPrefersColorSchemeSettingsClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER (settings_daemon_backends_accent_color_manager_get_type ())
#define SETTINGS_DAEMON_BACKENDS_ACCENT_COLOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER, SettingsDaemonBackendsAccentColorManager))
#define SETTINGS_DAEMON_BACKENDS_ACCENT_COLOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER, SettingsDaemonBackendsAccentColorManagerClass))
#define SETTINGS_DAEMON_BACKENDS_IS_ACCENT_COLOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER))
#define SETTINGS_DAEMON_BACKENDS_IS_ACCENT_COLOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER))
#define SETTINGS_DAEMON_BACKENDS_ACCENT_COLOR_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_ACCENT_COLOR_MANAGER, SettingsDaemonBackendsAccentColorManagerClass))

typedef struct _SettingsDaemonBackendsAccentColorManager SettingsDaemonBackendsAccentColorManager;
typedef struct _SettingsDaemonBackendsAccentColorManagerClass SettingsDaemonBackendsAccentColorManagerClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING (settings_daemon_backends_housekeeping_get_type ())
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING, SettingsDaemonBackendsHousekeeping))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING, SettingsDaemonBackendsHousekeepingClass))
#define SETTINGS_DAEMON_BACKENDS_IS_HOUSEKEEPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING))
#define SETTINGS_DAEMON_BACKENDS_IS_HOUSEKEEPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING, SettingsDaemonBackendsHousekeepingClass))

typedef struct _SettingsDaemonBackendsHousekeeping SettingsDaemonBackendsHousekeeping;
typedef struct _SettingsDaemonBackendsHousekeepingClass SettingsDaemonBackendsHousekeepingClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC (settings_daemon_backends_power_profiles_sync_get_type ())
#define SETTINGS_DAEMON_BACKENDS_POWER_PROFILES_SYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC, SettingsDaemonBackendsPowerProfilesSync))
#define SETTINGS_DAEMON_BACKENDS_POWER_PROFILES_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC, SettingsDaemonBackendsPowerProfilesSyncClass))
#define SETTINGS_DAEMON_BACKENDS_IS_POWER_PROFILES_SYNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC))
#define SETTINGS_DAEMON_BACKENDS_IS_POWER_PROFILES_SYNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC))
#define SETTINGS_DAEMON_BACKENDS_POWER_PROFILES_SYNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_POWER_PROFILES_SYNC, SettingsDaemonBackendsPowerProfilesSyncClass))

typedef struct _SettingsDaemonBackendsPowerProfilesSync SettingsDaemonBackendsPowerProfilesSync;
typedef struct _SettingsDaemonBackendsPowerProfilesSyncClass SettingsDaemonBackendsPowerProfilesSyncClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS (settings_daemon_backends_application_shortcuts_get_type ())
#define SETTINGS_DAEMON_BACKENDS_APPLICATION_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS, SettingsDaemonBackendsApplicationShortcuts))
#define SETTINGS_DAEMON_BACKENDS_APPLICATION_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS, SettingsDaemonBackendsApplicationShortcutsClass))
#define SETTINGS_DAEMON_BACKENDS_IS_APPLICATION_SHORTCUTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS))
#define SETTINGS_DAEMON_BACKENDS_IS_APPLICATION_SHORTCUTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS))
#define SETTINGS_DAEMON_BACKENDS_APPLICATION_SHORTCUTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_APPLICATION_SHORTCUTS, SettingsDaemonBackendsApplicationShortcutsClass))

typedef struct _SettingsDaemonBackendsApplicationShortcuts SettingsDaemonBackendsApplicationShortcuts;
typedef struct _SettingsDaemonBackendsApplicationShortcutsClass SettingsDaemonBackendsApplicationShortcutsClass;
enum  {
	SETTINGS_DAEMON_APPLICATION_0_PROPERTY,
	SETTINGS_DAEMON_APPLICATION_NUM_PROPERTIES
};
static GParamSpec* settings_daemon_application_properties[SETTINGS_DAEMON_APPLICATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE (settings_daemon_backends_system_update_get_type ())
#define SETTINGS_DAEMON_BACKENDS_SYSTEM_UPDATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE, SettingsDaemonBackendsSystemUpdate))
#define SETTINGS_DAEMON_BACKENDS_SYSTEM_UPDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE, SettingsDaemonBackendsSystemUpdateClass))
#define SETTINGS_DAEMON_BACKENDS_IS_SYSTEM_UPDATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE))
#define SETTINGS_DAEMON_BACKENDS_IS_SYSTEM_UPDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE))
#define SETTINGS_DAEMON_BACKENDS_SYSTEM_UPDATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_SYSTEM_UPDATE, SettingsDaemonBackendsSystemUpdateClass))

typedef struct _SettingsDaemonBackendsSystemUpdate SettingsDaemonBackendsSystemUpdate;
typedef struct _SettingsDaemonBackendsSystemUpdateClass SettingsDaemonBackendsSystemUpdateClass;

#define SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS (settings_daemon_backends_ubuntu_drivers_get_type ())
#define SETTINGS_DAEMON_BACKENDS_UBUNTU_DRIVERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS, SettingsDaemonBackendsUbuntuDrivers))
#define SETTINGS_DAEMON_BACKENDS_UBUNTU_DRIVERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS, SettingsDaemonBackendsUbuntuDriversClass))
#define SETTINGS_DAEMON_BACKENDS_IS_UBUNTU_DRIVERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS))
#define SETTINGS_DAEMON_BACKENDS_IS_UBUNTU_DRIVERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS))
#define SETTINGS_DAEMON_BACKENDS_UBUNTU_DRIVERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_TYPE_UBUNTU_DRIVERS, SettingsDaemonBackendsUbuntuDriversClass))

typedef struct _SettingsDaemonBackendsUbuntuDrivers SettingsDaemonBackendsUbuntuDrivers;
typedef struct _SettingsDaemonBackendsUbuntuDriversClass SettingsDaemonBackendsUbuntuDriversClass;
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _SettingsDaemonApplicationSetupAccountsServicesData SettingsDaemonApplicationSetupAccountsServicesData;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _SettingsDaemonApplication {
	GtkApplication parent_instance;
	SettingsDaemonApplicationPrivate * priv;
};

struct _SettingsDaemonApplicationClass {
	GtkApplicationClass parent_class;
};

struct _SettingsDaemonAccountsServiceKeyboardLayout {
	gchar* backend;
	gchar* name;
};

struct _SettingsDaemonAccountsServiceXkbOption {
	gchar* option;
};

struct _SettingsDaemonAccountsServiceCoordinates {
	gdouble latitude;
	gdouble longitude;
};

struct _SettingsDaemonAccountsServiceIface {
	GTypeInterface parent_iface;
	SettingsDaemonAccountsServiceKeyboardLayout* (*get_keyboard_layouts) (SettingsDaemonAccountsService* self, gint* result_length1);
	void (*set_keyboard_layouts) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceKeyboardLayout* value, gint value_length1);
	guint (*get_active_keyboard_layout) (SettingsDaemonAccountsService* self);
	void (*set_active_keyboard_layout) (SettingsDaemonAccountsService* self, guint value);
	SettingsDaemonAccountsServiceXkbOption* (*get_xkb_options) (SettingsDaemonAccountsService* self, gint* result_length1);
	void (*set_xkb_options) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceXkbOption* value, gint value_length1);
	gboolean (*get_left_handed) (SettingsDaemonAccountsService* self);
	void (*set_left_handed) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_accel_profile) (SettingsDaemonAccountsService* self);
	void (*set_accel_profile) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_mouse_natural_scroll) (SettingsDaemonAccountsService* self);
	void (*set_mouse_natural_scroll) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_mouse_speed) (SettingsDaemonAccountsService* self);
	void (*set_mouse_speed) (SettingsDaemonAccountsService* self, gdouble value);
	gint (*get_touchpad_click_method) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_click_method) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_touchpad_disable_while_typing) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_disable_while_typing) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_edge_scrolling) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_edge_scrolling) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_natural_scroll) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_natural_scroll) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_touchpad_send_events) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_send_events) (SettingsDaemonAccountsService* self, gint value);
	gdouble (*get_touchpad_speed) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_speed) (SettingsDaemonAccountsService* self, gdouble value);
	gboolean (*get_touchpad_tap_to_click) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_tap_to_click) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_touchpad_two_finger_scrolling) (SettingsDaemonAccountsService* self);
	void (*set_touchpad_two_finger_scrolling) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_accent_color) (SettingsDaemonAccountsService* self);
	void (*set_accent_color) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_cursor_blink) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink) (SettingsDaemonAccountsService* self, gboolean value);
	gint (*get_cursor_blink_time) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink_time) (SettingsDaemonAccountsService* self, gint value);
	gint (*get_cursor_blink_timeout) (SettingsDaemonAccountsService* self);
	void (*set_cursor_blink_timeout) (SettingsDaemonAccountsService* self, gint value);
	gint (*get_cursor_size) (SettingsDaemonAccountsService* self);
	void (*set_cursor_size) (SettingsDaemonAccountsService* self, gint value);
	gboolean (*get_locate_pointer) (SettingsDaemonAccountsService* self);
	void (*set_locate_pointer) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_text_scaling_factor) (SettingsDaemonAccountsService* self);
	void (*set_text_scaling_factor) (SettingsDaemonAccountsService* self, gdouble value);
	gint (*get_picture_options) (SettingsDaemonAccountsService* self);
	void (*set_picture_options) (SettingsDaemonAccountsService* self, gint value);
	gchar* (*get_primary_color) (SettingsDaemonAccountsService* self);
	void (*set_primary_color) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_document_font_name) (SettingsDaemonAccountsService* self);
	void (*set_document_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_font_name) (SettingsDaemonAccountsService* self);
	void (*set_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gchar* (*get_monospace_font_name) (SettingsDaemonAccountsService* self);
	void (*set_monospace_font_name) (SettingsDaemonAccountsService* self, const gchar* value);
	gboolean (*get_orientation_lock) (SettingsDaemonAccountsService* self);
	void (*set_orientation_lock) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_wingpanel_use_transparency) (SettingsDaemonAccountsService* self);
	void (*set_wingpanel_use_transparency) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_wingpanel_show_percentage) (SettingsDaemonAccountsService* self);
	void (*set_wingpanel_show_percentage) (SettingsDaemonAccountsService* self, gboolean value);
	void (*get_last_coordinates) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceCoordinates * result);
	void (*set_last_coordinates) (SettingsDaemonAccountsService* self, SettingsDaemonAccountsServiceCoordinates * value);
	gint (*get_prefer_dark_schedule) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule) (SettingsDaemonAccountsService* self, gint value);
	gdouble (*get_prefer_dark_schedule_from) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule_from) (SettingsDaemonAccountsService* self, gdouble value);
	gdouble (*get_prefer_dark_schedule_to) (SettingsDaemonAccountsService* self);
	void (*set_prefer_dark_schedule_to) (SettingsDaemonAccountsService* self, gdouble value);
	gboolean (*get_night_light_enabled) (SettingsDaemonAccountsService* self);
	void (*set_night_light_enabled) (SettingsDaemonAccountsService* self, gboolean value);
	gboolean (*get_night_light_schedule_automatic) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_automatic) (SettingsDaemonAccountsService* self, gboolean value);
	gdouble (*get_night_light_schedule_from) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_from) (SettingsDaemonAccountsService* self, gdouble value);
	gdouble (*get_night_light_schedule_to) (SettingsDaemonAccountsService* self);
	void (*set_night_light_schedule_to) (SettingsDaemonAccountsService* self, gdouble value);
	guint (*get_night_light_temperature) (SettingsDaemonAccountsService* self);
	void (*set_night_light_temperature) (SettingsDaemonAccountsService* self, guint value);
};

struct _PantheonAccountsServiceIface {
	GTypeInterface parent_iface;
	gint (*get_prefers_color_scheme) (PantheonAccountsService* self);
	void (*set_prefers_color_scheme) (PantheonAccountsService* self, gint value);
	gint (*get_prefers_accent_color) (PantheonAccountsService* self);
	void (*set_prefers_accent_color) (PantheonAccountsService* self, gint value);
};

struct _DisplayManagerAccountsServiceIface {
	GTypeInterface parent_iface;
	gchar* (*get_background_file) (DisplayManagerAccountsService* self);
	void (*set_background_file) (DisplayManagerAccountsService* self, const gchar* value);
};

struct _SettingsDaemonApplicationPrivate {
	SettingsDaemonAccountsService* accounts_service;
	PantheonAccountsService* pantheon_service;
	DisplayManagerAccountsService* display_manager_service;
	SettingsDaemonBackendsKeyboardSettings* keyboard_settings;
	SettingsDaemonBackendsMouseSettings* mouse_settings;
	SettingsDaemonBackendsInterfaceSettings* interface_settings;
	SettingsDaemonBackendsNightLightSettings* night_light_settings;
	SettingsDaemonBackendsPrefersColorSchemeSettings* prefers_color_scheme_settings;
	SettingsDaemonBackendsAccentColorManager* accent_color_manager;
	SettingsDaemonBackendsHousekeeping* housekeeping;
	SettingsDaemonBackendsPowerProfilesSync* power_profiles_sync;
	SettingsDaemonBackendsApplicationShortcuts* application_shortcuts;
};

struct _SettingsDaemonApplicationSetupAccountsServicesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SettingsDaemonApplication* self;
	GDBusConnection* connection;
	gchar* path;
	GDBusConnection* _tmp0_;
	GDBusConnection* _tmp1_;
	GVariant* reply;
	GDBusConnection* _tmp2_;
	const gchar* _tmp3_;
	GVariant* _tmp4_;
	GVariant** _tmp5_;
	GVariant** _tmp6_;
	gint _tmp6__length1;
	GVariant* _tmp7_;
	GVariant* _tmp8_;
	GVariantType* _tmp9_;
	GVariantType* _tmp10_;
	GVariant* _tmp11_;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	gchar* _tmp14_;
	SettingsDaemonAccountsService* _tmp15_;
	GDBusConnection* _tmp16_;
	const gchar* _tmp17_;
	SettingsDaemonAccountsService* _tmp18_;
	SettingsDaemonAccountsService* _tmp19_;
	SettingsDaemonAccountsService* _tmp20_;
	SettingsDaemonBackendsKeyboardSettings* _tmp21_;
	SettingsDaemonAccountsService* _tmp22_;
	SettingsDaemonBackendsMouseSettings* _tmp23_;
	SettingsDaemonAccountsService* _tmp24_;
	SettingsDaemonBackendsNightLightSettings* _tmp25_;
	DisplayManagerAccountsService* _tmp26_;
	GDBusConnection* _tmp27_;
	const gchar* _tmp28_;
	DisplayManagerAccountsService* _tmp29_;
	DisplayManagerAccountsService* _tmp30_;
	SettingsDaemonAccountsService* _tmp31_;
	DisplayManagerAccountsService* _tmp32_;
	SettingsDaemonBackendsInterfaceSettings* _tmp33_;
	PantheonAccountsService* _tmp34_;
	GDBusConnection* _tmp35_;
	const gchar* _tmp36_;
	PantheonAccountsService* _tmp37_;
	PantheonAccountsService* _tmp38_;
	PantheonAccountsService* _tmp39_;
	SettingsDaemonBackendsPrefersColorSchemeSettings* _tmp40_;
	PantheonAccountsService* _tmp41_;
	SettingsDaemonAccountsService* _tmp42_;
	SettingsDaemonBackendsAccentColorManager* _tmp43_;
	GError* _inner_error0_;
};

static gint SettingsDaemonApplication_private_offset;
static gpointer settings_daemon_application_parent_class = NULL;

VALA_EXTERN GType settings_daemon_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonApplication, g_object_unref)
VALA_EXTERN GType settings_daemon_accounts_service_keyboard_layout_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceKeyboardLayout* settings_daemon_accounts_service_keyboard_layout_dup (const SettingsDaemonAccountsServiceKeyboardLayout* self);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_free (SettingsDaemonAccountsServiceKeyboardLayout* self);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_copy (const SettingsDaemonAccountsServiceKeyboardLayout* self,
                                                            SettingsDaemonAccountsServiceKeyboardLayout* dest);
VALA_EXTERN void settings_daemon_accounts_service_keyboard_layout_destroy (SettingsDaemonAccountsServiceKeyboardLayout* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SettingsDaemonAccountsServiceKeyboardLayout, settings_daemon_accounts_service_keyboard_layout_destroy)
VALA_EXTERN GType settings_daemon_accounts_service_xkb_option_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceXkbOption* settings_daemon_accounts_service_xkb_option_dup (const SettingsDaemonAccountsServiceXkbOption* self);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_free (SettingsDaemonAccountsServiceXkbOption* self);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_copy (const SettingsDaemonAccountsServiceXkbOption* self,
                                                       SettingsDaemonAccountsServiceXkbOption* dest);
VALA_EXTERN void settings_daemon_accounts_service_xkb_option_destroy (SettingsDaemonAccountsServiceXkbOption* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SettingsDaemonAccountsServiceXkbOption, settings_daemon_accounts_service_xkb_option_destroy)
VALA_EXTERN GType settings_daemon_accounts_service_coordinates_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SettingsDaemonAccountsServiceCoordinates* settings_daemon_accounts_service_coordinates_dup (const SettingsDaemonAccountsServiceCoordinates* self);
VALA_EXTERN void settings_daemon_accounts_service_coordinates_free (SettingsDaemonAccountsServiceCoordinates* self);
VALA_EXTERN GType settings_daemon_accounts_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonAccountsService, g_object_unref)
VALA_EXTERN GType settings_daemon_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint settings_daemon_accounts_service_register_object (void* object,
                                                        GDBusConnection* connection,
                                                        const gchar* path,
                                                        GError** error);
VALA_EXTERN GType pantheon_accounts_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PantheonAccountsService, g_object_unref)
VALA_EXTERN GType pantheon_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint pantheon_accounts_service_register_object (void* object,
                                                 GDBusConnection* connection,
                                                 const gchar* path,
                                                 GError** error);
VALA_EXTERN GType display_manager_accounts_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DisplayManagerAccountsService, g_object_unref)
VALA_EXTERN GType display_manager_accounts_service_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint display_manager_accounts_service_register_object (void* object,
                                                        GDBusConnection* connection,
                                                        const gchar* path,
                                                        GError** error);
VALA_EXTERN GType settings_daemon_backends_keyboard_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsKeyboardSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_mouse_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsMouseSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_interface_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsInterfaceSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_night_light_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsNightLightSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_prefers_color_scheme_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsPrefersColorSchemeSettings, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_accent_color_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsAccentColorManager, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_housekeeping_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsHousekeeping, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_power_profiles_sync_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsPowerProfilesSync, g_object_unref)
VALA_EXTERN GType settings_daemon_backends_application_shortcuts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsApplicationShortcuts, g_object_unref)
VALA_EXTERN SettingsDaemonApplication* settings_daemon_application_new (void);
VALA_EXTERN SettingsDaemonApplication* settings_daemon_application_construct (GType object_type);
static gint settings_daemon_application_real_handle_local_options (GApplication* base,
                                                            GVariantDict* options);
static void settings_daemon_application_real_startup (GApplication* base);
static void __lambda20_ (SettingsDaemonApplication* self);
static void ___lambda20__gtk_application_query_end (GtkApplication* _sender,
                                             gpointer self);
VALA_EXTERN SettingsDaemonBackendsHousekeeping* settings_daemon_backends_housekeeping_new (void);
VALA_EXTERN SettingsDaemonBackendsHousekeeping* settings_daemon_backends_housekeeping_construct (GType object_type);
VALA_EXTERN SettingsDaemonBackendsPowerProfilesSync* settings_daemon_backends_power_profiles_sync_new (void);
VALA_EXTERN SettingsDaemonBackendsPowerProfilesSync* settings_daemon_backends_power_profiles_sync_construct (GType object_type);
VALA_EXTERN SettingsDaemonBackendsApplicationShortcuts* settings_daemon_backends_application_shortcuts_new (void);
VALA_EXTERN SettingsDaemonBackendsApplicationShortcuts* settings_daemon_backends_application_shortcuts_construct (GType object_type);
static void settings_daemon_application_check_firmware_updates (SettingsDaemonApplication* self);
static void _settings_daemon_application_check_firmware_updates_g_simple_action_activate (GSimpleAction* _sender,
                                                                                   GVariant* parameter,
                                                                                   gpointer self);
static void settings_daemon_application_show_firmware_updates (SettingsDaemonApplication* self);
static void _settings_daemon_application_show_firmware_updates_g_simple_action_activate (GSimpleAction* _sender,
                                                                                  GVariant* parameter,
                                                                                  gpointer self);
static void __lambda22_ (SettingsDaemonApplication* self);
static void ___lambda22__g_simple_action_activate (GSimpleAction* _sender,
                                            GVariant* parameter,
                                            gpointer self);
static void settings_daemon_application_setup_accounts_services (SettingsDaemonApplication* self,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static void settings_daemon_application_setup_accounts_services_finish (SettingsDaemonApplication* self,
                                                                 GAsyncResult* _res_);
static gboolean settings_daemon_application_real_dbus_register (GApplication* base,
                                                         GDBusConnection* connection,
                                                         const gchar* object_path,
                                                         GError** error);
VALA_EXTERN SettingsDaemonBackendsSystemUpdate* settings_daemon_backends_system_update_new (void);
VALA_EXTERN SettingsDaemonBackendsSystemUpdate* settings_daemon_backends_system_update_construct (GType object_type);
VALA_EXTERN GType settings_daemon_backends_system_update_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsSystemUpdate, g_object_unref)
VALA_EXTERN guint settings_daemon_backends_system_update_register_object (void* object,
                                                              GDBusConnection* connection,
                                                              const gchar* path,
                                                              GError** error);
VALA_EXTERN SettingsDaemonBackendsUbuntuDrivers* settings_daemon_backends_ubuntu_drivers_new (void);
VALA_EXTERN SettingsDaemonBackendsUbuntuDrivers* settings_daemon_backends_ubuntu_drivers_construct (GType object_type);
VALA_EXTERN GType settings_daemon_backends_ubuntu_drivers_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsUbuntuDrivers, g_object_unref)
VALA_EXTERN guint settings_daemon_backends_ubuntu_drivers_register_object (void* object,
                                                               GDBusConnection* connection,
                                                               const gchar* path,
                                                               GError** error);
static void settings_daemon_application_setup_accounts_services_data_free (gpointer _data);
static gboolean settings_daemon_application_setup_accounts_services_co (SettingsDaemonApplicationSetupAccountsServicesData* _data_);
static void settings_daemon_application_setup_accounts_services_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
VALA_EXTERN SettingsDaemonBackendsKeyboardSettings* settings_daemon_backends_keyboard_settings_new (SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsKeyboardSettings* settings_daemon_backends_keyboard_settings_construct (GType object_type,
                                                                                              SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsMouseSettings* settings_daemon_backends_mouse_settings_new (SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsMouseSettings* settings_daemon_backends_mouse_settings_construct (GType object_type,
                                                                                        SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsNightLightSettings* settings_daemon_backends_night_light_settings_new (SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsNightLightSettings* settings_daemon_backends_night_light_settings_construct (GType object_type,
                                                                                                   SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsInterfaceSettings* settings_daemon_backends_interface_settings_new (SettingsDaemonAccountsService* accounts_service,
                                                                                          DisplayManagerAccountsService* display_manager_accounts_service);
VALA_EXTERN SettingsDaemonBackendsInterfaceSettings* settings_daemon_backends_interface_settings_construct (GType object_type,
                                                                                                SettingsDaemonAccountsService* accounts_service,
                                                                                                DisplayManagerAccountsService* display_manager_accounts_service);
VALA_EXTERN SettingsDaemonBackendsPrefersColorSchemeSettings* settings_daemon_backends_prefers_color_scheme_settings_new (PantheonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsPrefersColorSchemeSettings* settings_daemon_backends_prefers_color_scheme_settings_construct (GType object_type,
                                                                                                                    PantheonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsAccentColorManager* settings_daemon_backends_accent_color_manager_new (PantheonAccountsService* pantheon_accounts_service,
                                                                                             SettingsDaemonAccountsService* accounts_service);
VALA_EXTERN SettingsDaemonBackendsAccentColorManager* settings_daemon_backends_accent_color_manager_construct (GType object_type,
                                                                                                   PantheonAccountsService* pantheon_accounts_service,
                                                                                                   SettingsDaemonAccountsService* accounts_service);
static void __lambda21_ (SettingsDaemonApplication* self,
                  GObject* obj,
                  GAsyncResult* res);
static void ___lambda21__gasync_ready_callback (GObject* source_object,
                                         GAsyncResult* res,
                                         gpointer self);
static gint settings_daemon_application_main (gchar** args,
                                       gint args_length1);
static GObject * settings_daemon_application_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static void settings_daemon_application_finalize (GObject * obj);
static GType settings_daemon_application_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
settings_daemon_application_get_instance_private (SettingsDaemonApplication* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsDaemonApplication_private_offset);
}

SettingsDaemonApplication*
settings_daemon_application_construct (GType object_type)
{
	SettingsDaemonApplication * self = NULL;
	self = (SettingsDaemonApplication*) g_object_new (object_type, "application-id", BUILD_PROJECT_NAME, "flags", G_APPLICATION_IS_SERVICE | G_APPLICATION_ALLOW_REPLACEMENT, "register-session", TRUE, NULL);
	return self;
}

SettingsDaemonApplication*
settings_daemon_application_new (void)
{
	return settings_daemon_application_construct (SETTINGS_DAEMON_TYPE_APPLICATION);
}

static gint
settings_daemon_application_real_handle_local_options (GApplication* base,
                                                       GVariantDict* options)
{
	SettingsDaemonApplication * self;
	gint result;
	self = (SettingsDaemonApplication*) base;
	g_return_val_if_fail (options != NULL, -1);
	if (g_variant_dict_contains (options, "version")) {
		FILE* _tmp0_;
		_tmp0_ = stdout;
		fprintf (_tmp0_, "%s\n", BUILD_VERSION);
		result = 0;
		return result;
	}
	result = -1;
	return result;
}

static void
__lambda20_ (SettingsDaemonApplication* self)
{
	g_application_release ((GApplication*) self);
}

static void
___lambda20__gtk_application_query_end (GtkApplication* _sender,
                                        gpointer self)
{
	__lambda20_ ((SettingsDaemonApplication*) self);
}

static void
_settings_daemon_application_check_firmware_updates_g_simple_action_activate (GSimpleAction* _sender,
                                                                              GVariant* parameter,
                                                                              gpointer self)
{
	settings_daemon_application_check_firmware_updates ((SettingsDaemonApplication*) self);
}

static void
_settings_daemon_application_show_firmware_updates_g_simple_action_activate (GSimpleAction* _sender,
                                                                             GVariant* parameter,
                                                                             gpointer self)
{
	settings_daemon_application_show_firmware_updates ((SettingsDaemonApplication*) self);
}

static void
__lambda22_ (SettingsDaemonApplication* self)
{
	g_app_info_launch_default_for_uri_async ("settings://about/os", NULL, NULL, NULL, NULL);
}

static void
___lambda22__g_simple_action_activate (GSimpleAction* _sender,
                                       GVariant* parameter,
                                       gpointer self)
{
	__lambda22_ ((SettingsDaemonApplication*) self);
}

static void
settings_daemon_application_real_startup (GApplication* base)
{
	SettingsDaemonApplication * self;
	SettingsDaemonBackendsHousekeeping* _tmp0_;
	SettingsDaemonBackendsPowerProfilesSync* _tmp1_;
	SettingsDaemonBackendsApplicationShortcuts* _tmp2_;
	GSimpleAction* check_firmware_updates_action = NULL;
	GSimpleAction* _tmp3_;
	GSimpleAction* show_firmware_updates_action = NULL;
	GSimpleAction* _tmp4_;
	GSimpleAction* show_updates_action = NULL;
	GSimpleAction* _tmp5_;
	self = (SettingsDaemonApplication*) base;
	g_signal_connect_object ((GtkApplication*) self, "query-end", (GCallback) ___lambda20__gtk_application_query_end, self, 0);
	G_APPLICATION_CLASS (settings_daemon_application_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_get_type (), GtkApplication));
	_tmp0_ = settings_daemon_backends_housekeeping_new ();
	_g_object_unref0 (self->priv->housekeeping);
	self->priv->housekeeping = _tmp0_;
	_tmp1_ = settings_daemon_backends_power_profiles_sync_new ();
	_g_object_unref0 (self->priv->power_profiles_sync);
	self->priv->power_profiles_sync = _tmp1_;
	_tmp2_ = settings_daemon_backends_application_shortcuts_new ();
	_g_object_unref0 (self->priv->application_shortcuts);
	self->priv->application_shortcuts = _tmp2_;
	_tmp3_ = g_simple_action_new ("check-firmware-updates", NULL);
	check_firmware_updates_action = _tmp3_;
	g_signal_connect_object (check_firmware_updates_action, "activate", (GCallback) _settings_daemon_application_check_firmware_updates_g_simple_action_activate, self, 0);
	g_action_map_add_action ((GActionMap*) self, (GAction*) check_firmware_updates_action);
	_tmp4_ = g_simple_action_new ("show-firmware-updates", NULL);
	show_firmware_updates_action = _tmp4_;
	g_signal_connect_object (show_firmware_updates_action, "activate", (GCallback) _settings_daemon_application_show_firmware_updates_g_simple_action_activate, self, 0);
	g_action_map_add_action ((GActionMap*) self, (GAction*) show_firmware_updates_action);
	_tmp5_ = g_simple_action_new (SETTINGS_DAEMON_APPLICATION_SHOW_UPDATES_ACTION, NULL);
	show_updates_action = _tmp5_;
	g_signal_connect_object (show_updates_action, "activate", (GCallback) ___lambda22__g_simple_action_activate, self, 0);
	g_action_map_add_action ((GActionMap*) self, (GAction*) show_updates_action);
	settings_daemon_application_setup_accounts_services (self, NULL, NULL);
	g_application_hold ((GApplication*) self);
	_g_object_unref0 (show_updates_action);
	_g_object_unref0 (show_firmware_updates_action);
	_g_object_unref0 (check_firmware_updates_action);
}

static gboolean
settings_daemon_application_real_dbus_register (GApplication* base,
                                                GDBusConnection* connection,
                                                const gchar* object_path,
                                                GError** error)
{
	SettingsDaemonApplication * self;
	SettingsDaemonBackendsSystemUpdate* _tmp1_;
	SettingsDaemonBackendsSystemUpdate* _tmp2_;
	SettingsDaemonBackendsUbuntuDrivers* _tmp4_;
	SettingsDaemonBackendsUbuntuDrivers* _tmp5_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = (SettingsDaemonApplication*) base;
	g_return_val_if_fail (connection != NULL, FALSE);
	g_return_val_if_fail (object_path != NULL, FALSE);
	G_APPLICATION_CLASS (settings_daemon_application_parent_class)->dbus_register ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_get_type (), GtkApplication), connection, object_path, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp0_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		return _tmp0_;
	}
	_tmp1_ = settings_daemon_backends_system_update_new ();
	_tmp2_ = _tmp1_;
	settings_daemon_backends_system_update_register_object (_tmp2_, connection, object_path, &_inner_error0_);
	_g_object_unref0 (_tmp2_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp3_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		return _tmp3_;
	}
	_tmp4_ = settings_daemon_backends_ubuntu_drivers_new ();
	_tmp5_ = _tmp4_;
	settings_daemon_backends_ubuntu_drivers_register_object (_tmp5_, connection, object_path, &_inner_error0_);
	_g_object_unref0 (_tmp5_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp6_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		return _tmp6_;
	}
	result = TRUE;
	return result;
}

static void
settings_daemon_application_setup_accounts_services_data_free (gpointer _data)
{
	SettingsDaemonApplicationSetupAccountsServicesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (SettingsDaemonApplicationSetupAccountsServicesData, _data_);
}

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

static void
settings_daemon_application_setup_accounts_services (SettingsDaemonApplication* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	SettingsDaemonApplicationSetupAccountsServicesData* _data_;
	SettingsDaemonApplication* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (SettingsDaemonApplicationSetupAccountsServicesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, settings_daemon_application_setup_accounts_services_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	settings_daemon_application_setup_accounts_services_co (_data_);
}

static void
settings_daemon_application_setup_accounts_services_finish (SettingsDaemonApplication* self,
                                                            GAsyncResult* _res_)
{
	SettingsDaemonApplicationSetupAccountsServicesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
settings_daemon_application_setup_accounts_services_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	SettingsDaemonApplicationSetupAccountsServicesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	settings_daemon_application_setup_accounts_services_co (_data_);
}

static gboolean
settings_daemon_application_setup_accounts_services_co (SettingsDaemonApplicationSetupAccountsServicesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		g_bus_get (G_BUS_TYPE_SYSTEM, NULL, settings_daemon_application_setup_accounts_services_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp1_ = g_bus_get_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp0_ = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->connection = _data_->_tmp0_;
		_data_->_tmp2_ = _data_->connection;
		_data_->_tmp3_ = g_get_user_name ();
		_data_->_tmp4_ = g_variant_new_string (_data_->_tmp3_);
		g_variant_ref_sink (_data_->_tmp4_);
		_data_->_tmp5_ = g_new0 (GVariant*, 1 + 1);
		_data_->_tmp5_[0] = _data_->_tmp4_;
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp6__length1 = 1;
		_data_->_tmp7_ = g_variant_new_tuple (_data_->_tmp6_, 1);
		g_variant_ref_sink (_data_->_tmp7_);
		_data_->_tmp8_ = _data_->_tmp7_;
		_data_->_tmp9_ = g_variant_type_new ("(o)");
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_state_ = 2;
		g_dbus_connection_call (_data_->_tmp2_, SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME, SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_PATH, SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME, "FindUserByName", _data_->_tmp8_, _data_->_tmp10_, G_DBUS_CALL_FLAGS_NONE, -1, NULL, settings_daemon_application_setup_accounts_services_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp11_ = g_dbus_connection_call_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_g_variant_type_free0 (_data_->_tmp10_);
		_g_variant_unref0 (_data_->_tmp8_);
		_data_->_tmp6_ = (_vala_array_free (_data_->_tmp6_, _data_->_tmp6__length1, (GDestroyNotify) g_variant_unref), NULL);
		_data_->reply = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->_tmp0_);
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->reply;
		_data_->_tmp14_ = NULL;
		g_variant_get_child (_data_->_tmp13_, (gsize) 0, "o", &_data_->_tmp14_, NULL);
		_g_free0 (_data_->path);
		_data_->path = _data_->_tmp14_;
		_data_->_tmp16_ = _data_->connection;
		_data_->_tmp17_ = _data_->path;
		_data_->_state_ = 3;
		g_async_initable_new_async (SETTINGS_DAEMON_TYPE_ACCOUNTS_SERVICE_PROXY, 0, NULL, settings_daemon_application_setup_accounts_services_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "g-name", SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME, "g-connection", _data_->_tmp16_, "g-object-path", _data_->_tmp17_, "g-interface-name", "io.elementary.SettingsDaemon.AccountsService", NULL);
		return FALSE;
		_state_3:
		_data_->_tmp18_ = (SettingsDaemonAccountsService*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp15_ = (SettingsDaemonAccountsService*) _data_->_tmp18_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_variant_unref0 (_data_->reply);
			_g_object_unref0 (_data_->_tmp0_);
			goto __catch0_g_error;
		}
		_data_->_tmp19_ = _data_->_tmp15_;
		_data_->_tmp15_ = NULL;
		_g_object_unref0 (_data_->self->priv->accounts_service);
		_data_->self->priv->accounts_service = _data_->_tmp19_;
		_data_->_tmp20_ = _data_->self->priv->accounts_service;
		_data_->_tmp21_ = settings_daemon_backends_keyboard_settings_new (_data_->_tmp20_);
		_g_object_unref0 (_data_->self->priv->keyboard_settings);
		_data_->self->priv->keyboard_settings = _data_->_tmp21_;
		_data_->_tmp22_ = _data_->self->priv->accounts_service;
		_data_->_tmp23_ = settings_daemon_backends_mouse_settings_new (_data_->_tmp22_);
		_g_object_unref0 (_data_->self->priv->mouse_settings);
		_data_->self->priv->mouse_settings = _data_->_tmp23_;
		_data_->_tmp24_ = _data_->self->priv->accounts_service;
		_data_->_tmp25_ = settings_daemon_backends_night_light_settings_new (_data_->_tmp24_);
		_g_object_unref0 (_data_->self->priv->night_light_settings);
		_data_->self->priv->night_light_settings = _data_->_tmp25_;
		_g_object_unref0 (_data_->_tmp15_);
		_g_variant_unref0 (_data_->reply);
		_g_object_unref0 (_data_->_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_warning ("Application.vala:114: Could not connect to AccountsService. Settings w" \
"ill not be synced");
		_g_free0 (_data_->path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp27_ = _data_->connection;
		_data_->_tmp28_ = _data_->path;
		_data_->_state_ = 4;
		g_async_initable_new_async (DISPLAY_MANAGER_TYPE_ACCOUNTS_SERVICE_PROXY, 0, NULL, settings_daemon_application_setup_accounts_services_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "g-name", SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME, "g-connection", _data_->_tmp27_, "g-object-path", _data_->_tmp28_, "g-interface-name", "org.freedesktop.DisplayManager.AccountsService", NULL);
		return FALSE;
		_state_4:
		_data_->_tmp29_ = (DisplayManagerAccountsService*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp26_ = (DisplayManagerAccountsService*) _data_->_tmp29_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_data_->_tmp30_ = _data_->_tmp26_;
		_data_->_tmp26_ = NULL;
		_g_object_unref0 (_data_->self->priv->display_manager_service);
		_data_->self->priv->display_manager_service = _data_->_tmp30_;
		_data_->_tmp31_ = _data_->self->priv->accounts_service;
		_data_->_tmp32_ = _data_->self->priv->display_manager_service;
		_data_->_tmp33_ = settings_daemon_backends_interface_settings_new (_data_->_tmp31_, _data_->_tmp32_);
		_g_object_unref0 (_data_->self->priv->interface_settings);
		_data_->self->priv->interface_settings = _data_->_tmp33_;
		_g_object_unref0 (_data_->_tmp26_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_warning ("Application.vala:122: Unable to get LightDM's AccountsService proxy, b" \
"ackground file might be incorrect");
	}
	__finally1:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp35_ = _data_->connection;
		_data_->_tmp36_ = _data_->path;
		_data_->_state_ = 5;
		g_async_initable_new_async (PANTHEON_TYPE_ACCOUNTS_SERVICE_PROXY, 0, NULL, settings_daemon_application_setup_accounts_services_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "g-name", SETTINGS_DAEMON_APPLICATION_FDO_ACCOUNTS_NAME, "g-connection", _data_->_tmp35_, "g-object-path", _data_->_tmp36_, "g-interface-name", "io.elementary.pantheon.AccountsService", NULL);
		return FALSE;
		_state_5:
		_data_->_tmp37_ = (PantheonAccountsService*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp34_ = (PantheonAccountsService*) _data_->_tmp37_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch2_g_error;
		}
		_data_->_tmp38_ = _data_->_tmp34_;
		_data_->_tmp34_ = NULL;
		_g_object_unref0 (_data_->self->priv->pantheon_service);
		_data_->self->priv->pantheon_service = _data_->_tmp38_;
		_data_->_tmp39_ = _data_->self->priv->pantheon_service;
		_data_->_tmp40_ = settings_daemon_backends_prefers_color_scheme_settings_new (_data_->_tmp39_);
		_g_object_unref0 (_data_->self->priv->prefers_color_scheme_settings);
		_data_->self->priv->prefers_color_scheme_settings = _data_->_tmp40_;
		_data_->_tmp41_ = _data_->self->priv->pantheon_service;
		_data_->_tmp42_ = _data_->self->priv->accounts_service;
		_data_->_tmp43_ = settings_daemon_backends_accent_color_manager_new (_data_->_tmp41_, _data_->_tmp42_);
		_g_object_unref0 (_data_->self->priv->accent_color_manager);
		_data_->self->priv->accent_color_manager = _data_->_tmp43_;
		_g_object_unref0 (_data_->_tmp34_);
	}
	goto __finally2;
	__catch2_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_warning ("Application.vala:130: Unable to get pantheon's AccountsService proxy, " \
"color scheme preference may be incorrect");
	}
	__finally2:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_free0 (_data_->path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
settings_daemon_application_check_firmware_updates (SettingsDaemonApplication* self)
{
	FwupdClient* client = NULL;
	FwupdClient* _tmp0_;
	gint updates = 0;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = fwupd_client_new ();
	client = _tmp0_;
	updates = 0;
	{
		GPtrArray* devices = NULL;
		FwupdClient* _tmp1_;
		GPtrArray* _tmp2_;
		GPtrArray* _tmp3_;
		_tmp1_ = client;
		_tmp2_ = fwupd_client_get_devices (_tmp1_, NULL, &_inner_error0_);
		devices = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp3_ = devices;
		{
			GPtrArray* device_collection = NULL;
			guint device_index = 0U;
			device_collection = _tmp3_;
			for (device_index = 0; device_index < device_collection->len; device_index = device_index + 1) {
				FwupdDevice* device = NULL;
				device = (FwupdDevice*) g_ptr_array_index (device_collection, device_index);
				{
					FwupdDevice* _tmp4_;
					FwupdRelease* release = NULL;
					gboolean _tmp15_ = FALSE;
					FwupdRelease* _tmp16_;
					_tmp4_ = device;
					if (!fwupd_device_has_flag (_tmp4_, FWUPD_DEVICE_FLAG_UPDATABLE)) {
						continue;
					}
					release = NULL;
					{
						GPtrArray* upgrades = NULL;
						FwupdClient* _tmp5_;
						FwupdDevice* _tmp6_;
						const gchar* _tmp7_;
						GPtrArray* _tmp8_;
						GPtrArray* _tmp9_;
						_tmp5_ = client;
						_tmp6_ = device;
						_tmp7_ = fwupd_device_get_id (_tmp6_);
						_tmp8_ = fwupd_client_get_upgrades (_tmp5_, _tmp7_, NULL, &_inner_error0_);
						upgrades = _tmp8_;
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							goto __catch1_g_error;
						}
						_tmp9_ = upgrades;
						if (_tmp9_ != NULL) {
							GPtrArray* _tmp10_;
							gconstpointer _tmp11_;
							FwupdRelease* _tmp12_;
							_tmp10_ = upgrades;
							_tmp11_ = g_ptr_array_index (_tmp10_, (guint) 0);
							_tmp12_ = _g_object_ref0 ((FwupdRelease*) _tmp11_);
							_g_object_unref0 (release);
							release = _tmp12_;
						}
						_g_ptr_array_unref0 (upgrades);
					}
					goto __finally1;
					__catch1_g_error:
					{
						GError* e = NULL;
						GError* _tmp13_;
						const gchar* _tmp14_;
						e = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp13_ = e;
						_tmp14_ = _tmp13_->message;
						g_warning ("Application.vala:158: %s", _tmp14_);
						_g_error_free0 (e);
						_g_object_unref0 (release);
						continue;
					}
					__finally1:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						_g_object_unref0 (release);
						_g_ptr_array_unref0 (devices);
						goto __catch0_g_error;
					}
					_tmp16_ = release;
					if (_tmp16_ != NULL) {
						FwupdDevice* _tmp17_;
						const gchar* _tmp18_;
						FwupdRelease* _tmp19_;
						const gchar* _tmp20_;
						_tmp17_ = device;
						_tmp18_ = fwupd_device_get_version (_tmp17_);
						_tmp19_ = release;
						_tmp20_ = fwupd_release_get_version (_tmp19_);
						_tmp15_ = g_strcmp0 (_tmp18_, _tmp20_) != 0;
					} else {
						_tmp15_ = FALSE;
					}
					if (_tmp15_) {
						gint _tmp21_;
						_tmp21_ = updates;
						updates = _tmp21_ + 1;
					}
					_g_object_unref0 (release);
				}
			}
		}
		_g_ptr_array_unref0 (devices);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp22_;
		const gchar* _tmp23_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp22_ = e;
		_tmp23_ = _tmp22_->message;
		g_warning ("Application.vala:167: %s", _tmp23_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (client);
		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;
	}
	if (updates != 0) {
		gchar* title = NULL;
		gchar* _tmp24_;
		gchar* body = NULL;
		gchar* _tmp25_;
		GNotification* notification = NULL;
		const gchar* _tmp26_;
		GNotification* _tmp27_;
		GNotification* _tmp28_;
		const gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		GNotification* _tmp32_;
		GThemedIcon* _tmp33_;
		GThemedIcon* _tmp34_;
		GNotification* _tmp35_;
		GNotification* _tmp36_;
		_tmp24_ = g_strdup (ngettext ("Firmware Update Available", "Firmware Updates Available", (gulong) updates));
		title = _tmp24_;
		_tmp25_ = g_strdup (ngettext ("%u update is available for your hardware", "%u updates are available for your hardware", (gulong) updates));
		body = _tmp25_;
		_tmp26_ = title;
		_tmp27_ = g_notification_new (_tmp26_);
		notification = _tmp27_;
		_tmp28_ = notification;
		_tmp29_ = body;
		_tmp30_ = g_strdup_printf (_tmp29_, updates);
		_tmp31_ = _tmp30_;
		g_notification_set_body (_tmp28_, _tmp31_);
		_g_free0 (_tmp31_);
		_tmp32_ = notification;
		_tmp33_ = (GThemedIcon*) g_themed_icon_new ("application-x-firmware");
		_tmp34_ = _tmp33_;
		g_notification_set_icon (_tmp32_, (GIcon*) _tmp34_);
		_g_object_unref0 (_tmp34_);
		_tmp35_ = notification;
		g_notification_set_default_action (_tmp35_, "app.show-firmware-updates");
		_tmp36_ = notification;
		g_application_send_notification ((GApplication*) self, "firmware.updates", _tmp36_);
		_g_object_unref0 (notification);
		_g_free0 (body);
		_g_free0 (title);
	} else {
		g_application_withdraw_notification ((GApplication*) self, "firmware.updates");
	}
	_g_object_unref0 (client);
}

static void
__lambda21_ (SettingsDaemonApplication* self,
             GObject* obj,
             GAsyncResult* res)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		g_app_info_launch_default_for_uri_finish (res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp0_;
		const gchar* _tmp1_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp0_ = e;
		_tmp1_ = _tmp0_->message;
		g_critical ("Application.vala:196: %s", _tmp1_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
___lambda21__gasync_ready_callback (GObject* source_object,
                                    GAsyncResult* res,
                                    gpointer self)
{
	__lambda21_ ((SettingsDaemonApplication*) self, source_object, res);
	g_object_unref (self);
}

static void
settings_daemon_application_show_firmware_updates (SettingsDaemonApplication* self)
{
	GdkAppLaunchContext* context = NULL;
	GdkDisplay* _tmp0_;
	GdkAppLaunchContext* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = gdk_display_get_app_launch_context (_tmp0_);
	context = _tmp1_;
	g_app_info_launch_default_for_uri_async ("settings://about/firmware", (GAppLaunchContext*) context, NULL, ___lambda21__gasync_ready_callback, g_object_ref (self));
	_g_object_unref0 (context);
}

static gint
settings_daemon_application_main (gchar** args,
                                  gint args_length1)
{
	SettingsDaemonApplication* _tmp0_;
	SettingsDaemonApplication* _tmp1_;
	gint _tmp2_;
	gint result;
	_tmp0_ = settings_daemon_application_new ();
	_tmp1_ = _tmp0_;
	_tmp2_ = g_application_run ((GApplication*) _tmp1_, (gint) args_length1, args);
	_g_object_unref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

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

static GObject *
settings_daemon_application_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SettingsDaemonApplication * self;
	parent_class = G_OBJECT_CLASS (settings_daemon_application_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_TYPE_APPLICATION, SettingsDaemonApplication);
	setlocale (LC_ALL, "");
	bindtextdomain (BUILD_GETTEXT_PACKAGE, BUILD_LOCALEDIR);
	bind_textdomain_codeset (BUILD_GETTEXT_PACKAGE, "UTF-8");
	textdomain (BUILD_GETTEXT_PACKAGE);
	g_application_add_main_option ((GApplication*) self, "version", 'v', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "Display the version", NULL);
	return obj;
}

static void
settings_daemon_application_class_init (SettingsDaemonApplicationClass * klass,
                                        gpointer klass_data)
{
	settings_daemon_application_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsDaemonApplication_private_offset);
	((GApplicationClass *) klass)->handle_local_options = (gint (*) (GApplication*, GVariantDict*)) settings_daemon_application_real_handle_local_options;
	((GApplicationClass *) klass)->startup = (void (*) (GApplication*)) settings_daemon_application_real_startup;
	((GApplicationClass *) klass)->dbus_register = (gboolean (*) (GApplication*, GDBusConnection*, const gchar*, GError**)) settings_daemon_application_real_dbus_register;
	G_OBJECT_CLASS (klass)->constructor = settings_daemon_application_constructor;
	G_OBJECT_CLASS (klass)->finalize = settings_daemon_application_finalize;
}

static void
settings_daemon_application_instance_init (SettingsDaemonApplication * self,
                                           gpointer klass)
{
	self->priv = settings_daemon_application_get_instance_private (self);
}

static void
settings_daemon_application_finalize (GObject * obj)
{
	SettingsDaemonApplication * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_TYPE_APPLICATION, SettingsDaemonApplication);
	_g_object_unref0 (self->priv->accounts_service);
	_g_object_unref0 (self->priv->pantheon_service);
	_g_object_unref0 (self->priv->display_manager_service);
	_g_object_unref0 (self->priv->keyboard_settings);
	_g_object_unref0 (self->priv->mouse_settings);
	_g_object_unref0 (self->priv->interface_settings);
	_g_object_unref0 (self->priv->night_light_settings);
	_g_object_unref0 (self->priv->prefers_color_scheme_settings);
	_g_object_unref0 (self->priv->accent_color_manager);
	_g_object_unref0 (self->priv->housekeeping);
	_g_object_unref0 (self->priv->power_profiles_sync);
	_g_object_unref0 (self->priv->application_shortcuts);
	G_OBJECT_CLASS (settings_daemon_application_parent_class)->finalize (obj);
}

static GType
settings_daemon_application_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsDaemonApplicationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_daemon_application_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDaemonApplication), 0, (GInstanceInitFunc) settings_daemon_application_instance_init, NULL };
	GType settings_daemon_application_type_id;
	settings_daemon_application_type_id = g_type_register_static (gtk_application_get_type (), "SettingsDaemonApplication", &g_define_type_info, 0);
	SettingsDaemonApplication_private_offset = g_type_add_instance_private (settings_daemon_application_type_id, sizeof (SettingsDaemonApplicationPrivate));
	return settings_daemon_application_type_id;
}

GType
settings_daemon_application_get_type (void)
{
	static volatile gsize settings_daemon_application_type_id__once = 0;
	if (g_once_init_enter (&settings_daemon_application_type_id__once)) {
		GType settings_daemon_application_type_id;
		settings_daemon_application_type_id = settings_daemon_application_get_type_once ();
		g_once_init_leave (&settings_daemon_application_type_id__once, settings_daemon_application_type_id);
	}
	return settings_daemon_application_type_id__once;
}

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

