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

/*
    GioSettingsService.vala
    Copyright (C) 2010 Maia Kozheva <sikon@ubuntu.com>

    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, see <http://www.gnu.org/licenses/>.
*/

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.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 STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE (steadyflow_core_isettings_service_get_type ())
#define STEADYFLOW_CORE_ISETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE, SteadyflowCoreISettingsService))
#define STEADYFLOW_CORE_IS_ISETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE))
#define STEADYFLOW_CORE_ISETTINGS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE, SteadyflowCoreISettingsServiceIface))

typedef struct _SteadyflowCoreISettingsService SteadyflowCoreISettingsService;
typedef struct _SteadyflowCoreISettingsServiceIface SteadyflowCoreISettingsServiceIface;

#define STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE (steadyflow_core_gio_settings_service_get_type ())
#define STEADYFLOW_CORE_GIO_SETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE, SteadyflowCoreGioSettingsService))
#define STEADYFLOW_CORE_GIO_SETTINGS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE, SteadyflowCoreGioSettingsServiceClass))
#define STEADYFLOW_CORE_IS_GIO_SETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE))
#define STEADYFLOW_CORE_IS_GIO_SETTINGS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE))
#define STEADYFLOW_CORE_GIO_SETTINGS_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE, SteadyflowCoreGioSettingsServiceClass))

typedef struct _SteadyflowCoreGioSettingsService SteadyflowCoreGioSettingsService;
typedef struct _SteadyflowCoreGioSettingsServiceClass SteadyflowCoreGioSettingsServiceClass;
typedef struct _SteadyflowCoreGioSettingsServicePrivate SteadyflowCoreGioSettingsServicePrivate;
enum  {
	STEADYFLOW_CORE_GIO_SETTINGS_SERVICE_0_PROPERTY,
	STEADYFLOW_CORE_GIO_SETTINGS_SERVICE_NUM_PROPERTIES
};
static GParamSpec* steadyflow_core_gio_settings_service_properties[STEADYFLOW_CORE_GIO_SETTINGS_SERVICE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SteadyflowCoreISettingsServiceIface {
	GTypeInterface parent_iface;
	gboolean (*get_boolean) (SteadyflowCoreISettingsService* self, const gchar* key);
	gint (*get_int) (SteadyflowCoreISettingsService* self, const gchar* key);
	gint (*get_enum) (SteadyflowCoreISettingsService* self, const gchar* key);
	gchar* (*get_string) (SteadyflowCoreISettingsService* self, const gchar* key);
	void (*set_boolean) (SteadyflowCoreISettingsService* self, const gchar* key, gboolean value);
	void (*set_int) (SteadyflowCoreISettingsService* self, const gchar* key, gint value);
	void (*set_enum) (SteadyflowCoreISettingsService* self, const gchar* key, gint value);
	void (*set_string) (SteadyflowCoreISettingsService* self, const gchar* key, const gchar* value);
	void (*save) (SteadyflowCoreISettingsService* self);
};

struct _SteadyflowCoreGioSettingsService {
	GObject parent_instance;
	SteadyflowCoreGioSettingsServicePrivate * priv;
};

struct _SteadyflowCoreGioSettingsServiceClass {
	GObjectClass parent_class;
};

struct _SteadyflowCoreGioSettingsServicePrivate {
	GSettings* gs;
};

static gint SteadyflowCoreGioSettingsService_private_offset;
static gpointer steadyflow_core_gio_settings_service_parent_class = NULL;
static SteadyflowCoreISettingsServiceIface * steadyflow_core_gio_settings_service_steadyflow_core_isettings_service_parent_iface = NULL;

VALA_EXTERN GType steadyflow_core_isettings_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreISettingsService, g_object_unref)
VALA_EXTERN GType steadyflow_core_gio_settings_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreGioSettingsService, g_object_unref)
VALA_EXTERN SteadyflowCoreGioSettingsService* steadyflow_core_gio_settings_service_new (const gchar* schema);
VALA_EXTERN SteadyflowCoreGioSettingsService* steadyflow_core_gio_settings_service_construct (GType object_type,
                                                                                  const gchar* schema);
static void __lambda6_ (SteadyflowCoreGioSettingsService* self,
                 const gchar* key);
static void ___lambda6__g_settings_changed (GSettings* _sender,
                                     const gchar* key,
                                     gpointer self);
static gboolean steadyflow_core_gio_settings_service_real_get_boolean (SteadyflowCoreISettingsService* base,
                                                                const gchar* key);
static gint steadyflow_core_gio_settings_service_real_get_int (SteadyflowCoreISettingsService* base,
                                                        const gchar* key);
static gint steadyflow_core_gio_settings_service_real_get_enum (SteadyflowCoreISettingsService* base,
                                                         const gchar* key);
static gchar* steadyflow_core_gio_settings_service_real_get_string (SteadyflowCoreISettingsService* base,
                                                             const gchar* key);
static void steadyflow_core_gio_settings_service_real_set_boolean (SteadyflowCoreISettingsService* base,
                                                            const gchar* key,
                                                            gboolean value);
static void steadyflow_core_gio_settings_service_real_set_int (SteadyflowCoreISettingsService* base,
                                                        const gchar* key,
                                                        gint value);
static void steadyflow_core_gio_settings_service_real_set_enum (SteadyflowCoreISettingsService* base,
                                                         const gchar* key,
                                                         gint value);
static void steadyflow_core_gio_settings_service_real_set_string (SteadyflowCoreISettingsService* base,
                                                           const gchar* key,
                                                           const gchar* value);
static void steadyflow_core_gio_settings_service_real_save (SteadyflowCoreISettingsService* base);
VALA_EXTERN gboolean steadyflow_core_isettings_service_get_boolean (SteadyflowCoreISettingsService* self,
                                                        const gchar* key);
VALA_EXTERN gint steadyflow_core_isettings_service_get_int (SteadyflowCoreISettingsService* self,
                                                const gchar* key);
VALA_EXTERN gint steadyflow_core_isettings_service_get_enum (SteadyflowCoreISettingsService* self,
                                                 const gchar* key);
VALA_EXTERN gchar* steadyflow_core_isettings_service_get_string (SteadyflowCoreISettingsService* self,
                                                     const gchar* key);
VALA_EXTERN void steadyflow_core_isettings_service_set_boolean (SteadyflowCoreISettingsService* self,
                                                    const gchar* key,
                                                    gboolean value);
VALA_EXTERN void steadyflow_core_isettings_service_set_int (SteadyflowCoreISettingsService* self,
                                                const gchar* key,
                                                gint value);
VALA_EXTERN void steadyflow_core_isettings_service_set_enum (SteadyflowCoreISettingsService* self,
                                                 const gchar* key,
                                                 gint value);
VALA_EXTERN void steadyflow_core_isettings_service_set_string (SteadyflowCoreISettingsService* self,
                                                   const gchar* key,
                                                   const gchar* value);
VALA_EXTERN void steadyflow_core_isettings_service_save (SteadyflowCoreISettingsService* self);
static void steadyflow_core_gio_settings_service_finalize (GObject * obj);
static GType steadyflow_core_gio_settings_service_get_type_once (void);
VALA_EXTERN SteadyflowCoreISettingsService* steadyflow_core_app_config_create_settings (const gchar* schema);

static inline gpointer
steadyflow_core_gio_settings_service_get_instance_private (SteadyflowCoreGioSettingsService* self)
{
	return G_STRUCT_MEMBER_P (self, SteadyflowCoreGioSettingsService_private_offset);
}

static void
__lambda6_ (SteadyflowCoreGioSettingsService* self,
            const gchar* key)
{
	gchar* _tmp0_;
	g_return_if_fail (key != NULL);
	_tmp0_ = g_strconcat ("changed::", key, NULL);
	g_signal_emit_by_name ((SteadyflowCoreISettingsService*) self, _tmp0_);
	_g_free0 (_tmp0_);
}

static void
___lambda6__g_settings_changed (GSettings* _sender,
                                const gchar* key,
                                gpointer self)
{
	__lambda6_ ((SteadyflowCoreGioSettingsService*) self, key);
}

SteadyflowCoreGioSettingsService*
steadyflow_core_gio_settings_service_construct (GType object_type,
                                                const gchar* schema)
{
	SteadyflowCoreGioSettingsService * self = NULL;
	GSettings* _tmp0_;
	GSettings* _tmp1_;
	g_return_val_if_fail (schema != NULL, NULL);
	self = (SteadyflowCoreGioSettingsService*) g_object_new (object_type, NULL);
	_tmp0_ = g_settings_new (schema);
	_g_object_unref0 (self->priv->gs);
	self->priv->gs = _tmp0_;
	_tmp1_ = self->priv->gs;
	g_signal_connect_object (_tmp1_, "changed", (GCallback) ___lambda6__g_settings_changed, self, 0);
	return self;
}

SteadyflowCoreGioSettingsService*
steadyflow_core_gio_settings_service_new (const gchar* schema)
{
	return steadyflow_core_gio_settings_service_construct (STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE, schema);
}

static gboolean
steadyflow_core_gio_settings_service_real_get_boolean (SteadyflowCoreISettingsService* base,
                                                       const gchar* key)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	gboolean result;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp0_ = self->priv->gs;
	result = g_settings_get_boolean (_tmp0_, key);
	return result;
}

static gint
steadyflow_core_gio_settings_service_real_get_int (SteadyflowCoreISettingsService* base,
                                                   const gchar* key)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	gint result;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_val_if_fail (key != NULL, 0);
	_tmp0_ = self->priv->gs;
	result = g_settings_get_int (_tmp0_, key);
	return result;
}

static gint
steadyflow_core_gio_settings_service_real_get_enum (SteadyflowCoreISettingsService* base,
                                                    const gchar* key)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	gint result;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_val_if_fail (key != NULL, 0);
	_tmp0_ = self->priv->gs;
	result = g_settings_get_enum (_tmp0_, key);
	return result;
}

static gchar*
steadyflow_core_gio_settings_service_real_get_string (SteadyflowCoreISettingsService* base,
                                                      const gchar* key)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_val_if_fail (key != NULL, NULL);
	_tmp0_ = self->priv->gs;
	_tmp1_ = g_settings_get_string (_tmp0_, key);
	result = _tmp1_;
	return result;
}

static void
steadyflow_core_gio_settings_service_real_set_boolean (SteadyflowCoreISettingsService* base,
                                                       const gchar* key,
                                                       gboolean value)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_if_fail (key != NULL);
	_tmp0_ = self->priv->gs;
	g_settings_set_boolean (_tmp0_, key, value);
}

static void
steadyflow_core_gio_settings_service_real_set_int (SteadyflowCoreISettingsService* base,
                                                   const gchar* key,
                                                   gint value)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_if_fail (key != NULL);
	_tmp0_ = self->priv->gs;
	g_settings_set_int (_tmp0_, key, value);
}

static void
steadyflow_core_gio_settings_service_real_set_enum (SteadyflowCoreISettingsService* base,
                                                    const gchar* key,
                                                    gint value)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_if_fail (key != NULL);
	_tmp0_ = self->priv->gs;
	g_settings_set_enum (_tmp0_, key, value);
}

static void
steadyflow_core_gio_settings_service_real_set_string (SteadyflowCoreISettingsService* base,
                                                      const gchar* key,
                                                      const gchar* value)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	self = (SteadyflowCoreGioSettingsService*) base;
	g_return_if_fail (key != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->gs;
	g_settings_set_string (_tmp0_, key, value);
}

static void
steadyflow_core_gio_settings_service_real_save (SteadyflowCoreISettingsService* base)
{
	SteadyflowCoreGioSettingsService * self;
	GSettings* _tmp0_;
	self = (SteadyflowCoreGioSettingsService*) base;
	_tmp0_ = self->priv->gs;
	g_settings_apply (_tmp0_);
}

static void
steadyflow_core_gio_settings_service_class_init (SteadyflowCoreGioSettingsServiceClass * klass,
                                                 gpointer klass_data)
{
	steadyflow_core_gio_settings_service_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SteadyflowCoreGioSettingsService_private_offset);
	G_OBJECT_CLASS (klass)->finalize = steadyflow_core_gio_settings_service_finalize;
}

static void
steadyflow_core_gio_settings_service_steadyflow_core_isettings_service_interface_init (SteadyflowCoreISettingsServiceIface * iface,
                                                                                       gpointer iface_data)
{
	steadyflow_core_gio_settings_service_steadyflow_core_isettings_service_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_boolean = (gboolean (*) (SteadyflowCoreISettingsService*, const gchar*)) steadyflow_core_gio_settings_service_real_get_boolean;
	iface->get_int = (gint (*) (SteadyflowCoreISettingsService*, const gchar*)) steadyflow_core_gio_settings_service_real_get_int;
	iface->get_enum = (gint (*) (SteadyflowCoreISettingsService*, const gchar*)) steadyflow_core_gio_settings_service_real_get_enum;
	iface->get_string = (gchar* (*) (SteadyflowCoreISettingsService*, const gchar*)) steadyflow_core_gio_settings_service_real_get_string;
	iface->set_boolean = (void (*) (SteadyflowCoreISettingsService*, const gchar*, gboolean)) steadyflow_core_gio_settings_service_real_set_boolean;
	iface->set_int = (void (*) (SteadyflowCoreISettingsService*, const gchar*, gint)) steadyflow_core_gio_settings_service_real_set_int;
	iface->set_enum = (void (*) (SteadyflowCoreISettingsService*, const gchar*, gint)) steadyflow_core_gio_settings_service_real_set_enum;
	iface->set_string = (void (*) (SteadyflowCoreISettingsService*, const gchar*, const gchar*)) steadyflow_core_gio_settings_service_real_set_string;
	iface->save = (void (*) (SteadyflowCoreISettingsService*)) steadyflow_core_gio_settings_service_real_save;
}

static void
steadyflow_core_gio_settings_service_instance_init (SteadyflowCoreGioSettingsService * self,
                                                    gpointer klass)
{
	self->priv = steadyflow_core_gio_settings_service_get_instance_private (self);
}

static void
steadyflow_core_gio_settings_service_finalize (GObject * obj)
{
	SteadyflowCoreGioSettingsService * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, STEADYFLOW_CORE_TYPE_GIO_SETTINGS_SERVICE, SteadyflowCoreGioSettingsService);
	_g_object_unref0 (self->priv->gs);
	G_OBJECT_CLASS (steadyflow_core_gio_settings_service_parent_class)->finalize (obj);
}

static GType
steadyflow_core_gio_settings_service_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SteadyflowCoreGioSettingsServiceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) steadyflow_core_gio_settings_service_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SteadyflowCoreGioSettingsService), 0, (GInstanceInitFunc) steadyflow_core_gio_settings_service_instance_init, NULL };
	static const GInterfaceInfo steadyflow_core_isettings_service_info = { (GInterfaceInitFunc) steadyflow_core_gio_settings_service_steadyflow_core_isettings_service_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType steadyflow_core_gio_settings_service_type_id;
	steadyflow_core_gio_settings_service_type_id = g_type_register_static (G_TYPE_OBJECT, "SteadyflowCoreGioSettingsService", &g_define_type_info, 0);
	g_type_add_interface_static (steadyflow_core_gio_settings_service_type_id, STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE, &steadyflow_core_isettings_service_info);
	SteadyflowCoreGioSettingsService_private_offset = g_type_add_instance_private (steadyflow_core_gio_settings_service_type_id, sizeof (SteadyflowCoreGioSettingsServicePrivate));
	return steadyflow_core_gio_settings_service_type_id;
}

GType
steadyflow_core_gio_settings_service_get_type (void)
{
	static volatile gsize steadyflow_core_gio_settings_service_type_id__once = 0;
	if (g_once_init_enter (&steadyflow_core_gio_settings_service_type_id__once)) {
		GType steadyflow_core_gio_settings_service_type_id;
		steadyflow_core_gio_settings_service_type_id = steadyflow_core_gio_settings_service_get_type_once ();
		g_once_init_leave (&steadyflow_core_gio_settings_service_type_id__once, steadyflow_core_gio_settings_service_type_id);
	}
	return steadyflow_core_gio_settings_service_type_id__once;
}

SteadyflowCoreISettingsService*
steadyflow_core_app_config_create_settings (const gchar* schema)
{
	SteadyflowCoreGioSettingsService* _tmp0_;
	SteadyflowCoreISettingsService* result;
	g_return_val_if_fail (schema != NULL, NULL);
	_tmp0_ = steadyflow_core_gio_settings_service_new (schema);
	result = (SteadyflowCoreISettingsService*) _tmp0_;
	return result;
}

