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

/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: 2011 Canonical Ltd
 *                         2025 elementary, Inc. (https://elementary.io)
 */

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

#define CONSTANTS_GSD_DIR "/usr/lib/"
#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 GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON (greeter_session_manager_settings_daemon_get_type ())
#define GREETER_SESSION_MANAGER_SETTINGS_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON, GreeterSessionManagerSettingsDaemon))
#define GREETER_SESSION_MANAGER_SETTINGS_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON, GreeterSessionManagerSettingsDaemonClass))
#define GREETER_SESSION_MANAGER_IS_SETTINGS_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON))
#define GREETER_SESSION_MANAGER_IS_SETTINGS_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON))
#define GREETER_SESSION_MANAGER_SETTINGS_DAEMON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON, GreeterSessionManagerSettingsDaemonClass))

typedef struct _GreeterSessionManagerSettingsDaemon GreeterSessionManagerSettingsDaemon;
typedef struct _GreeterSessionManagerSettingsDaemonClass GreeterSessionManagerSettingsDaemonClass;
typedef struct _GreeterSessionManagerSettingsDaemonPrivate GreeterSessionManagerSettingsDaemonPrivate;

#define GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR (greeter_session_manager_subprocess_supervisor_get_type ())
#define GREETER_SESSION_MANAGER_SUBPROCESS_SUPERVISOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR, GreeterSessionManagerSubprocessSupervisor))
#define GREETER_SESSION_MANAGER_SUBPROCESS_SUPERVISOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR, GreeterSessionManagerSubprocessSupervisorClass))
#define GREETER_SESSION_MANAGER_IS_SUBPROCESS_SUPERVISOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR))
#define GREETER_SESSION_MANAGER_IS_SUBPROCESS_SUPERVISOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR))
#define GREETER_SESSION_MANAGER_SUBPROCESS_SUPERVISOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_SESSION_MANAGER_TYPE_SUBPROCESS_SUPERVISOR, GreeterSessionManagerSubprocessSupervisorClass))

typedef struct _GreeterSessionManagerSubprocessSupervisor GreeterSessionManagerSubprocessSupervisor;
typedef struct _GreeterSessionManagerSubprocessSupervisorClass GreeterSessionManagerSubprocessSupervisorClass;
enum  {
	GREETER_SESSION_MANAGER_SETTINGS_DAEMON_0_PROPERTY,
	GREETER_SESSION_MANAGER_SETTINGS_DAEMON_NUM_PROPERTIES
};
static GParamSpec* greeter_session_manager_settings_daemon_properties[GREETER_SESSION_MANAGER_SETTINGS_DAEMON_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)))

#define GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER (greeter_session_manager_gnome_session_manager_get_type ())
#define GREETER_SESSION_MANAGER_GNOME_SESSION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER, GreeterSessionManagerGnomeSessionManager))
#define GREETER_SESSION_MANAGER_GNOME_SESSION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER, GreeterSessionManagerGnomeSessionManagerClass))
#define GREETER_SESSION_MANAGER_IS_GNOME_SESSION_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER))
#define GREETER_SESSION_MANAGER_IS_GNOME_SESSION_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER))
#define GREETER_SESSION_MANAGER_GNOME_SESSION_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_SESSION_MANAGER_TYPE_GNOME_SESSION_MANAGER, GreeterSessionManagerGnomeSessionManagerClass))

typedef struct _GreeterSessionManagerGnomeSessionManager GreeterSessionManagerGnomeSessionManager;
typedef struct _GreeterSessionManagerGnomeSessionManagerClass GreeterSessionManagerGnomeSessionManagerClass;

struct _GreeterSessionManagerSettingsDaemon {
	GObject parent_instance;
	GreeterSessionManagerSettingsDaemonPrivate * priv;
};

struct _GreeterSessionManagerSettingsDaemonClass {
	GObjectClass parent_class;
};

struct _GreeterSessionManagerSettingsDaemonPrivate {
	GreeterSessionManagerSubprocessSupervisor** supervisors;
	gint supervisors_length1;
	gint _supervisors_size_;
};

static gint GreeterSessionManagerSettingsDaemon_private_offset;
static gpointer greeter_session_manager_settings_daemon_parent_class = NULL;

VALA_EXTERN GType greeter_session_manager_settings_daemon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterSessionManagerSettingsDaemon, g_object_unref)
VALA_EXTERN GType greeter_session_manager_subprocess_supervisor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterSessionManagerSubprocessSupervisor, g_object_unref)
static void greeter_session_manager_settings_daemon_start_settings_daemon (GreeterSessionManagerSettingsDaemon* self);
VALA_EXTERN GreeterSessionManagerSubprocessSupervisor* greeter_session_manager_subprocess_supervisor_new (gchar** exec,
                                                                                              gint exec_length1,
                                                                                              GError** error);
VALA_EXTERN GreeterSessionManagerSubprocessSupervisor* greeter_session_manager_subprocess_supervisor_construct (GType object_type,
                                                                                                    gchar** exec,
                                                                                                    gint exec_length1,
                                                                                                    GError** error);
static void _vala_array_add1 (GreeterSessionManagerSubprocessSupervisor** * array,
                       gint* length,
                       gint* size,
                       GreeterSessionManagerSubprocessSupervisor* value);
VALA_EXTERN GreeterSessionManagerSettingsDaemon* greeter_session_manager_settings_daemon_new (void);
VALA_EXTERN GreeterSessionManagerSettingsDaemon* greeter_session_manager_settings_daemon_construct (GType object_type);
static GObject * greeter_session_manager_settings_daemon_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties);
static void _greeter_session_manager_settings_daemon___lambda4_ (GreeterSessionManagerSettingsDaemon* self,
                                                          GDBusConnection* connection);
VALA_EXTERN GreeterSessionManagerGnomeSessionManager* greeter_session_manager_gnome_session_manager_new (void);
VALA_EXTERN GreeterSessionManagerGnomeSessionManager* greeter_session_manager_gnome_session_manager_construct (GType object_type);
VALA_EXTERN GType greeter_session_manager_gnome_session_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterSessionManagerGnomeSessionManager, g_object_unref)
VALA_EXTERN guint greeter_session_manager_gnome_session_manager_register_object (void* object,
                                                                     GDBusConnection* connection,
                                                                     const gchar* path,
                                                                     GError** error);
static void __greeter_session_manager_settings_daemon___lambda4__gbus_acquired_callback (GDBusConnection* connection,
                                                                                  const gchar* name,
                                                                                  gpointer self);
static void _greeter_session_manager_settings_daemon___lambda5_ (GreeterSessionManagerSettingsDaemon* self);
static void __greeter_session_manager_settings_daemon___lambda5__gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                       const gchar* name,
                                                                                       gpointer self);
static void _greeter_session_manager_settings_daemon___lambda6_ (GreeterSessionManagerSettingsDaemon* self);
static void __greeter_session_manager_settings_daemon___lambda6__gbus_name_lost_callback (GDBusConnection* connection,
                                                                                   const gchar* name,
                                                                                   gpointer self);
static void greeter_session_manager_settings_daemon_finalize (GObject * obj);
static GType greeter_session_manager_settings_daemon_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 const gchar* GREETER_SESSION_MANAGER_SETTINGS_DAEMON_DAEMONS[6] = {"gsd-a11y-settings", "gsd-color", "gsd-media-keys", "gsd-sound", "gsd-power", "gsd-xsettings"};

static inline gpointer
greeter_session_manager_settings_daemon_get_instance_private (GreeterSessionManagerSettingsDaemon* self)
{
	return G_STRUCT_MEMBER_P (self, GreeterSessionManagerSettingsDaemon_private_offset);
}

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

static void
greeter_session_manager_settings_daemon_start_settings_daemon (GreeterSessionManagerSettingsDaemon* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_debug ("SettingsDaemon.vala:41: All bus names acquired, starting gnome-setting" \
"s-daemon");
	{
		const gchar** daemon_collection = NULL;
		gint daemon_collection_length1 = 0;
		gint _daemon_collection_size_ = 0;
		gint daemon_it = 0;
		daemon_collection = GREETER_SESSION_MANAGER_SETTINGS_DAEMON_DAEMONS;
		daemon_collection_length1 = G_N_ELEMENTS (GREETER_SESSION_MANAGER_SETTINGS_DAEMON_DAEMONS);
		for (daemon_it = 0; daemon_it < daemon_collection_length1; daemon_it = daemon_it + 1) {
			const gchar* daemon = NULL;
			daemon = daemon_collection[daemon_it];
			{
				{
					GreeterSessionManagerSubprocessSupervisor* _tmp0_ = NULL;
					const gchar* _tmp1_;
					gchar* _tmp2_;
					gchar** _tmp3_;
					gchar** _tmp4_;
					gint _tmp4__length1;
					GreeterSessionManagerSubprocessSupervisor* _tmp5_;
					GreeterSessionManagerSubprocessSupervisor* _tmp6_;
					GreeterSessionManagerSubprocessSupervisor* _tmp7_;
					_tmp1_ = daemon;
					_tmp2_ = g_strconcat (CONSTANTS_GSD_DIR, _tmp1_, NULL);
					_tmp3_ = g_new0 (gchar*, 1 + 1);
					_tmp3_[0] = _tmp2_;
					_tmp4_ = _tmp3_;
					_tmp4__length1 = 1;
					_tmp5_ = greeter_session_manager_subprocess_supervisor_new (_tmp4_, 1, &_inner_error0_);
					_tmp6_ = _tmp5_;
					_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
					_tmp0_ = _tmp6_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_tmp7_ = _tmp0_;
					_tmp0_ = NULL;
					_vala_array_add1 (&self->priv->supervisors, &self->priv->supervisors_length1, &self->priv->_supervisors_size_, _tmp7_);
					_g_object_unref0 (_tmp0_);
				}
				goto __finally0;
				__catch0_g_error:
				{
					GError* e = NULL;
					const gchar* _tmp8_;
					GError* _tmp9_;
					const gchar* _tmp10_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp8_ = daemon;
					_tmp9_ = e;
					_tmp10_ = _tmp9_->message;
					g_critical ("SettingsDaemon.vala:47: Could not start %s: %s", _tmp8_, _tmp10_);
					_g_error_free0 (e);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return;
				}
			}
		}
	}
}

GreeterSessionManagerSettingsDaemon*
greeter_session_manager_settings_daemon_construct (GType object_type)
{
	GreeterSessionManagerSettingsDaemon * self = NULL;
	self = (GreeterSessionManagerSettingsDaemon*) g_object_new (object_type, NULL);
	return self;
}

GreeterSessionManagerSettingsDaemon*
greeter_session_manager_settings_daemon_new (void)
{
	return greeter_session_manager_settings_daemon_construct (GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON);
}

static void
_greeter_session_manager_settings_daemon___lambda4_ (GreeterSessionManagerSettingsDaemon* self,
                                                     GDBusConnection* connection)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (connection != NULL);
	{
		GreeterSessionManagerGnomeSessionManager* _tmp0_;
		GreeterSessionManagerGnomeSessionManager* _tmp1_;
		_tmp0_ = greeter_session_manager_gnome_session_manager_new ();
		_tmp1_ = _tmp0_;
		greeter_session_manager_gnome_session_manager_register_object (_tmp1_, connection, "/org/gnome/SessionManager", &_inner_error0_);
		_g_object_unref0 (_tmp1_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_critical ("SettingsDaemon.vala:27: Failed to register /org/gnome/SessionManager: " \
"%s", _tmp3_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
__greeter_session_manager_settings_daemon___lambda4__gbus_acquired_callback (GDBusConnection* connection,
                                                                             const gchar* name,
                                                                             gpointer self)
{
	_greeter_session_manager_settings_daemon___lambda4_ ((GreeterSessionManagerSettingsDaemon*) self, connection);
}

static void
_greeter_session_manager_settings_daemon___lambda5_ (GreeterSessionManagerSettingsDaemon* self)
{
	g_debug ("SettingsDaemon.vala:31: Acquired org.gnome.SessionManager");
	greeter_session_manager_settings_daemon_start_settings_daemon (self);
}

static void
__greeter_session_manager_settings_daemon___lambda5__gbus_name_acquired_callback (GDBusConnection* connection,
                                                                                  const gchar* name,
                                                                                  gpointer self)
{
	_greeter_session_manager_settings_daemon___lambda5_ ((GreeterSessionManagerSettingsDaemon*) self);
}

static void
_greeter_session_manager_settings_daemon___lambda6_ (GreeterSessionManagerSettingsDaemon* self)
{
	g_critical ("SettingsDaemon.vala:35: Lost org.gnome.SessionManager");
}

static void
__greeter_session_manager_settings_daemon___lambda6__gbus_name_lost_callback (GDBusConnection* connection,
                                                                              const gchar* name,
                                                                              gpointer self)
{
	_greeter_session_manager_settings_daemon___lambda6_ ((GreeterSessionManagerSettingsDaemon*) self);
}

static GObject *
greeter_session_manager_settings_daemon_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GreeterSessionManagerSettingsDaemon * self;
	parent_class = G_OBJECT_CLASS (greeter_session_manager_settings_daemon_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON, GreeterSessionManagerSettingsDaemon);
	g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "org.gnome.SessionManager", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((__greeter_session_manager_settings_daemon___lambda4__gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __greeter_session_manager_settings_daemon___lambda4__gbus_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((__greeter_session_manager_settings_daemon___lambda5__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __greeter_session_manager_settings_daemon___lambda5__gbus_name_acquired_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((__greeter_session_manager_settings_daemon___lambda6__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) __greeter_session_manager_settings_daemon___lambda6__gbus_name_lost_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	return obj;
}

static void
greeter_session_manager_settings_daemon_class_init (GreeterSessionManagerSettingsDaemonClass * klass,
                                                    gpointer klass_data)
{
	greeter_session_manager_settings_daemon_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GreeterSessionManagerSettingsDaemon_private_offset);
	G_OBJECT_CLASS (klass)->constructor = greeter_session_manager_settings_daemon_constructor;
	G_OBJECT_CLASS (klass)->finalize = greeter_session_manager_settings_daemon_finalize;
}

static void
greeter_session_manager_settings_daemon_instance_init (GreeterSessionManagerSettingsDaemon * self,
                                                       gpointer klass)
{
	GreeterSessionManagerSubprocessSupervisor** _tmp0_;
	self->priv = greeter_session_manager_settings_daemon_get_instance_private (self);
	_tmp0_ = g_new0 (GreeterSessionManagerSubprocessSupervisor*, 0 + 1);
	self->priv->supervisors = _tmp0_;
	self->priv->supervisors_length1 = 0;
	self->priv->_supervisors_size_ = self->priv->supervisors_length1;
}

static void
greeter_session_manager_settings_daemon_finalize (GObject * obj)
{
	GreeterSessionManagerSettingsDaemon * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_SESSION_MANAGER_TYPE_SETTINGS_DAEMON, GreeterSessionManagerSettingsDaemon);
	self->priv->supervisors = (_vala_array_free (self->priv->supervisors, self->priv->supervisors_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (greeter_session_manager_settings_daemon_parent_class)->finalize (obj);
}

static GType
greeter_session_manager_settings_daemon_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GreeterSessionManagerSettingsDaemonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) greeter_session_manager_settings_daemon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GreeterSessionManagerSettingsDaemon), 0, (GInstanceInitFunc) greeter_session_manager_settings_daemon_instance_init, NULL };
	GType greeter_session_manager_settings_daemon_type_id;
	greeter_session_manager_settings_daemon_type_id = g_type_register_static (G_TYPE_OBJECT, "GreeterSessionManagerSettingsDaemon", &g_define_type_info, 0);
	GreeterSessionManagerSettingsDaemon_private_offset = g_type_add_instance_private (greeter_session_manager_settings_daemon_type_id, sizeof (GreeterSessionManagerSettingsDaemonPrivate));
	return greeter_session_manager_settings_daemon_type_id;
}

GType
greeter_session_manager_settings_daemon_get_type (void)
{
	static volatile gsize greeter_session_manager_settings_daemon_type_id__once = 0;
	if (g_once_init_enter (&greeter_session_manager_settings_daemon_type_id__once)) {
		GType greeter_session_manager_settings_daemon_type_id;
		greeter_session_manager_settings_daemon_type_id = greeter_session_manager_settings_daemon_get_type_once ();
		g_once_init_leave (&greeter_session_manager_settings_daemon_type_id__once, greeter_session_manager_settings_daemon_type_id);
	}
	return greeter_session_manager_settings_daemon_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);
}

