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

/*
 * Copyright 2011-2013 Robert Dyer
 * Copyright 2011-2013 Rico Tzschichholz <ricotz@ubuntu.com>
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#include "granite-7.h"
#include <stdlib.h>
#include <string.h>
#include <glib.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

static GType granite_services_settings_serializable_get_type_once (void);

/**
         * Serializes the object into a string representation.
         *
         * @return the string representation of the object
         */
gchar*
granite_services_settings_serializable_settings_serialize (GraniteServicesSettingsSerializable* self)
{
	GraniteServicesSettingsSerializableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GRANITE_SERVICES_SETTINGS_SERIALIZABLE_GET_INTERFACE (self);
	if (_iface_->settings_serialize) {
		return _iface_->settings_serialize (self);
	}
	return NULL;
}

/**
         * Un-serializes the object from a string representation.
         *
         * @param s the string representation of the object
         */
void
granite_services_settings_serializable_settings_deserialize (GraniteServicesSettingsSerializable* self,
                                                             const gchar* s)
{
	GraniteServicesSettingsSerializableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GRANITE_SERVICES_SETTINGS_SERIALIZABLE_GET_INTERFACE (self);
	if (_iface_->settings_deserialize) {
		_iface_->settings_deserialize (self, s);
	}
}

static void
granite_services_settings_serializable_default_init (GraniteServicesSettingsSerializableIface * iface,
                                                     gpointer iface_data)
{
}

/**
     * This interface is used by objects that need to be serialized in a Settings.
     * The object must have a string representation and provide these methods to
     * translate between the string and object representations.
     */
static GType
granite_services_settings_serializable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GraniteServicesSettingsSerializableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) granite_services_settings_serializable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType granite_services_settings_serializable_type_id;
	granite_services_settings_serializable_type_id = g_type_register_static (G_TYPE_INTERFACE, "GraniteServicesSettingsSerializable", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (granite_services_settings_serializable_type_id, G_TYPE_OBJECT);
	return granite_services_settings_serializable_type_id;
}

GType
granite_services_settings_serializable_get_type (void)
{
	static volatile gsize granite_services_settings_serializable_type_id__once = 0;
	if (g_once_init_enter (&granite_services_settings_serializable_type_id__once)) {
		GType granite_services_settings_serializable_type_id;
		granite_services_settings_serializable_type_id = granite_services_settings_serializable_get_type_once ();
		g_once_init_leave (&granite_services_settings_serializable_type_id__once, granite_services_settings_serializable_type_id);
	}
	return granite_services_settings_serializable_type_id__once;
}

