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

/*
* Copyright 2021 elementary, Inc. (https://elementary.io)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
*/

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

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TYPE_SYSTEMD_MANAGER (systemd_manager_get_type ())
#define SYSTEMD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SYSTEMD_MANAGER, SystemdManager))
#define IS_SYSTEMD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SYSTEMD_MANAGER))
#define SYSTEMD_MANAGER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_SYSTEMD_MANAGER, SystemdManagerIface))

typedef struct _SystemdManager SystemdManager;
typedef struct _SystemdManagerIface SystemdManagerIface;

#define TYPE_SYSTEMD_MANAGER_PROXY (systemd_manager_proxy_get_type ())
typedef GDBusProxy SystemdManagerProxy;
typedef GDBusProxyClass SystemdManagerProxyClass;
typedef struct _SystemdManagerGetUnitFileStateReadyData SystemdManagerGetUnitFileStateReadyData;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _SystemdManagerEnableUnitFilesReadyData SystemdManagerEnableUnitFilesReadyData;
typedef struct _SystemdManagerStartUnitReadyData SystemdManagerStartUnitReadyData;

#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;
typedef struct _SettingsDaemonBackendsHousekeepingPrivate SettingsDaemonBackendsHousekeepingPrivate;
enum  {
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_0_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_NUM_PROPERTIES
};
static GParamSpec* settings_daemon_backends_housekeeping_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData;

#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG (settings_daemon_backends_housekeeping_cleanup_config_get_type ())
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfig))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfigClass))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_IS_CLEANUP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_IS_CLEANUP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG))
#define SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfigClass))

typedef struct _SettingsDaemonBackendsHousekeepingCleanupConfig SettingsDaemonBackendsHousekeepingCleanupConfig;
typedef struct _SettingsDaemonBackendsHousekeepingCleanupConfigClass SettingsDaemonBackendsHousekeepingCleanupConfigClass;
typedef struct _SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData;
typedef struct _SettingsDaemonBackendsHousekeepingCleanupConfigPrivate SettingsDaemonBackendsHousekeepingCleanupConfigPrivate;
enum  {
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_0_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_IS_DISABLED_PROPERTY,
	SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_NUM_PROPERTIES
};
static GParamSpec* settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_NUM_PROPERTIES];

struct _SystemdManagerIface {
	GTypeInterface parent_iface;
	void (*get_unit_file_state) (SystemdManager* self, const gchar* unit_file, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar* (*get_unit_file_state_finish) (SystemdManager* self, GAsyncResult* _res_, GError** error);
	void (*enable_unit_files) (SystemdManager* self, gchar** unit_files, gint unit_files_length1, gboolean runtime, gboolean replace, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*enable_unit_files_finish) (SystemdManager* self, GAsyncResult* _res_, GError** error);
	void (*start_unit) (SystemdManager* self, const gchar* name, const gchar* mode, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*start_unit_finish) (SystemdManager* self, GAsyncResult* _res_, GError** error);
};

struct _SystemdManagerGetUnitFileStateReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* unit_file;
};

struct _SystemdManagerEnableUnitFilesReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar** unit_files;
	gint unit_files_length1;
	gboolean runtime;
	gboolean replace;
};

struct _SystemdManagerStartUnitReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar* name;
	gchar* mode;
};

struct _SettingsDaemonBackendsHousekeeping {
	GObject parent_instance;
	SettingsDaemonBackendsHousekeepingPrivate * priv;
};

struct _SettingsDaemonBackendsHousekeepingClass {
	GObjectClass parent_class;
};

struct _SettingsDaemonBackendsHousekeepingPrivate {
	GSettings* housekeeping_settings;
	SystemdManager* systemd;
};

struct _SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SettingsDaemonBackendsHousekeeping* self;
	SystemdManager* _tmp0_;
	SystemdManager* _tmp1_;
	SystemdManager* _tmp2_;
	SystemdManager* _tmp3_;
	GError* e;
	GError* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	SystemdManager* _tmp7_;
	gchar* _tmp8_;
	SystemdManager* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	SystemdManager* _tmp13_;
	GError* _vala1_e;
	GError* _tmp14_;
	const gchar* _tmp15_;
	GError* _inner_error0_;
};

struct _SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SettingsDaemonBackendsHousekeeping* self;
	gchar* config_path;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	SettingsDaemonBackendsHousekeepingCleanupConfig* cleanup_config;
	GSettings* _tmp2_;
	SettingsDaemonBackendsHousekeepingCleanupConfig* _tmp3_;
	GFile* config_file;
	const gchar* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GFile* _tmp8_;
	gboolean _tmp9_;
	SettingsDaemonBackendsHousekeepingCleanupConfig* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	GFile* _tmp13_;
	GFile* _tmp14_;
	GFile* _tmp15_;
	GError* e;
	GError* _tmp16_;
	const gchar* _tmp17_;
	SettingsDaemonBackendsHousekeepingCleanupConfig* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GFile* _tmp21_;
	GError* _vala1_e;
	GError* _tmp22_;
	GError* _tmp23_;
	const gchar* _tmp24_;
	GFileIOStream* config_stream;
	GFileIOStream* _tmp25_;
	GFile* _tmp26_;
	GFileIOStream* _tmp27_;
	GFileIOStream* _tmp28_;
	GError* _vala2_e;
	GError* _tmp29_;
	const gchar* _tmp30_;
	GFileOutputStream* os;
	GFileIOStream* _tmp31_;
	GOutputStream* _tmp32_;
	GOutputStream* _tmp33_;
	GFileOutputStream* _tmp34_;
	GFileOutputStream* _tmp35_;
	SettingsDaemonBackendsHousekeepingCleanupConfig* _tmp36_;
	gint _tmp37_;
	guint8* _tmp38_;
	guint8* _tmp39_;
	gint _tmp39__length1;
	GError* _vala3_e;
	GError* _tmp40_;
	const gchar* _tmp41_;
	GError* _inner_error0_;
};

struct _SettingsDaemonBackendsHousekeepingCleanupConfig {
	GObject parent_instance;
	SettingsDaemonBackendsHousekeepingCleanupConfigPrivate * priv;
};

struct _SettingsDaemonBackendsHousekeepingCleanupConfigClass {
	GObjectClass parent_class;
};

struct _SettingsDaemonBackendsHousekeepingCleanupConfigPrivate {
	gboolean _clean_downloads;
	gboolean _clean_screenshots;
	gboolean _clean_temp;
	gboolean _clean_trash;
	gint _clean_after_days;
};

static gint SettingsDaemonBackendsHousekeeping_private_offset;
static gpointer settings_daemon_backends_housekeeping_parent_class = NULL;
static gint SettingsDaemonBackendsHousekeepingCleanupConfig_private_offset;
static gpointer settings_daemon_backends_housekeeping_cleanup_config_parent_class = NULL;

VALA_EXTERN GType systemd_manager_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint systemd_manager_register_object (void* object,
                                       GDBusConnection* connection,
                                       const gchar* path,
                                       GError** error);
VALA_EXTERN GType systemd_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SystemdManager, g_object_unref)
VALA_EXTERN void systemd_manager_get_unit_file_state (SystemdManager* self,
                                          const gchar* unit_file,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
VALA_EXTERN gchar* systemd_manager_get_unit_file_state_finish (SystemdManager* self,
                                                   GAsyncResult* _res_,
                                                   GError** error);
VALA_EXTERN void systemd_manager_enable_unit_files (SystemdManager* self,
                                        gchar** unit_files,
                                        gint unit_files_length1,
                                        gboolean runtime,
                                        gboolean replace,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN void systemd_manager_enable_unit_files_finish (SystemdManager* self,
                                               GAsyncResult* _res_,
                                               GError** error);
VALA_EXTERN void systemd_manager_start_unit (SystemdManager* self,
                                 const gchar* name,
                                 const gchar* mode,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_);
VALA_EXTERN void systemd_manager_start_unit_finish (SystemdManager* self,
                                        GAsyncResult* _res_,
                                        GError** error);
static GType systemd_manager_get_type_once (void);
static void systemd_manager_proxy_g_signal (GDBusProxy* proxy,
                                     const gchar* sender_name,
                                     const gchar* signal_name,
                                     GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void systemd_manager_proxy_get_unit_file_state_async (SystemdManager* self,
                                                      const gchar* unit_file,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static gchar* systemd_manager_proxy_get_unit_file_state_finish (SystemdManager* self,
                                                         GAsyncResult* _res_,
                                                         GError** error);
static void systemd_manager_proxy_enable_unit_files_async (SystemdManager* self,
                                                    gchar** unit_files,
                                                    gint unit_files_length1,
                                                    gboolean runtime,
                                                    gboolean replace,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static void systemd_manager_proxy_enable_unit_files_finish (SystemdManager* self,
                                                     GAsyncResult* _res_,
                                                     GError** error);
static void systemd_manager_proxy_start_unit_async (SystemdManager* self,
                                             const gchar* name,
                                             const gchar* mode,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static void systemd_manager_proxy_start_unit_finish (SystemdManager* self,
                                              GAsyncResult* _res_,
                                              GError** error);
static void systemd_manager_proxy_systemd_manager_interface_init (SystemdManagerIface* iface);
static void _dbus_systemd_manager_get_unit_file_state (SystemdManager* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation);
static void _dbus_systemd_manager_get_unit_file_state_ready (GObject * source_object,
                                                      GAsyncResult * _res_,
                                                      gpointer _user_data_);
static void _dbus_systemd_manager_enable_unit_files (SystemdManager* self,
                                              GVariant* _parameters_,
                                              GDBusMethodInvocation* invocation);
static void _dbus_systemd_manager_enable_unit_files_ready (GObject * source_object,
                                                    GAsyncResult * _res_,
                                                    gpointer _user_data_);
static void _dbus_systemd_manager_start_unit (SystemdManager* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation);
static void _dbus_systemd_manager_start_unit_ready (GObject * source_object,
                                             GAsyncResult * _res_,
                                             gpointer _user_data_);
static void systemd_manager_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* systemd_manager_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 systemd_manager_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 _systemd_manager_unregister_object (gpointer user_data);
VALA_EXTERN GType settings_daemon_backends_housekeeping_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsHousekeeping, g_object_unref)
static void settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_data_free (gpointer _data);
static void settings_daemon_backends_housekeeping_enable_systemd_tmpfiles (SettingsDaemonBackendsHousekeeping* self,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static void settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_finish (SettingsDaemonBackendsHousekeeping* self,
                                                                           GAsyncResult* _res_);
static gboolean settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_co (SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData* _data_);
static void settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready (GObject* source_object,
                                                                          GAsyncResult* _res_,
                                                                          gpointer _user_data_);
static void settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_data_free (gpointer _data);
static void settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config (SettingsDaemonBackendsHousekeeping* self,
                                                                          GAsyncReadyCallback _callback_,
                                                                          gpointer _user_data_);
static void settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_finish (SettingsDaemonBackendsHousekeeping* self,
                                                                                 GAsyncResult* _res_);
static gboolean settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_co (SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_);
static GType settings_daemon_backends_housekeeping_cleanup_config_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SettingsDaemonBackendsHousekeepingCleanupConfig, g_object_unref)
static SettingsDaemonBackendsHousekeepingCleanupConfig* settings_daemon_backends_housekeeping_cleanup_config_new (GSettings* settings);
static SettingsDaemonBackendsHousekeepingCleanupConfig* settings_daemon_backends_housekeeping_cleanup_config_construct (GType object_type,
                                                                                                                 GSettings* settings);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_get_is_disabled (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static void settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_ready (GObject* source_object,
                                                                                GAsyncResult* _res_,
                                                                                gpointer _user_data_);
static guint8* settings_daemon_backends_housekeeping_cleanup_config_data (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                   gint* result_length1);
VALA_EXTERN SettingsDaemonBackendsHousekeeping* settings_daemon_backends_housekeeping_new (void);
VALA_EXTERN SettingsDaemonBackendsHousekeeping* settings_daemon_backends_housekeeping_construct (GType object_type);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_downloads_are_not_home (void);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_get_clean_downloads (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static gint settings_daemon_backends_housekeeping_cleanup_config_get_clean_after_days (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static void _vala_array_add3 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_get_clean_screenshots (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static void _vala_array_add4 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_get_clean_temp (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static void _vala_array_add5 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static gboolean settings_daemon_backends_housekeeping_cleanup_config_get_clean_trash (SettingsDaemonBackendsHousekeepingCleanupConfig* self);
static void _vala_array_add6 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static void _vala_array_add7 (gchar** * array,
                       gint* length,
                       gint* size,
                       gchar* value);
static guint8* _vala_array_dup4 (guint8* self,
                          gssize length);
static void settings_daemon_backends_housekeeping_cleanup_config_set_clean_downloads (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                               gboolean value);
static void settings_daemon_backends_housekeeping_cleanup_config_set_clean_screenshots (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                                 gboolean value);
static void settings_daemon_backends_housekeeping_cleanup_config_set_clean_temp (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                          gboolean value);
static void settings_daemon_backends_housekeeping_cleanup_config_set_clean_trash (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                           gboolean value);
static void settings_daemon_backends_housekeeping_cleanup_config_set_clean_after_days (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                                gint value);
static void settings_daemon_backends_housekeeping_cleanup_config_finalize (GObject * obj);
static GType settings_daemon_backends_housekeeping_cleanup_config_get_type_once (void);
static void _vala_settings_daemon_backends_housekeeping_cleanup_config_get_property (GObject * object,
                                                                              guint property_id,
                                                                              GValue * value,
                                                                              GParamSpec * pspec);
static void _vala_settings_daemon_backends_housekeeping_cleanup_config_set_property (GObject * object,
                                                                              guint property_id,
                                                                              const GValue * value,
                                                                              GParamSpec * pspec);
static GObject * settings_daemon_backends_housekeeping_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties);
static void _settings_daemon_backends_housekeeping___lambda13_ (SettingsDaemonBackendsHousekeeping* self);
static void __settings_daemon_backends_housekeeping___lambda13__g_settings_changed (GSettings* _sender,
                                                                             const gchar* key,
                                                                             gpointer self);
static void settings_daemon_backends_housekeeping_finalize (GObject * obj);
static GType settings_daemon_backends_housekeeping_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 _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static const GDBusArgInfo _systemd_manager_dbus_arg_info_get_unit_file_state_unit_file = {-1, "unit_file", "s", NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_get_unit_file_state_result = {-1, "result", "s", NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_get_unit_file_state_in[] = {&_systemd_manager_dbus_arg_info_get_unit_file_state_unit_file, NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_get_unit_file_state_out[] = {&_systemd_manager_dbus_arg_info_get_unit_file_state_result, NULL};
static const GDBusMethodInfo _systemd_manager_dbus_method_info_get_unit_file_state = {-1, "GetUnitFileState", (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_get_unit_file_state_in), (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_get_unit_file_state_out), NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_enable_unit_files_unit_files = {-1, "unit_files", "as", NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_enable_unit_files_runtime = {-1, "runtime", "b", NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_enable_unit_files_replace = {-1, "replace", "b", NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_enable_unit_files_in[] = {&_systemd_manager_dbus_arg_info_enable_unit_files_unit_files, &_systemd_manager_dbus_arg_info_enable_unit_files_runtime, &_systemd_manager_dbus_arg_info_enable_unit_files_replace, NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_enable_unit_files_out[] = {NULL};
static const GDBusMethodInfo _systemd_manager_dbus_method_info_enable_unit_files = {-1, "EnableUnitFiles", (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_enable_unit_files_in), (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_enable_unit_files_out), NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_start_unit_name = {-1, "name", "s", NULL};
static const GDBusArgInfo _systemd_manager_dbus_arg_info_start_unit_mode = {-1, "mode", "s", NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_start_unit_in[] = {&_systemd_manager_dbus_arg_info_start_unit_name, &_systemd_manager_dbus_arg_info_start_unit_mode, NULL};
static const GDBusArgInfo * const _systemd_manager_dbus_arg_info_start_unit_out[] = {NULL};
static const GDBusMethodInfo _systemd_manager_dbus_method_info_start_unit = {-1, "StartUnit", (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_start_unit_in), (GDBusArgInfo **) (&_systemd_manager_dbus_arg_info_start_unit_out), NULL};
static const GDBusMethodInfo * const _systemd_manager_dbus_method_info[] = {&_systemd_manager_dbus_method_info_get_unit_file_state, &_systemd_manager_dbus_method_info_enable_unit_files, &_systemd_manager_dbus_method_info_start_unit, NULL};
static const GDBusSignalInfo * const _systemd_manager_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _systemd_manager_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _systemd_manager_dbus_interface_info = {-1, "org.freedesktop.systemd1.Manager", (GDBusMethodInfo **) (&_systemd_manager_dbus_method_info), (GDBusSignalInfo **) (&_systemd_manager_dbus_signal_info), (GDBusPropertyInfo **) (&_systemd_manager_dbus_property_info), NULL};
static const GDBusInterfaceVTable _systemd_manager_dbus_interface_vtable = {systemd_manager_dbus_interface_method_call, systemd_manager_dbus_interface_get_property, systemd_manager_dbus_interface_set_property};

void
systemd_manager_get_unit_file_state (SystemdManager* self,
                                     const gchar* unit_file,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->get_unit_file_state) {
		_iface_->get_unit_file_state (self, unit_file, _callback_, _user_data_);
	}
}

gchar*
systemd_manager_get_unit_file_state_finish (SystemdManager* self,
                                            GAsyncResult* _res_,
                                            GError** error)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->get_unit_file_state_finish) {
		return _iface_->get_unit_file_state_finish (self, _res_, error);
	}
	return NULL;
}

void
systemd_manager_enable_unit_files (SystemdManager* self,
                                   gchar** unit_files,
                                   gint unit_files_length1,
                                   gboolean runtime,
                                   gboolean replace,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->enable_unit_files) {
		_iface_->enable_unit_files (self, unit_files, unit_files_length1, runtime, replace, _callback_, _user_data_);
	}
}

void
systemd_manager_enable_unit_files_finish (SystemdManager* self,
                                          GAsyncResult* _res_,
                                          GError** error)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->enable_unit_files_finish) {
		_iface_->enable_unit_files_finish (self, _res_, error);
	}
}

void
systemd_manager_start_unit (SystemdManager* self,
                            const gchar* name,
                            const gchar* mode,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->start_unit) {
		_iface_->start_unit (self, name, mode, _callback_, _user_data_);
	}
}

void
systemd_manager_start_unit_finish (SystemdManager* self,
                                   GAsyncResult* _res_,
                                   GError** error)
{
	SystemdManagerIface* _iface_;
	_iface_ = SYSTEMD_MANAGER_GET_INTERFACE (self);
	if (_iface_->start_unit_finish) {
		_iface_->start_unit_finish (self, _res_, error);
	}
}

static void
systemd_manager_default_init (SystemdManagerIface * iface,
                              gpointer iface_data)
{
}

static GType
systemd_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SystemdManagerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) systemd_manager_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType systemd_manager_type_id;
	systemd_manager_type_id = g_type_register_static (G_TYPE_INTERFACE, "SystemdManager", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (systemd_manager_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (systemd_manager_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) systemd_manager_proxy_get_type);
	g_type_set_qdata (systemd_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.systemd1.Manager");
	g_type_set_qdata (systemd_manager_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_systemd_manager_dbus_interface_info));
	g_type_set_qdata (systemd_manager_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) systemd_manager_register_object);
	return systemd_manager_type_id;
}

GType
systemd_manager_get_type (void)
{
	static volatile gsize systemd_manager_type_id__once = 0;
	if (g_once_init_enter (&systemd_manager_type_id__once)) {
		GType systemd_manager_type_id;
		systemd_manager_type_id = systemd_manager_get_type_once ();
		g_once_init_leave (&systemd_manager_type_id__once, systemd_manager_type_id);
	}
	return systemd_manager_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (SystemdManagerProxy, systemd_manager_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_SYSTEMD_MANAGER, systemd_manager_proxy_systemd_manager_interface_init) )
static void
systemd_manager_proxy_class_init (SystemdManagerProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = systemd_manager_proxy_g_signal;
}

static void
systemd_manager_proxy_g_signal (GDBusProxy* proxy,
                                const gchar* sender_name,
                                const gchar* signal_name,
                                GVariant* parameters)
{
}

static void
systemd_manager_proxy_init (SystemdManagerProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_systemd_manager_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
systemd_manager_proxy_get_unit_file_state_async (SystemdManager* self,
                                                 const gchar* unit_file,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.systemd1.Manager", "GetUnitFileState");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (unit_file));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static gchar*
systemd_manager_proxy_get_unit_file_state_finish (SystemdManager* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	GVariant *_reply;
	GVariantIter _reply_iter;
	gchar* _result = NULL;
	GVariant* _tmp86_;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return NULL;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return NULL;
	}
	_reply = g_dbus_message_get_body (_reply_message);
	g_variant_iter_init (&_reply_iter, _reply);
	_tmp86_ = g_variant_iter_next_value (&_reply_iter);
	_result = g_variant_dup_string (_tmp86_, NULL);
	g_variant_unref (_tmp86_);
	g_object_unref (_reply_message);
	return _result;
}

static void
systemd_manager_proxy_enable_unit_files_async (SystemdManager* self,
                                               gchar** unit_files,
                                               gint unit_files_length1,
                                               gboolean runtime,
                                               gboolean replace,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp87_;
	GVariantBuilder _tmp88_;
	gint _tmp89_;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.systemd1.Manager", "EnableUnitFiles");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp87_ = unit_files;
	g_variant_builder_init (&_tmp88_, G_VARIANT_TYPE ("as"));
	for (_tmp89_ = 0; _tmp89_ < unit_files_length1; _tmp89_++) {
		g_variant_builder_add_value (&_tmp88_, g_variant_new_string (*_tmp87_));
		_tmp87_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp88_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (runtime));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (replace));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
systemd_manager_proxy_enable_unit_files_finish (SystemdManager* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
systemd_manager_proxy_start_unit_async (SystemdManager* self,
                                        const gchar* name,
                                        const gchar* mode,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.systemd1.Manager", "StartUnit");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (name));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (mode));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
systemd_manager_proxy_start_unit_finish (SystemdManager* self,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	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
systemd_manager_proxy_systemd_manager_interface_init (SystemdManagerIface* iface)
{
	iface->get_unit_file_state = systemd_manager_proxy_get_unit_file_state_async;
	iface->get_unit_file_state_finish = systemd_manager_proxy_get_unit_file_state_finish;
	iface->enable_unit_files = systemd_manager_proxy_enable_unit_files_async;
	iface->enable_unit_files_finish = systemd_manager_proxy_enable_unit_files_finish;
	iface->start_unit = systemd_manager_proxy_start_unit_async;
	iface->start_unit_finish = systemd_manager_proxy_start_unit_finish;
}

static void
_dbus_systemd_manager_get_unit_file_state (SystemdManager* self,
                                           GVariant* _parameters_,
                                           GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SystemdManagerGetUnitFileStateReadyData* _ready_data;
	GVariant* _tmp90_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (SystemdManagerGetUnitFileStateReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp90_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->unit_file = g_variant_dup_string (_tmp90_, NULL);
	g_variant_unref (_tmp90_);
	systemd_manager_get_unit_file_state (self, _ready_data->unit_file, (GAsyncReadyCallback) _dbus_systemd_manager_get_unit_file_state_ready, _ready_data);
	_error:
	;
}

static void
_dbus_systemd_manager_get_unit_file_state_ready (GObject * source_object,
                                                 GAsyncResult * _res_,
                                                 gpointer _user_data_)
{
	SystemdManagerGetUnitFileStateReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	gchar* result;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	result = systemd_manager_get_unit_file_state_finish ((SystemdManager*) source_object, _res_, &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_string (result));
	_g_free0 (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 (_ready_data->unit_file);
	g_slice_free (SystemdManagerGetUnitFileStateReadyData, _ready_data);
}

static void
_dbus_systemd_manager_enable_unit_files (SystemdManager* self,
                                         GVariant* _parameters_,
                                         GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SystemdManagerEnableUnitFilesReadyData* _ready_data;
	GVariant* _tmp91_;
	gchar** _tmp92_;
	gint _tmp92__length;
	gint _tmp92__size;
	gint _tmp92__length1;
	GVariantIter _tmp93_;
	GVariant* _tmp94_;
	GVariant* _tmp95_;
	GVariant* _tmp96_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (SystemdManagerEnableUnitFilesReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp91_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp92_ = g_new (gchar*, 5);
	_tmp92__length = 0;
	_tmp92__size = 4;
	_tmp92__length1 = 0;
	g_variant_iter_init (&_tmp93_, _tmp91_);
	for (; (_tmp94_ = g_variant_iter_next_value (&_tmp93_)) != NULL; _tmp92__length1++) {
		if (_tmp92__size == _tmp92__length) {
			_tmp92__size = 2 * _tmp92__size;
			_tmp92_ = g_renew (gchar*, _tmp92_, _tmp92__size + 1);
		}
		_tmp92_[_tmp92__length++] = g_variant_dup_string (_tmp94_, NULL);
		g_variant_unref (_tmp94_);
	}
	_ready_data->unit_files_length1 = _tmp92__length1;
	_tmp92_[_tmp92__length] = NULL;
	_ready_data->unit_files = _tmp92_;
	g_variant_unref (_tmp91_);
	_tmp95_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->runtime = g_variant_get_boolean (_tmp95_);
	g_variant_unref (_tmp95_);
	_tmp96_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->replace = g_variant_get_boolean (_tmp96_);
	g_variant_unref (_tmp96_);
	systemd_manager_enable_unit_files (self, _ready_data->unit_files, _ready_data->unit_files_length1, _ready_data->runtime, _ready_data->replace, (GAsyncReadyCallback) _dbus_systemd_manager_enable_unit_files_ready, _ready_data);
	_error:
	;
}

static void
_dbus_systemd_manager_enable_unit_files_ready (GObject * source_object,
                                               GAsyncResult * _res_,
                                               gpointer _user_data_)
{
	SystemdManagerEnableUnitFilesReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	systemd_manager_enable_unit_files_finish ((SystemdManager*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_ready_data->unit_files = (_vala_array_free (_ready_data->unit_files, _ready_data->unit_files_length1, (GDestroyNotify) g_free), NULL);
	g_slice_free (SystemdManagerEnableUnitFilesReadyData, _ready_data);
}

static void
_dbus_systemd_manager_start_unit (SystemdManager* self,
                                  GVariant* _parameters_,
                                  GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	SystemdManagerStartUnitReadyData* _ready_data;
	GVariant* _tmp97_;
	GVariant* _tmp98_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (SystemdManagerStartUnitReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp97_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->name = g_variant_dup_string (_tmp97_, NULL);
	g_variant_unref (_tmp97_);
	_tmp98_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->mode = g_variant_dup_string (_tmp98_, NULL);
	g_variant_unref (_tmp98_);
	systemd_manager_start_unit (self, _ready_data->name, _ready_data->mode, (GAsyncReadyCallback) _dbus_systemd_manager_start_unit_ready, _ready_data);
	_error:
	;
}

static void
_dbus_systemd_manager_start_unit_ready (GObject * source_object,
                                        GAsyncResult * _res_,
                                        gpointer _user_data_)
{
	SystemdManagerStartUnitReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	systemd_manager_start_unit_finish ((SystemdManager*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_g_free0 (_ready_data->name);
	_g_free0 (_ready_data->mode);
	g_slice_free (SystemdManagerStartUnitReadyData, _ready_data);
}

static void
systemd_manager_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, "GetUnitFileState") == 0) {
		_dbus_systemd_manager_get_unit_file_state (object, parameters, invocation);
	} else if (strcmp (method_name, "EnableUnitFiles") == 0) {
		_dbus_systemd_manager_enable_unit_files (object, parameters, invocation);
	} else if (strcmp (method_name, "StartUnit") == 0) {
		_dbus_systemd_manager_start_unit (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
systemd_manager_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)
{
	return NULL;
}

static gboolean
systemd_manager_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)
{
	return FALSE;
}

guint
systemd_manager_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 *) (&_systemd_manager_dbus_interface_info), &_systemd_manager_dbus_interface_vtable, data, _systemd_manager_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_systemd_manager_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
settings_daemon_backends_housekeeping_get_instance_private (SettingsDaemonBackendsHousekeeping* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsDaemonBackendsHousekeeping_private_offset);
}

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

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

static void
settings_daemon_backends_housekeeping_enable_systemd_tmpfiles (SettingsDaemonBackendsHousekeeping* self,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData* _data_;
	SettingsDaemonBackendsHousekeeping* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_co (_data_);
}

static void
settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_finish (SettingsDaemonBackendsHousekeeping* self,
                                                                      GAsyncResult* _res_)
{
	SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_)
{
	SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_co (_data_);
}

static gboolean
settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_co (SettingsDaemonBackendsHousekeepingEnableSystemdTmpfilesData* _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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->systemd;
	if (_data_->_tmp0_ == NULL) {
		{
			_data_->_state_ = 1;
			g_async_initable_new_async (TYPE_SYSTEMD_MANAGER_PROXY, 0, NULL, settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready, _data_, "g-flags", 0, "g-name", "org.freedesktop.systemd1", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/freedesktop/systemd1", "g-interface-name", "org.freedesktop.systemd1.Manager", NULL);
			return FALSE;
			_state_1:
			_data_->_tmp2_ = (SystemdManager*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
			_data_->_tmp1_ = (SystemdManager*) _data_->_tmp2_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp3_ = _data_->_tmp1_;
			_data_->_tmp1_ = NULL;
			_g_object_unref0 (_data_->self->priv->systemd);
			_data_->self->priv->systemd = _data_->_tmp3_;
			_g_object_unref0 (_data_->_tmp1_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp4_ = _data_->e;
			_data_->_tmp5_ = _data_->_tmp4_->message;
			g_warning ("Housekeeping.vala:62: Unable to connect to systemd to see if systemd-t" \
"mpfiles service is enabled: %s", _data_->_tmp5_);
			_g_error_free0 (_data_->e);
			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_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_->_tmp7_ = _data_->self->priv->systemd;
		_data_->_state_ = 2;
		systemd_manager_get_unit_file_state (_data_->_tmp7_, "systemd-tmpfiles-clean.timer", settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp8_ = systemd_manager_get_unit_file_state_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp6_ = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		if (g_strcmp0 (_data_->_tmp6_, "enabled") == 0) {
			_g_free0 (_data_->_tmp6_);
			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;
		}
		_data_->_tmp9_ = _data_->self->priv->systemd;
		_data_->_tmp10_ = g_strdup ("systemd-tmpfiles-clean.timer");
		_data_->_tmp11_ = g_new0 (gchar*, 1 + 1);
		_data_->_tmp11_[0] = _data_->_tmp10_;
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp12__length1 = 1;
		_data_->_state_ = 3;
		systemd_manager_enable_unit_files (_data_->_tmp9_, _data_->_tmp12_, (gint) 1, FALSE, FALSE, settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready, _data_);
		return FALSE;
		_state_3:
		systemd_manager_enable_unit_files_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp12_ = (_vala_array_free (_data_->_tmp12_, _data_->_tmp12__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->_tmp6_);
			goto __catch1_g_error;
		}
		_data_->_tmp13_ = _data_->self->priv->systemd;
		_data_->_state_ = 4;
		systemd_manager_start_unit (_data_->_tmp13_, "systemd-tmpfiles-clean.timer", "fail", settings_daemon_backends_housekeeping_enable_systemd_tmpfiles_ready, _data_);
		return FALSE;
		_state_4:
		systemd_manager_start_unit_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->_tmp6_);
			goto __catch1_g_error;
		}
		_g_free0 (_data_->_tmp6_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp14_ = _data_->_vala1_e;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		g_warning ("Housekeeping.vala:76: Error getting or setting systemd-tmpfiles enable" \
"d state: %s", _data_->_tmp15_);
		_g_error_free0 (_data_->_vala1_e);
	}
	__finally1:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		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_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_backends_housekeeping_write_systemd_tmpfiles_config_data_free (gpointer _data)
{
	SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData, _data_);
}

static void
settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config (SettingsDaemonBackendsHousekeeping* self,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_)
{
	SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_;
	SettingsDaemonBackendsHousekeeping* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_co (_data_);
}

static void
settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_finish (SettingsDaemonBackendsHousekeeping* self,
                                                                            GAsyncResult* _res_)
{
	SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_ready (GObject* source_object,
                                                                           GAsyncResult* _res_,
                                                                           gpointer _user_data_)
{
	SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_co (_data_);
}

static gboolean
settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_co (SettingsDaemonBackendsHousekeepingWriteSystemdTmpfilesConfigData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_get_user_config_dir ();
	_data_->_tmp1_ = g_build_filename (_data_->_tmp0_, "user-tmpfiles.d", "io.elementary.settings-daemon.downloads-folder.conf", NULL);
	_data_->config_path = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->self->priv->housekeeping_settings;
	_data_->_tmp3_ = settings_daemon_backends_housekeeping_cleanup_config_new (_data_->_tmp2_);
	_data_->cleanup_config = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->config_path;
	_data_->_tmp5_ = g_file_new_for_path (_data_->_tmp4_);
	_data_->config_file = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->config_file;
	_data_->_tmp7_ = g_file_get_parent (_data_->_tmp6_);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = !g_file_query_exists (_data_->_tmp8_, NULL);
	_g_object_unref0 (_data_->_tmp8_);
	if (_data_->_tmp9_) {
		_data_->_tmp10_ = _data_->cleanup_config;
		_data_->_tmp11_ = settings_daemon_backends_housekeeping_cleanup_config_get_is_disabled (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		if (_data_->_tmp12_) {
			_g_object_unref0 (_data_->config_file);
			_g_object_unref0 (_data_->cleanup_config);
			_g_free0 (_data_->config_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;
		}
		{
			_data_->_tmp13_ = _data_->config_file;
			_data_->_tmp14_ = g_file_get_parent (_data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			g_file_make_directory_with_parents (_data_->_tmp15_, NULL, &_data_->_inner_error0_);
			_g_object_unref0 (_data_->_tmp15_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			_data_->e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp16_ = _data_->e;
			_data_->_tmp17_ = _data_->_tmp16_->message;
			g_warning ("Housekeeping.vala:101: Error creating directory for systemd-tmpfiles: " \
"%s", _data_->_tmp17_);
			_g_error_free0 (_data_->e);
			_g_object_unref0 (_data_->config_file);
			_g_object_unref0 (_data_->cleanup_config);
			_g_free0 (_data_->config_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_object_unref0 (_data_->config_file);
			_g_object_unref0 (_data_->cleanup_config);
			_g_free0 (_data_->config_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_->_tmp18_ = _data_->cleanup_config;
	_data_->_tmp19_ = settings_daemon_backends_housekeeping_cleanup_config_get_is_disabled (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	if (_data_->_tmp20_) {
		{
			_data_->_tmp21_ = _data_->config_file;
			_data_->_state_ = 1;
			g_file_delete_async (_data_->_tmp21_, G_PRIORITY_DEFAULT, NULL, settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_ready, _data_);
			return FALSE;
			_state_1:
			g_file_delete_finish (_data_->_tmp21_, _data_->_res_, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			_data_->_vala1_e = _data_->_inner_error0_;
			_data_->_inner_error0_ = NULL;
			_data_->_tmp22_ = _data_->_vala1_e;
			if (!g_error_matches (_data_->_tmp22_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				_data_->_tmp23_ = _data_->_vala1_e;
				_data_->_tmp24_ = _data_->_tmp23_->message;
				g_warning ("Housekeeping.vala:112: Unable to delete systemd-tmpfiles config: %s", _data_->_tmp24_);
			}
			_g_error_free0 (_data_->_vala1_e);
		}
		__finally1:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->config_file);
			_g_object_unref0 (_data_->cleanup_config);
			_g_free0 (_data_->config_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_object_unref0 (_data_->config_file);
		_g_object_unref0 (_data_->cleanup_config);
		_g_free0 (_data_->config_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;
	}
	{
		_data_->_tmp26_ = _data_->config_file;
		_data_->_state_ = 2;
		g_file_replace_readwrite_async (_data_->_tmp26_, NULL, FALSE, G_FILE_CREATE_NONE, G_PRIORITY_DEFAULT, NULL, settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp27_ = g_file_replace_readwrite_finish (_data_->_tmp26_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp25_ = _data_->_tmp27_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch2_g_error;
		}
		_data_->_tmp28_ = _data_->_tmp25_;
		_data_->_tmp25_ = NULL;
		_g_object_unref0 (_data_->config_stream);
		_data_->config_stream = _data_->_tmp28_;
		_g_object_unref0 (_data_->_tmp25_);
	}
	goto __finally2;
	__catch2_g_error:
	{
		_data_->_vala2_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp29_ = _data_->_vala2_e;
		_data_->_tmp30_ = _data_->_tmp29_->message;
		g_warning ("Housekeeping.vala:123: Unable to open systemd-tmpfiles config file for" \
" writing: %s", _data_->_tmp30_);
		_g_error_free0 (_data_->_vala2_e);
		_g_object_unref0 (_data_->config_stream);
		_g_object_unref0 (_data_->config_file);
		_g_object_unref0 (_data_->cleanup_config);
		_g_free0 (_data_->config_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;
	}
	__finally2:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->config_stream);
		_g_object_unref0 (_data_->config_file);
		_g_object_unref0 (_data_->cleanup_config);
		_g_free0 (_data_->config_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_->_tmp31_ = _data_->config_stream;
	_data_->_tmp32_ = g_io_stream_get_output_stream ((GIOStream*) _data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp33_, g_file_output_stream_get_type ()) ? ((GFileOutputStream*) _data_->_tmp33_) : NULL);
	_data_->os = _data_->_tmp34_;
	{
		_data_->_tmp35_ = _data_->os;
		_data_->_tmp36_ = _data_->cleanup_config;
		_data_->_tmp37_ = 0;
		_data_->_tmp38_ = settings_daemon_backends_housekeeping_cleanup_config_data (_data_->_tmp36_, &_data_->_tmp37_);
		_data_->_tmp39_ = _data_->_tmp38_;
		_data_->_tmp39__length1 = _data_->_tmp37_;
		_data_->_state_ = 3;
		g_output_stream_write_all_async ((GOutputStream*) _data_->_tmp35_, _data_->_tmp39_, (gsize) _data_->_tmp37_, G_PRIORITY_DEFAULT, NULL, settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config_ready, _data_);
		return FALSE;
		_state_3:
		g_output_stream_write_all_finish ((GOutputStream*) _data_->_tmp35_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp39_ = (g_free (_data_->_tmp39_), NULL);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
		_data_->_vala3_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp40_ = _data_->_vala3_e;
		_data_->_tmp41_ = _data_->_tmp40_->message;
		g_warning ("Housekeeping.vala:131: Unable to write systemd-tmpfiles config: %s", _data_->_tmp41_);
		_g_error_free0 (_data_->_vala3_e);
	}
	__finally3:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->os);
		_g_object_unref0 (_data_->config_stream);
		_g_object_unref0 (_data_->config_file);
		_g_object_unref0 (_data_->cleanup_config);
		_g_free0 (_data_->config_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_object_unref0 (_data_->os);
	_g_object_unref0 (_data_->config_stream);
	_g_object_unref0 (_data_->config_file);
	_g_object_unref0 (_data_->cleanup_config);
	_g_free0 (_data_->config_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;
}

SettingsDaemonBackendsHousekeeping*
settings_daemon_backends_housekeeping_construct (GType object_type)
{
	SettingsDaemonBackendsHousekeeping * self = NULL;
	self = (SettingsDaemonBackendsHousekeeping*) g_object_new (object_type, NULL);
	return self;
}

SettingsDaemonBackendsHousekeeping*
settings_daemon_backends_housekeeping_new (void)
{
	return settings_daemon_backends_housekeeping_construct (SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING);
}

static inline gpointer
settings_daemon_backends_housekeeping_cleanup_config_get_instance_private (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	return G_STRUCT_MEMBER_P (self, SettingsDaemonBackendsHousekeepingCleanupConfig_private_offset);
}

static SettingsDaemonBackendsHousekeepingCleanupConfig*
settings_daemon_backends_housekeeping_cleanup_config_construct (GType object_type,
                                                                GSettings* settings)
{
	SettingsDaemonBackendsHousekeepingCleanupConfig * self = NULL;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (settings != NULL, NULL);
	if (g_settings_get_boolean (settings, "cleanup-downloads-folder")) {
		_tmp0_ = settings_daemon_backends_housekeeping_cleanup_config_downloads_are_not_home ();
	} else {
		_tmp0_ = FALSE;
	}
	self = (SettingsDaemonBackendsHousekeepingCleanupConfig*) g_object_new (object_type, "clean-downloads", _tmp0_, "clean-screenshots", g_settings_get_boolean (settings, "cleanup-screenshots-folder"), "clean-temp", g_settings_get_boolean (settings, "cleanup-temp-folder"), "clean-trash", g_settings_get_boolean (settings, "cleanup-trash-folder"), "clean-after-days", g_settings_get_int (settings, "old-files-age"), NULL);
	return self;
}

static SettingsDaemonBackendsHousekeepingCleanupConfig*
settings_daemon_backends_housekeeping_cleanup_config_new (GSettings* settings)
{
	return settings_daemon_backends_housekeeping_cleanup_config_construct (SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, settings);
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_downloads_are_not_home (void)
{
	gchar* home_dir = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GFile* home = NULL;
	GFile* _tmp2_;
	gchar* downloads_dir = NULL;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GFile* downloads = NULL;
	GFile* _tmp5_;
	gboolean result;
	_tmp0_ = g_get_home_dir ();
	_tmp1_ = g_strdup (_tmp0_);
	home_dir = _tmp1_;
	_tmp2_ = g_file_new_for_path (home_dir);
	home = _tmp2_;
	_tmp3_ = g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD);
	_tmp4_ = g_strdup (_tmp3_);
	downloads_dir = _tmp4_;
	_tmp5_ = g_file_new_for_path (downloads_dir);
	downloads = _tmp5_;
	result = !g_file_equal (home, downloads);
	_g_object_unref0 (downloads);
	_g_free0 (downloads_dir);
	_g_object_unref0 (home);
	_g_free0 (home_dir);
	return result;
}

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

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

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

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

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

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

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

static guint8*
_vala_array_dup4 (guint8* self,
                  gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

static guint8*
settings_daemon_backends_housekeeping_cleanup_config_data (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                           gint* result_length1)
{
	gchar* template = NULL;
	gchar* _tmp0_;
	gchar** lines = NULL;
	gchar** _tmp1_;
	gint lines_length1;
	gint _lines_size_;
	gboolean _tmp2_;
	gboolean _tmp9_;
	gboolean _tmp18_;
	gboolean _tmp25_;
	gchar** _tmp40_;
	gint _tmp40__length1;
	gchar* _tmp41_;
	gchar* _tmp42_;
	guint8* _tmp43_;
	gint _tmp43__length1;
	gint _tmp44_ = 0;
	guint8* _tmp45_;
	gint _tmp45__length1;
	guint8* _tmp46_;
	gint _tmp46__length1;
	guint8* _tmp47_;
	gint _tmp47__length1;
	guint8* _tmp48_;
	gint _tmp48__length1;
	guint8* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("e \"%s\" - - - %dd");
	template = _tmp0_;
	_tmp1_ = g_new0 (gchar*, 0 + 1);
	lines = _tmp1_;
	lines_length1 = 0;
	_lines_size_ = lines_length1;
	_tmp2_ = self->priv->_clean_downloads;
	if (_tmp2_) {
		gchar* downloads_dir = NULL;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gint _tmp7_;
		gchar* _tmp8_;
		_tmp3_ = g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD);
		_tmp4_ = g_strdup (_tmp3_);
		downloads_dir = _tmp4_;
		_tmp5_ = template;
		_tmp6_ = downloads_dir;
		_tmp7_ = self->priv->_clean_after_days;
		_tmp8_ = g_strdup_printf (_tmp5_, _tmp6_, _tmp7_);
		_vala_array_add3 (&lines, &lines_length1, &_lines_size_, _tmp8_);
		_g_free0 (downloads_dir);
	}
	_tmp9_ = self->priv->_clean_screenshots;
	if (_tmp9_) {
		gchar* pictures_dir = NULL;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* screenshots_dir = NULL;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gint _tmp16_;
		gchar* _tmp17_;
		_tmp10_ = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
		_tmp11_ = g_strdup (_tmp10_);
		pictures_dir = _tmp11_;
		_tmp12_ = pictures_dir;
		_tmp13_ = g_build_filename (_tmp12_, g_dgettext ("gala", "Screenshots"), NULL);
		screenshots_dir = _tmp13_;
		_tmp14_ = template;
		_tmp15_ = screenshots_dir;
		_tmp16_ = self->priv->_clean_after_days;
		_tmp17_ = g_strdup_printf (_tmp14_, _tmp15_, _tmp16_);
		_vala_array_add4 (&lines, &lines_length1, &_lines_size_, _tmp17_);
		_g_free0 (screenshots_dir);
		_g_free0 (pictures_dir);
	}
	_tmp18_ = self->priv->_clean_temp;
	if (_tmp18_) {
		gchar* temp_dir = NULL;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		gint _tmp23_;
		gchar* _tmp24_;
		_tmp19_ = g_get_tmp_dir ();
		_tmp20_ = g_strdup (_tmp19_);
		temp_dir = _tmp20_;
		_tmp21_ = template;
		_tmp22_ = temp_dir;
		_tmp23_ = self->priv->_clean_after_days;
		_tmp24_ = g_strdup_printf (_tmp21_, _tmp22_, _tmp23_);
		_vala_array_add5 (&lines, &lines_length1, &_lines_size_, _tmp24_);
		_g_free0 (temp_dir);
	}
	_tmp25_ = self->priv->_clean_trash;
	if (_tmp25_) {
		gchar* user_data_dir = NULL;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		gchar* trash_files_dir = NULL;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* trash_info_dir = NULL;
		const gchar* _tmp30_;
		gchar* _tmp31_;
		const gchar* _tmp32_;
		const gchar* _tmp33_;
		gint _tmp34_;
		gchar* _tmp35_;
		const gchar* _tmp36_;
		const gchar* _tmp37_;
		gint _tmp38_;
		gchar* _tmp39_;
		_tmp26_ = g_get_user_data_dir ();
		_tmp27_ = g_strdup (_tmp26_);
		user_data_dir = _tmp27_;
		_tmp28_ = user_data_dir;
		_tmp29_ = g_build_filename (_tmp28_, "Trash", "files", NULL);
		trash_files_dir = _tmp29_;
		_tmp30_ = user_data_dir;
		_tmp31_ = g_build_filename (_tmp30_, "Trash", "info", NULL);
		trash_info_dir = _tmp31_;
		_tmp32_ = template;
		_tmp33_ = trash_files_dir;
		_tmp34_ = self->priv->_clean_after_days;
		_tmp35_ = g_strdup_printf (_tmp32_, _tmp33_, _tmp34_);
		_vala_array_add6 (&lines, &lines_length1, &_lines_size_, _tmp35_);
		_tmp36_ = template;
		_tmp37_ = trash_info_dir;
		_tmp38_ = self->priv->_clean_after_days;
		_tmp39_ = g_strdup_printf (_tmp36_, _tmp37_, _tmp38_);
		_vala_array_add7 (&lines, &lines_length1, &_lines_size_, _tmp39_);
		_g_free0 (trash_info_dir);
		_g_free0 (trash_files_dir);
		_g_free0 (user_data_dir);
	}
	_tmp40_ = lines;
	_tmp40__length1 = lines_length1;
	_tmp41_ = _vala_g_strjoinv ("\n", _tmp40_, (gint) _tmp40__length1);
	_tmp42_ = _tmp41_;
	_tmp43_ = string_get_data (_tmp42_, &_tmp44_);
	_tmp43__length1 = _tmp44_;
	_tmp45_ = _tmp43_;
	_tmp45__length1 = _tmp43__length1;
	_tmp46_ = (_tmp45_ != NULL) ? _vala_array_dup4 (_tmp45_, _tmp45__length1) : _tmp45_;
	_tmp46__length1 = _tmp45__length1;
	_tmp47_ = _tmp46_;
	_tmp47__length1 = _tmp46__length1;
	_g_free0 (_tmp42_);
	_tmp48_ = _tmp47_;
	_tmp48__length1 = _tmp47__length1;
	if (result_length1) {
		*result_length1 = _tmp48__length1;
	}
	result = _tmp48_;
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (template);
	return result;
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_get_clean_downloads (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clean_downloads;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_set_clean_downloads (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_housekeeping_cleanup_config_get_clean_downloads (self);
	if (old_value != value) {
		self->priv->_clean_downloads = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY]);
	}
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_get_clean_screenshots (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clean_screenshots;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_set_clean_screenshots (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_housekeeping_cleanup_config_get_clean_screenshots (self);
	if (old_value != value) {
		self->priv->_clean_screenshots = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY]);
	}
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_get_clean_temp (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clean_temp;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_set_clean_temp (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                     gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_housekeeping_cleanup_config_get_clean_temp (self);
	if (old_value != value) {
		self->priv->_clean_temp = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY]);
	}
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_get_clean_trash (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_clean_trash;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_set_clean_trash (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_housekeeping_cleanup_config_get_clean_trash (self);
	if (old_value != value) {
		self->priv->_clean_trash = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY]);
	}
}

static gint
settings_daemon_backends_housekeeping_cleanup_config_get_clean_after_days (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_clean_after_days;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_set_clean_after_days (SettingsDaemonBackendsHousekeepingCleanupConfig* self,
                                                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = settings_daemon_backends_housekeeping_cleanup_config_get_clean_after_days (self);
	if (old_value != value) {
		self->priv->_clean_after_days = value;
		g_object_notify_by_pspec ((GObject *) self, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY]);
	}
}

static gboolean
settings_daemon_backends_housekeeping_cleanup_config_get_is_disabled (SettingsDaemonBackendsHousekeepingCleanupConfig* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp4_ = self->priv->_clean_downloads;
	if (!_tmp4_) {
		gboolean _tmp5_;
		_tmp5_ = self->priv->_clean_screenshots;
		_tmp3_ = !_tmp5_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_clean_temp;
		_tmp2_ = !_tmp6_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		gboolean _tmp7_;
		_tmp7_ = self->priv->_clean_trash;
		_tmp1_ = !_tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gint _tmp8_;
		_tmp8_ = self->priv->_clean_after_days;
		_tmp0_ = _tmp8_ < 1;
	}
	result = _tmp0_;
	return result;
}

static void
settings_daemon_backends_housekeeping_cleanup_config_class_init (SettingsDaemonBackendsHousekeepingCleanupConfigClass * klass,
                                                                 gpointer klass_data)
{
	settings_daemon_backends_housekeeping_cleanup_config_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsDaemonBackendsHousekeepingCleanupConfig_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_settings_daemon_backends_housekeeping_cleanup_config_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_settings_daemon_backends_housekeeping_cleanup_config_set_property;
	G_OBJECT_CLASS (klass)->finalize = settings_daemon_backends_housekeeping_cleanup_config_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY] = g_param_spec_boolean ("clean-downloads", "clean-downloads", "clean-downloads", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY] = g_param_spec_boolean ("clean-screenshots", "clean-screenshots", "clean-screenshots", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY] = g_param_spec_boolean ("clean-temp", "clean-temp", "clean-temp", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY] = g_param_spec_boolean ("clean-trash", "clean-trash", "clean-trash", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY] = g_param_spec_int ("clean-after-days", "clean-after-days", "clean-after-days", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_IS_DISABLED_PROPERTY, settings_daemon_backends_housekeeping_cleanup_config_properties[SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_IS_DISABLED_PROPERTY] = g_param_spec_boolean ("is-disabled", "is-disabled", "is-disabled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
settings_daemon_backends_housekeeping_cleanup_config_instance_init (SettingsDaemonBackendsHousekeepingCleanupConfig * self,
                                                                    gpointer klass)
{
	self->priv = settings_daemon_backends_housekeeping_cleanup_config_get_instance_private (self);
}

static void
settings_daemon_backends_housekeeping_cleanup_config_finalize (GObject * obj)
{
	SettingsDaemonBackendsHousekeepingCleanupConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfig);
	G_OBJECT_CLASS (settings_daemon_backends_housekeeping_cleanup_config_parent_class)->finalize (obj);
}

static GType
settings_daemon_backends_housekeeping_cleanup_config_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsDaemonBackendsHousekeepingCleanupConfigClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_daemon_backends_housekeeping_cleanup_config_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDaemonBackendsHousekeepingCleanupConfig), 0, (GInstanceInitFunc) settings_daemon_backends_housekeeping_cleanup_config_instance_init, NULL };
	GType settings_daemon_backends_housekeeping_cleanup_config_type_id;
	settings_daemon_backends_housekeeping_cleanup_config_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsDaemonBackendsHousekeepingCleanupConfig", &g_define_type_info, 0);
	SettingsDaemonBackendsHousekeepingCleanupConfig_private_offset = g_type_add_instance_private (settings_daemon_backends_housekeeping_cleanup_config_type_id, sizeof (SettingsDaemonBackendsHousekeepingCleanupConfigPrivate));
	return settings_daemon_backends_housekeeping_cleanup_config_type_id;
}

static GType
settings_daemon_backends_housekeeping_cleanup_config_get_type (void)
{
	static volatile gsize settings_daemon_backends_housekeeping_cleanup_config_type_id__once = 0;
	if (g_once_init_enter (&settings_daemon_backends_housekeeping_cleanup_config_type_id__once)) {
		GType settings_daemon_backends_housekeeping_cleanup_config_type_id;
		settings_daemon_backends_housekeeping_cleanup_config_type_id = settings_daemon_backends_housekeeping_cleanup_config_get_type_once ();
		g_once_init_leave (&settings_daemon_backends_housekeeping_cleanup_config_type_id__once, settings_daemon_backends_housekeeping_cleanup_config_type_id);
	}
	return settings_daemon_backends_housekeeping_cleanup_config_type_id__once;
}

static void
_vala_settings_daemon_backends_housekeeping_cleanup_config_get_property (GObject * object,
                                                                         guint property_id,
                                                                         GValue * value,
                                                                         GParamSpec * pspec)
{
	SettingsDaemonBackendsHousekeepingCleanupConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfig);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY:
		g_value_set_boolean (value, settings_daemon_backends_housekeeping_cleanup_config_get_clean_downloads (self));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY:
		g_value_set_boolean (value, settings_daemon_backends_housekeeping_cleanup_config_get_clean_screenshots (self));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY:
		g_value_set_boolean (value, settings_daemon_backends_housekeeping_cleanup_config_get_clean_temp (self));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY:
		g_value_set_boolean (value, settings_daemon_backends_housekeeping_cleanup_config_get_clean_trash (self));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY:
		g_value_set_int (value, settings_daemon_backends_housekeeping_cleanup_config_get_clean_after_days (self));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_IS_DISABLED_PROPERTY:
		g_value_set_boolean (value, settings_daemon_backends_housekeeping_cleanup_config_get_is_disabled (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_settings_daemon_backends_housekeeping_cleanup_config_set_property (GObject * object,
                                                                         guint property_id,
                                                                         const GValue * value,
                                                                         GParamSpec * pspec)
{
	SettingsDaemonBackendsHousekeepingCleanupConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_TYPE_CLEANUP_CONFIG, SettingsDaemonBackendsHousekeepingCleanupConfig);
	switch (property_id) {
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_DOWNLOADS_PROPERTY:
		settings_daemon_backends_housekeeping_cleanup_config_set_clean_downloads (self, g_value_get_boolean (value));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_SCREENSHOTS_PROPERTY:
		settings_daemon_backends_housekeeping_cleanup_config_set_clean_screenshots (self, g_value_get_boolean (value));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TEMP_PROPERTY:
		settings_daemon_backends_housekeeping_cleanup_config_set_clean_temp (self, g_value_get_boolean (value));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_TRASH_PROPERTY:
		settings_daemon_backends_housekeeping_cleanup_config_set_clean_trash (self, g_value_get_boolean (value));
		break;
		case SETTINGS_DAEMON_BACKENDS_HOUSEKEEPING_CLEANUP_CONFIG_CLEAN_AFTER_DAYS_PROPERTY:
		settings_daemon_backends_housekeeping_cleanup_config_set_clean_after_days (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_settings_daemon_backends_housekeeping___lambda13_ (SettingsDaemonBackendsHousekeeping* self)
{
	settings_daemon_backends_housekeeping_enable_systemd_tmpfiles (self, NULL, NULL);
	settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config (self, NULL, NULL);
}

static void
__settings_daemon_backends_housekeeping___lambda13__g_settings_changed (GSettings* _sender,
                                                                        const gchar* key,
                                                                        gpointer self)
{
	_settings_daemon_backends_housekeeping___lambda13_ ((SettingsDaemonBackendsHousekeeping*) self);
}

static GObject *
settings_daemon_backends_housekeeping_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SettingsDaemonBackendsHousekeeping * self;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	GSettings* _tmp5_;
	parent_class = G_OBJECT_CLASS (settings_daemon_backends_housekeeping_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING, SettingsDaemonBackendsHousekeeping);
	_tmp0_ = g_settings_new ("io.elementary.settings-daemon.housekeeping");
	_g_object_unref0 (self->priv->housekeeping_settings);
	self->priv->housekeeping_settings = _tmp0_;
	_tmp1_ = self->priv->housekeeping_settings;
	g_signal_connect_object (_tmp1_, "changed", (GCallback) __settings_daemon_backends_housekeeping___lambda13__g_settings_changed, self, 0);
	_tmp5_ = self->priv->housekeeping_settings;
	if (g_settings_get_boolean (_tmp5_, "cleanup-downloads-folder")) {
		_tmp4_ = TRUE;
	} else {
		GSettings* _tmp6_;
		_tmp6_ = self->priv->housekeeping_settings;
		_tmp4_ = g_settings_get_boolean (_tmp6_, "cleanup-screenshots-folder");
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		GSettings* _tmp7_;
		_tmp7_ = self->priv->housekeeping_settings;
		_tmp3_ = g_settings_get_boolean (_tmp7_, "cleanup-temp-folder");
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		GSettings* _tmp8_;
		_tmp8_ = self->priv->housekeeping_settings;
		_tmp2_ = g_settings_get_boolean (_tmp8_, "cleanup-trash-folder");
	}
	if (_tmp2_) {
		settings_daemon_backends_housekeeping_enable_systemd_tmpfiles (self, NULL, NULL);
	}
	settings_daemon_backends_housekeeping_write_systemd_tmpfiles_config (self, NULL, NULL);
	return obj;
}

static void
settings_daemon_backends_housekeeping_class_init (SettingsDaemonBackendsHousekeepingClass * klass,
                                                  gpointer klass_data)
{
	settings_daemon_backends_housekeeping_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SettingsDaemonBackendsHousekeeping_private_offset);
	G_OBJECT_CLASS (klass)->constructor = settings_daemon_backends_housekeeping_constructor;
	G_OBJECT_CLASS (klass)->finalize = settings_daemon_backends_housekeeping_finalize;
}

static void
settings_daemon_backends_housekeeping_instance_init (SettingsDaemonBackendsHousekeeping * self,
                                                     gpointer klass)
{
	self->priv = settings_daemon_backends_housekeeping_get_instance_private (self);
}

static void
settings_daemon_backends_housekeeping_finalize (GObject * obj)
{
	SettingsDaemonBackendsHousekeeping * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SETTINGS_DAEMON_BACKENDS_TYPE_HOUSEKEEPING, SettingsDaemonBackendsHousekeeping);
	_g_object_unref0 (self->priv->housekeeping_settings);
	_g_object_unref0 (self->priv->systemd);
	G_OBJECT_CLASS (settings_daemon_backends_housekeeping_parent_class)->finalize (obj);
}

static GType
settings_daemon_backends_housekeeping_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SettingsDaemonBackendsHousekeepingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) settings_daemon_backends_housekeeping_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SettingsDaemonBackendsHousekeeping), 0, (GInstanceInitFunc) settings_daemon_backends_housekeeping_instance_init, NULL };
	GType settings_daemon_backends_housekeeping_type_id;
	settings_daemon_backends_housekeeping_type_id = g_type_register_static (G_TYPE_OBJECT, "SettingsDaemonBackendsHousekeeping", &g_define_type_info, 0);
	SettingsDaemonBackendsHousekeeping_private_offset = g_type_add_instance_private (settings_daemon_backends_housekeeping_type_id, sizeof (SettingsDaemonBackendsHousekeepingPrivate));
	return settings_daemon_backends_housekeeping_type_id;
}

GType
settings_daemon_backends_housekeeping_get_type (void)
{
	static volatile gsize settings_daemon_backends_housekeeping_type_id__once = 0;
	if (g_once_init_enter (&settings_daemon_backends_housekeeping_type_id__once)) {
		GType settings_daemon_backends_housekeeping_type_id;
		settings_daemon_backends_housekeeping_type_id = settings_daemon_backends_housekeeping_get_type_once ();
		g_once_init_leave (&settings_daemon_backends_housekeeping_type_id__once, settings_daemon_backends_housekeeping_type_id);
	}
	return settings_daemon_backends_housekeeping_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);
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

