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

/* This file is part of GNOME Games. License: GPL-3.0+.*/

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "gnome-games.h"
#include <gmodule.h>
#include "config.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

#define GAMES_TYPE_PLUGIN_REGISTRAR (games_plugin_registrar_get_type ())
#define GAMES_PLUGIN_REGISTRAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrar))
#define GAMES_PLUGIN_REGISTRAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrarClass))
#define GAMES_IS_PLUGIN_REGISTRAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PLUGIN_REGISTRAR))
#define GAMES_IS_PLUGIN_REGISTRAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PLUGIN_REGISTRAR))
#define GAMES_PLUGIN_REGISTRAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrarClass))

typedef struct _GamesPluginRegistrar GamesPluginRegistrar;
typedef struct _GamesPluginRegistrarClass GamesPluginRegistrarClass;
typedef struct _GamesPluginRegistrarPrivate GamesPluginRegistrarPrivate;
enum  {
	GAMES_PLUGIN_REGISTRAR_0_PROPERTY,
	GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY,
	GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY,
	GAMES_PLUGIN_REGISTRAR_NUM_PROPERTIES
};
static GParamSpec* games_plugin_registrar_properties[GAMES_PLUGIN_REGISTRAR_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_module_close0(var) ((var == NULL) ? NULL : (var = (g_module_close (var), NULL)))

#define GAMES_TYPE_PLUGIN_ERROR (games_plugin_error_get_type ())
#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef GType (*GamesPluginRegistrarRegisterPluginFunc) (GTypeModule* module, gpointer user_data);
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _GamesPluginRegistrar {
	GTypeModule parent_instance;
	GamesPluginRegistrarPrivate * priv;
};

struct _GamesPluginRegistrarClass {
	GTypeModuleClass parent_class;
};

struct _GamesPluginRegistrarPrivate {
	gchar* _name;
	gchar* _description;
	GamesPlugin* plugin;
	gchar* module_path;
	GType type;
	GModule* module;
	gboolean loaded;
};

typedef enum  {
	GAMES_PLUGIN_ERROR_INVALID_PLUGIN_DESCRIPTOR,
	GAMES_PLUGIN_ERROR_NOT_A_PLUGIN
} GamesPluginError;
#define GAMES_PLUGIN_ERROR games_plugin_error_quark ()

static gint GamesPluginRegistrar_private_offset;
static gpointer games_plugin_registrar_parent_class = NULL;

VALA_EXTERN GType games_plugin_registrar_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GQuark games_plugin_error_quark (void);
VALA_EXTERN GType games_plugin_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GamesPluginRegistrar* games_plugin_registrar_new (const gchar* plugin_filename,
                                                  GError** error);
VALA_EXTERN GamesPluginRegistrar* games_plugin_registrar_construct (GType object_type,
                                                        const gchar* plugin_filename,
                                                        GError** error);
static void games_plugin_registrar_set_name (GamesPluginRegistrar* self,
                                      const gchar* value);
static void games_plugin_registrar_set_description (GamesPluginRegistrar* self,
                                             const gchar* value);
VALA_EXTERN GamesPlugin* games_plugin_registrar_get_plugin (GamesPluginRegistrar* self,
                                                GError** error);
static GamesPlugin* games_plugin_registrar_new_plugin (GamesPluginRegistrar* self,
                                                GError** error);
static gboolean games_plugin_registrar_real_load (GTypeModule* base);
VALA_EXTERN const gchar* games_plugin_registrar_get_name (GamesPluginRegistrar* self);
VALA_EXTERN const gchar* games_plugin_registrar_get_description (GamesPluginRegistrar* self);
static void games_plugin_registrar_finalize (GObject * obj);
static GType games_plugin_registrar_get_type_once (void);
static void _vala_games_plugin_registrar_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_games_plugin_registrar_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
games_plugin_registrar_get_instance_private (GamesPluginRegistrar* self)
{
	return G_STRUCT_MEMBER_P (self, GamesPluginRegistrar_private_offset);
}

GamesPluginRegistrar*
games_plugin_registrar_construct (GType object_type,
                                  const gchar* plugin_filename,
                                  GError** error)
{
	GamesPluginRegistrar * self = NULL;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (plugin_filename != NULL, NULL);
	self = (GamesPluginRegistrar*) g_object_new (object_type, NULL);
	_vala_assert (g_module_supported (), "Module.supported ()");
	{
		GKeyFile* keyfile = NULL;
		GKeyFile* _tmp0_;
		GKeyFile* _tmp1_;
		gchar* module_name = NULL;
		GKeyFile* _tmp2_;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_ = NULL;
		GKeyFile* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_ = NULL;
		GKeyFile* _tmp10_;
		gchar* _tmp11_;
		_tmp0_ = g_key_file_new ();
		keyfile = _tmp0_;
		_tmp1_ = keyfile;
		g_key_file_load_from_file (_tmp1_, plugin_filename, G_KEY_FILE_NONE, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_key_file_unref0 (keyfile);
			goto __catch0_g_error;
		}
		_tmp2_ = keyfile;
		_tmp3_ = g_key_file_get_string (_tmp2_, "Plugin", "Module", &_inner_error0_);
		module_name = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_key_file_unref0 (keyfile);
			goto __catch0_g_error;
		}
		_tmp4_ = module_name;
		_tmp5_ = g_module_build_path (PLUGINS_DIR, _tmp4_);
		_g_free0 (self->priv->module_path);
		self->priv->module_path = _tmp5_;
		_tmp7_ = keyfile;
		_tmp8_ = g_key_file_get_string (_tmp7_, "Plugin", "Name", &_inner_error0_);
		_tmp6_ = _tmp8_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (module_name);
			_g_key_file_unref0 (keyfile);
			goto __catch0_g_error;
		}
		games_plugin_registrar_set_name (self, _tmp6_);
		_tmp10_ = keyfile;
		_tmp11_ = g_key_file_get_string (_tmp10_, "Plugin", "Description", &_inner_error0_);
		_tmp9_ = _tmp11_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp6_);
			_g_free0 (module_name);
			_g_key_file_unref0 (keyfile);
			goto __catch0_g_error;
		}
		games_plugin_registrar_set_description (self, _tmp9_);
		_g_free0 (_tmp9_);
		_g_free0 (_tmp6_);
		_g_free0 (module_name);
		_g_key_file_unref0 (keyfile);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp12_;
		const gchar* _tmp13_;
		GError* _tmp14_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp12_ = e;
		_tmp13_ = _tmp12_->message;
		_tmp14_ = g_error_new (GAMES_PLUGIN_ERROR, GAMES_PLUGIN_ERROR_INVALID_PLUGIN_DESCRIPTOR, "Invalid plugin descriptor: %s", _tmp13_);
		_inner_error0_ = _tmp14_;
		_g_error_free0 (e);
		goto __finally0;
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == GAMES_PLUGIN_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (self);
			return NULL;
		} else {
			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 NULL;
		}
	}
	self->priv->loaded = FALSE;
	return self;
}

GamesPluginRegistrar*
games_plugin_registrar_new (const gchar* plugin_filename,
                            GError** error)
{
	return games_plugin_registrar_construct (GAMES_TYPE_PLUGIN_REGISTRAR, plugin_filename, error);
}

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

GamesPlugin*
games_plugin_registrar_get_plugin (GamesPluginRegistrar* self,
                                   GError** error)
{
	GamesPlugin* _tmp0_;
	GamesPlugin* _tmp3_ = NULL;
	GamesPlugin* _tmp4_;
	GamesPlugin* _tmp5_;
	GamesPlugin* _tmp6_;
	GamesPlugin* _tmp7_;
	GError* _inner_error0_ = NULL;
	GamesPlugin* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->plugin;
	if (_tmp0_ != NULL) {
		GamesPlugin* _tmp1_;
		GamesPlugin* _tmp2_;
		_tmp1_ = self->priv->plugin;
		_tmp2_ = _g_object_ref0 (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp4_ = games_plugin_registrar_new_plugin (self, &_inner_error0_);
	_tmp3_ = _tmp4_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		if (_inner_error0_->domain == GAMES_PLUGIN_ERROR) {
			g_propagate_error (error, _inner_error0_);
			return NULL;
		} else {
			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 NULL;
		}
	}
	_tmp5_ = _tmp3_;
	_tmp3_ = NULL;
	_g_object_unref0 (self->priv->plugin);
	self->priv->plugin = _tmp5_;
	_tmp6_ = self->priv->plugin;
	_tmp7_ = _g_object_ref0 (_tmp6_);
	result = _tmp7_;
	_g_object_unref0 (_tmp3_);
	return result;
}

static GamesPlugin*
games_plugin_registrar_new_plugin (GamesPluginRegistrar* self,
                                   GError** error)
{
	GObject* object = NULL;
	GObject* _tmp0_;
	GObject* _tmp1_;
	GObject* _tmp2_;
	GamesPlugin* plugin = NULL;
	GObject* _tmp5_;
	GamesPlugin* _tmp6_;
	GamesPlugin* _tmp7_;
	GError* _inner_error0_ = NULL;
	GamesPlugin* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (!self->priv->loaded) {
		G_TYPE_INSTANCE_GET_CLASS ((GTypeModule*) self, g_type_module_get_type (), GTypeModuleClass)->load ((GTypeModule*) self);
	}
	_tmp0_ = g_object_new (self->priv->type, NULL);
	_tmp1_ = G_IS_INITIALLY_UNOWNED (_tmp0_) ? g_object_ref_sink (_tmp0_) : _tmp0_;
	object = _tmp1_;
	_tmp2_ = object;
	if (_tmp2_ == NULL) {
		const gchar* _tmp3_;
		GError* _tmp4_;
		_tmp3_ = self->priv->module_path;
		_tmp4_ = g_error_new (GAMES_PLUGIN_ERROR, GAMES_PLUGIN_ERROR_NOT_A_PLUGIN, "Couldn’t create a new instance of plugin in “%s”.", _tmp3_);
		_inner_error0_ = _tmp4_;
		if (_inner_error0_->domain == GAMES_PLUGIN_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (object);
			return NULL;
		} else {
			_g_object_unref0 (object);
			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 NULL;
		}
	}
	_tmp5_ = object;
	_tmp6_ = _g_object_ref0 (GAMES_IS_PLUGIN (_tmp5_) ? ((GamesPlugin*) _tmp5_) : NULL);
	plugin = _tmp6_;
	_tmp7_ = plugin;
	if (_tmp7_ == NULL) {
		const gchar* _tmp8_;
		GError* _tmp9_;
		_tmp8_ = self->priv->module_path;
		_tmp9_ = g_error_new (GAMES_PLUGIN_ERROR, GAMES_PLUGIN_ERROR_NOT_A_PLUGIN, "Couldn’t create a new instance of plugin in “%s”.", _tmp8_);
		_inner_error0_ = _tmp9_;
		if (_inner_error0_->domain == GAMES_PLUGIN_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (plugin);
			_g_object_unref0 (object);
			return NULL;
		} else {
			_g_object_unref0 (plugin);
			_g_object_unref0 (object);
			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 NULL;
		}
	}
	result = plugin;
	_g_object_unref0 (object);
	return result;
}

static gboolean
games_plugin_registrar_real_load (GTypeModule* base)
{
	GamesPluginRegistrar * self;
	const gchar* _tmp0_;
	GModule* _tmp1_;
	GModule* _tmp2_;
	void* function = NULL;
	GModule* _tmp3_;
	void* _tmp4_ = NULL;
	void* _tmp5_;
	GamesPluginRegistrarRegisterPluginFunc register_plugin = NULL;
	void* _tmp6_;
	gpointer register_plugin_target;
	GamesPluginRegistrarRegisterPluginFunc _tmp7_;
	gpointer _tmp7__target;
	gboolean result;
	self = (GamesPluginRegistrar*) base;
	if (self->priv->loaded) {
		result = TRUE;
		return result;
	}
	_tmp0_ = self->priv->module_path;
	_tmp1_ = g_module_open (_tmp0_, G_MODULE_BIND_LAZY);
	_g_module_close0 (self->priv->module);
	self->priv->module = _tmp1_;
	_tmp2_ = self->priv->module;
	if (_tmp2_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = self->priv->module;
	g_module_symbol (_tmp3_, "register_games_plugin", &_tmp4_);
	function = _tmp4_;
	_tmp5_ = function;
	if (_tmp5_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp6_ = function;
	register_plugin = (GamesPluginRegistrarRegisterPluginFunc) _tmp6_;
	register_plugin_target = NULL;
	_tmp7_ = register_plugin;
	_tmp7__target = register_plugin_target;
	self->priv->type = _tmp7_ ((GTypeModule*) self, _tmp7__target);
	self->priv->loaded = TRUE;
	result = TRUE;
	return result;
}

const gchar*
games_plugin_registrar_get_name (GamesPluginRegistrar* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

static void
games_plugin_registrar_set_name (GamesPluginRegistrar* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = games_plugin_registrar_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, games_plugin_registrar_properties[GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY]);
	}
}

const gchar*
games_plugin_registrar_get_description (GamesPluginRegistrar* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

static void
games_plugin_registrar_set_description (GamesPluginRegistrar* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = games_plugin_registrar_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, games_plugin_registrar_properties[GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY]);
	}
}

static void
games_plugin_registrar_class_init (GamesPluginRegistrarClass * klass,
                                   gpointer klass_data)
{
	games_plugin_registrar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GamesPluginRegistrar_private_offset);
	((GTypeModuleClass *) klass)->load = (gboolean (*) (GTypeModule*)) games_plugin_registrar_real_load;
	G_OBJECT_CLASS (klass)->get_property = _vala_games_plugin_registrar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_plugin_registrar_set_property;
	G_OBJECT_CLASS (klass)->finalize = games_plugin_registrar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY, games_plugin_registrar_properties[GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY, games_plugin_registrar_properties[GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
games_plugin_registrar_instance_init (GamesPluginRegistrar * self,
                                      gpointer klass)
{
	self->priv = games_plugin_registrar_get_instance_private (self);
}

static void
games_plugin_registrar_finalize (GObject * obj)
{
	GamesPluginRegistrar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrar);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_description);
	_g_object_unref0 (self->priv->plugin);
	_g_free0 (self->priv->module_path);
	_g_module_close0 (self->priv->module);
	G_OBJECT_CLASS (games_plugin_registrar_parent_class)->finalize (obj);
}

static GType
games_plugin_registrar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GamesPluginRegistrarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_plugin_registrar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesPluginRegistrar), 0, (GInstanceInitFunc) games_plugin_registrar_instance_init, NULL };
	GType games_plugin_registrar_type_id;
	games_plugin_registrar_type_id = g_type_register_static (g_type_module_get_type (), "GamesPluginRegistrar", &g_define_type_info, 0);
	GamesPluginRegistrar_private_offset = g_type_add_instance_private (games_plugin_registrar_type_id, sizeof (GamesPluginRegistrarPrivate));
	return games_plugin_registrar_type_id;
}

GType
games_plugin_registrar_get_type (void)
{
	static volatile gsize games_plugin_registrar_type_id__once = 0;
	if (g_once_init_enter (&games_plugin_registrar_type_id__once)) {
		GType games_plugin_registrar_type_id;
		games_plugin_registrar_type_id = games_plugin_registrar_get_type_once ();
		g_once_init_leave (&games_plugin_registrar_type_id__once, games_plugin_registrar_type_id);
	}
	return games_plugin_registrar_type_id__once;
}

static void
_vala_games_plugin_registrar_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	GamesPluginRegistrar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrar);
	switch (property_id) {
		case GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY:
		g_value_set_string (value, games_plugin_registrar_get_name (self));
		break;
		case GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY:
		g_value_set_string (value, games_plugin_registrar_get_description (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_games_plugin_registrar_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	GamesPluginRegistrar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_PLUGIN_REGISTRAR, GamesPluginRegistrar);
	switch (property_id) {
		case GAMES_PLUGIN_REGISTRAR_NAME_PROPERTY:
		games_plugin_registrar_set_name (self, g_value_get_string (value));
		break;
		case GAMES_PLUGIN_REGISTRAR_DESCRIPTION_PROPERTY:
		games_plugin_registrar_set_description (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

GQuark
games_plugin_error_quark (void)
{
	return g_quark_from_static_string ("games-plugin-error-quark");
}

static GType
games_plugin_error_get_type_once (void)
{
	static const GEnumValue values[] = {{GAMES_PLUGIN_ERROR_INVALID_PLUGIN_DESCRIPTOR, "GAMES_PLUGIN_ERROR_INVALID_PLUGIN_DESCRIPTOR", "invalid-plugin-descriptor"}, {GAMES_PLUGIN_ERROR_NOT_A_PLUGIN, "GAMES_PLUGIN_ERROR_NOT_A_PLUGIN", "not-a-plugin"}, {0, NULL, NULL}};
	GType games_plugin_error_type_id;
	games_plugin_error_type_id = g_enum_register_static ("GamesPluginError", values);
	return games_plugin_error_type_id;
}

GType
games_plugin_error_get_type (void)
{
	static volatile gsize games_plugin_error_type_id__once = 0;
	if (g_once_init_enter (&games_plugin_error_type_id__once)) {
		GType games_plugin_error_type_id;
		games_plugin_error_type_id = games_plugin_error_get_type_once ();
		g_once_init_leave (&games_plugin_error_type_id__once, games_plugin_error_type_id);
	}
	return games_plugin_error_type_id__once;
}

