/* gameinfo-disc-id-input-capabilities.c generated by valac 0.35.5, the Vala compiler
 * generated from gameinfo-disc-id-input-capabilities.vala, do not modify */

/* This file is part of GNOME Games. License: GPLv3*/

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


#define GAMES_TYPE_INPUT_CAPABILITIES (games_input_capabilities_get_type ())
#define GAMES_INPUT_CAPABILITIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_INPUT_CAPABILITIES, GamesInputCapabilities))
#define GAMES_IS_INPUT_CAPABILITIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_INPUT_CAPABILITIES))
#define GAMES_INPUT_CAPABILITIES_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_INPUT_CAPABILITIES, GamesInputCapabilitiesIface))

typedef struct _GamesInputCapabilities GamesInputCapabilities;
typedef struct _GamesInputCapabilitiesIface GamesInputCapabilitiesIface;

#define GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES (games_gameinfo_disc_id_input_capabilities_get_type ())
#define GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilities))
#define GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilitiesClass))
#define GAMES_IS_GAMEINFO_DISC_ID_INPUT_CAPABILITIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES))
#define GAMES_IS_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES))
#define GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilitiesClass))

typedef struct _GamesGameinfoDiscIdInputCapabilities GamesGameinfoDiscIdInputCapabilities;
typedef struct _GamesGameinfoDiscIdInputCapabilitiesClass GamesGameinfoDiscIdInputCapabilitiesClass;
typedef struct _GamesGameinfoDiscIdInputCapabilitiesPrivate GamesGameinfoDiscIdInputCapabilitiesPrivate;

#define GAMES_TYPE_GAMEINFO_DOC (games_gameinfo_doc_get_type ())
#define GAMES_GAMEINFO_DOC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEINFO_DOC, GamesGameinfoDoc))
#define GAMES_GAMEINFO_DOC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEINFO_DOC, GamesGameinfoDocClass))
#define GAMES_IS_GAMEINFO_DOC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEINFO_DOC))
#define GAMES_IS_GAMEINFO_DOC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEINFO_DOC))
#define GAMES_GAMEINFO_DOC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEINFO_DOC, GamesGameinfoDocClass))

typedef struct _GamesGameinfoDoc GamesGameinfoDoc;
typedef struct _GamesGameinfoDocClass GamesGameinfoDocClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _GamesInputCapabilitiesIface {
	GTypeInterface parent_iface;
	gboolean (*get_allow_classic_gamepads) (GamesInputCapabilities* self, GError** error);
	gboolean (*get_allow_analog_gamepads) (GamesInputCapabilities* self, GError** error);
};

struct _GamesGameinfoDiscIdInputCapabilities {
	GObject parent_instance;
	GamesGameinfoDiscIdInputCapabilitiesPrivate * priv;
};

struct _GamesGameinfoDiscIdInputCapabilitiesClass {
	GObjectClass parent_class;
};

struct _GamesGameinfoDiscIdInputCapabilitiesPrivate {
	gboolean _default_allow_classic_gamepads;
	gboolean _default_allow_analog_gamepads;
	GamesGameinfoDoc* gameinfo;
	gchar* disc_id;
	gchar** controllers;
	gint controllers_length1;
	gint _controllers_size_;
};


static gpointer games_gameinfo_disc_id_input_capabilities_parent_class = NULL;
static GamesInputCapabilitiesIface * games_gameinfo_disc_id_input_capabilities_games_input_capabilities_parent_iface = NULL;

GType games_input_capabilities_get_type (void) G_GNUC_CONST;
GType games_gameinfo_disc_id_input_capabilities_get_type (void) G_GNUC_CONST;
GType games_gameinfo_doc_get_type (void) G_GNUC_CONST;
#define GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilitiesPrivate))
enum  {
	GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DUMMY_PROPERTY,
	GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_CLASSIC_GAMEPADS,
	GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_ANALOG_GAMEPADS
};
GamesGameinfoDiscIdInputCapabilities* games_gameinfo_disc_id_input_capabilities_new (GamesGameinfoDoc* gameinfo, const gchar* disc_id);
GamesGameinfoDiscIdInputCapabilities* games_gameinfo_disc_id_input_capabilities_construct (GType object_type, GamesGameinfoDoc* gameinfo, const gchar* disc_id);
static gboolean games_gameinfo_disc_id_input_capabilities_real_get_allow_classic_gamepads (GamesInputCapabilities* base, GError** error);
gchar** games_gameinfo_doc_get_game_controllers_for_disc_id (GamesGameinfoDoc* self, const gchar* disc_id, int* result_length1, GError** error);
gboolean games_gameinfo_disc_id_input_capabilities_get_default_allow_classic_gamepads (GamesGameinfoDiscIdInputCapabilities* self);
static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle);
static gboolean games_gameinfo_disc_id_input_capabilities_real_get_allow_analog_gamepads (GamesInputCapabilities* base, GError** error);
gboolean games_gameinfo_disc_id_input_capabilities_get_default_allow_analog_gamepads (GamesGameinfoDiscIdInputCapabilities* self);
void games_gameinfo_disc_id_input_capabilities_set_default_allow_classic_gamepads (GamesGameinfoDiscIdInputCapabilities* self, gboolean value);
void games_gameinfo_disc_id_input_capabilities_set_default_allow_analog_gamepads (GamesGameinfoDiscIdInputCapabilities* self, gboolean value);
static void games_gameinfo_disc_id_input_capabilities_finalize (GObject * obj);
static void _vala_games_gameinfo_disc_id_input_capabilities_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_games_gameinfo_disc_id_input_capabilities_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


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


GamesGameinfoDiscIdInputCapabilities* games_gameinfo_disc_id_input_capabilities_construct (GType object_type, GamesGameinfoDoc* gameinfo, const gchar* disc_id) {
	GamesGameinfoDiscIdInputCapabilities * self = NULL;
	GamesGameinfoDoc* _tmp0_;
	GamesGameinfoDoc* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (gameinfo != NULL, NULL);
	g_return_val_if_fail (disc_id != NULL, NULL);
	self = (GamesGameinfoDiscIdInputCapabilities*) g_object_new (object_type, NULL);
	_tmp0_ = gameinfo;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->gameinfo);
	self->priv->gameinfo = _tmp1_;
	_tmp2_ = disc_id;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->priv->disc_id);
	self->priv->disc_id = _tmp3_;
	return self;
}


GamesGameinfoDiscIdInputCapabilities* games_gameinfo_disc_id_input_capabilities_new (GamesGameinfoDoc* gameinfo, const gchar* disc_id) {
	return games_gameinfo_disc_id_input_capabilities_construct (GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, gameinfo, disc_id);
}


static gboolean _vala_string_array_contains (gchar* * stack, int stack_length, gchar* needle) {
	int i;
	for (i = 0; i < stack_length; i++) {
		if (g_strcmp0 (stack[i], needle) == 0) {
			return TRUE;
		}
	}
	return FALSE;
}


static gboolean games_gameinfo_disc_id_input_capabilities_real_get_allow_classic_gamepads (GamesInputCapabilities* base, GError** error) {
	GamesGameinfoDiscIdInputCapabilities * self;
	gboolean result = FALSE;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gchar** _tmp10_;
	gint _tmp10__length1;
	GError * _inner_error_ = NULL;
	self = (GamesGameinfoDiscIdInputCapabilities*) base;
	_tmp0_ = self->priv->controllers;
	_tmp0__length1 = self->priv->controllers_length1;
	if (_tmp0_ == NULL) {
		gchar** _tmp1_;
		GamesGameinfoDoc* _tmp2_;
		const gchar* _tmp3_;
		gint _tmp4_;
		gchar** _tmp5_;
		gint _tmp1__length1;
		gint __tmp1__size_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		_tmp2_ = self->priv->gameinfo;
		_tmp3_ = self->priv->disc_id;
		_tmp5_ = games_gameinfo_doc_get_game_controllers_for_disc_id (_tmp2_, _tmp3_, &_tmp4_, &_inner_error_);
		_tmp1_ = _tmp5_;
		_tmp1__length1 = _tmp4_;
		__tmp1__size_ = _tmp1__length1;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp6_ = FALSE;
			g_propagate_error (error, _inner_error_);
			return _tmp6_;
		}
		_tmp7_ = _tmp1_;
		_tmp7__length1 = _tmp1__length1;
		_tmp1_ = NULL;
		_tmp1__length1 = 0;
		self->priv->controllers = (_vala_array_free (self->priv->controllers, self->priv->controllers_length1, (GDestroyNotify) g_free), NULL);
		self->priv->controllers = _tmp7_;
		self->priv->controllers_length1 = _tmp7__length1;
		self->priv->_controllers_size_ = self->priv->controllers_length1;
		_tmp1_ = (_vala_array_free (_tmp1_, _tmp1__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp8_ = self->priv->controllers;
	_tmp8__length1 = self->priv->controllers_length1;
	if (_tmp8__length1 == 0) {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_default_allow_classic_gamepads;
		result = _tmp9_;
		return result;
	}
	_tmp10_ = self->priv->controllers;
	_tmp10__length1 = self->priv->controllers_length1;
	result = _vala_string_array_contains (_tmp10_, _tmp10__length1, "classic-gamepad");
	return result;
}


static gboolean games_gameinfo_disc_id_input_capabilities_real_get_allow_analog_gamepads (GamesInputCapabilities* base, GError** error) {
	GamesGameinfoDiscIdInputCapabilities * self;
	gboolean result = FALSE;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gchar** _tmp10_;
	gint _tmp10__length1;
	GError * _inner_error_ = NULL;
	self = (GamesGameinfoDiscIdInputCapabilities*) base;
	_tmp0_ = self->priv->controllers;
	_tmp0__length1 = self->priv->controllers_length1;
	if (_tmp0_ == NULL) {
		gchar** _tmp1_;
		GamesGameinfoDoc* _tmp2_;
		const gchar* _tmp3_;
		gint _tmp4_;
		gchar** _tmp5_;
		gint _tmp1__length1;
		gint __tmp1__size_;
		gchar** _tmp7_;
		gint _tmp7__length1;
		_tmp2_ = self->priv->gameinfo;
		_tmp3_ = self->priv->disc_id;
		_tmp5_ = games_gameinfo_doc_get_game_controllers_for_disc_id (_tmp2_, _tmp3_, &_tmp4_, &_inner_error_);
		_tmp1_ = _tmp5_;
		_tmp1__length1 = _tmp4_;
		__tmp1__size_ = _tmp1__length1;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp6_ = FALSE;
			g_propagate_error (error, _inner_error_);
			return _tmp6_;
		}
		_tmp7_ = _tmp1_;
		_tmp7__length1 = _tmp1__length1;
		_tmp1_ = NULL;
		_tmp1__length1 = 0;
		self->priv->controllers = (_vala_array_free (self->priv->controllers, self->priv->controllers_length1, (GDestroyNotify) g_free), NULL);
		self->priv->controllers = _tmp7_;
		self->priv->controllers_length1 = _tmp7__length1;
		self->priv->_controllers_size_ = self->priv->controllers_length1;
		_tmp1_ = (_vala_array_free (_tmp1_, _tmp1__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp8_ = self->priv->controllers;
	_tmp8__length1 = self->priv->controllers_length1;
	if (_tmp8__length1 == 0) {
		gboolean _tmp9_;
		_tmp9_ = self->priv->_default_allow_analog_gamepads;
		result = _tmp9_;
		return result;
	}
	_tmp10_ = self->priv->controllers;
	_tmp10__length1 = self->priv->controllers_length1;
	result = _vala_string_array_contains (_tmp10_, _tmp10__length1, "analog-gamepad");
	return result;
}


gboolean games_gameinfo_disc_id_input_capabilities_get_default_allow_classic_gamepads (GamesGameinfoDiscIdInputCapabilities* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_default_allow_classic_gamepads;
	result = _tmp0_;
	return result;
}


void games_gameinfo_disc_id_input_capabilities_set_default_allow_classic_gamepads (GamesGameinfoDiscIdInputCapabilities* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (games_gameinfo_disc_id_input_capabilities_get_default_allow_classic_gamepads (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_default_allow_classic_gamepads = _tmp0_;
		g_object_notify ((GObject *) self, "default-allow-classic-gamepads");
	}
}


gboolean games_gameinfo_disc_id_input_capabilities_get_default_allow_analog_gamepads (GamesGameinfoDiscIdInputCapabilities* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_default_allow_analog_gamepads;
	result = _tmp0_;
	return result;
}


void games_gameinfo_disc_id_input_capabilities_set_default_allow_analog_gamepads (GamesGameinfoDiscIdInputCapabilities* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (games_gameinfo_disc_id_input_capabilities_get_default_allow_analog_gamepads (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_default_allow_analog_gamepads = _tmp0_;
		g_object_notify ((GObject *) self, "default-allow-analog-gamepads");
	}
}


static void games_gameinfo_disc_id_input_capabilities_class_init (GamesGameinfoDiscIdInputCapabilitiesClass * klass) {
	games_gameinfo_disc_id_input_capabilities_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesGameinfoDiscIdInputCapabilitiesPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_gameinfo_disc_id_input_capabilities_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_gameinfo_disc_id_input_capabilities_set_property;
	G_OBJECT_CLASS (klass)->finalize = games_gameinfo_disc_id_input_capabilities_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_CLASSIC_GAMEPADS, g_param_spec_boolean ("default-allow-classic-gamepads", "default-allow-classic-gamepads", "default-allow-classic-gamepads", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_ANALOG_GAMEPADS, g_param_spec_boolean ("default-allow-analog-gamepads", "default-allow-analog-gamepads", "default-allow-analog-gamepads", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void games_gameinfo_disc_id_input_capabilities_games_input_capabilities_interface_init (GamesInputCapabilitiesIface * iface) {
	games_gameinfo_disc_id_input_capabilities_games_input_capabilities_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_allow_classic_gamepads = (gboolean (*) (GamesInputCapabilities *, GError**)) games_gameinfo_disc_id_input_capabilities_real_get_allow_classic_gamepads;
	iface->get_allow_analog_gamepads = (gboolean (*) (GamesInputCapabilities *, GError**)) games_gameinfo_disc_id_input_capabilities_real_get_allow_analog_gamepads;
}


static void games_gameinfo_disc_id_input_capabilities_instance_init (GamesGameinfoDiscIdInputCapabilities * self) {
	self->priv = GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_GET_PRIVATE (self);
}


static void games_gameinfo_disc_id_input_capabilities_finalize (GObject * obj) {
	GamesGameinfoDiscIdInputCapabilities * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilities);
	_g_object_unref0 (self->priv->gameinfo);
	_g_free0 (self->priv->disc_id);
	self->priv->controllers = (_vala_array_free (self->priv->controllers, self->priv->controllers_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (games_gameinfo_disc_id_input_capabilities_parent_class)->finalize (obj);
}


GType games_gameinfo_disc_id_input_capabilities_get_type (void) {
	static volatile gsize games_gameinfo_disc_id_input_capabilities_type_id__volatile = 0;
	if (g_once_init_enter (&games_gameinfo_disc_id_input_capabilities_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesGameinfoDiscIdInputCapabilitiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_gameinfo_disc_id_input_capabilities_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesGameinfoDiscIdInputCapabilities), 0, (GInstanceInitFunc) games_gameinfo_disc_id_input_capabilities_instance_init, NULL };
		static const GInterfaceInfo games_input_capabilities_info = { (GInterfaceInitFunc) games_gameinfo_disc_id_input_capabilities_games_input_capabilities_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType games_gameinfo_disc_id_input_capabilities_type_id;
		games_gameinfo_disc_id_input_capabilities_type_id = g_type_register_static (G_TYPE_OBJECT, "GamesGameinfoDiscIdInputCapabilities", &g_define_type_info, 0);
		g_type_add_interface_static (games_gameinfo_disc_id_input_capabilities_type_id, GAMES_TYPE_INPUT_CAPABILITIES, &games_input_capabilities_info);
		g_once_init_leave (&games_gameinfo_disc_id_input_capabilities_type_id__volatile, games_gameinfo_disc_id_input_capabilities_type_id);
	}
	return games_gameinfo_disc_id_input_capabilities_type_id__volatile;
}


static void _vala_games_gameinfo_disc_id_input_capabilities_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesGameinfoDiscIdInputCapabilities * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilities);
	switch (property_id) {
		case GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_CLASSIC_GAMEPADS:
		g_value_set_boolean (value, games_gameinfo_disc_id_input_capabilities_get_default_allow_classic_gamepads (self));
		break;
		case GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_ANALOG_GAMEPADS:
		g_value_set_boolean (value, games_gameinfo_disc_id_input_capabilities_get_default_allow_analog_gamepads (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_games_gameinfo_disc_id_input_capabilities_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GamesGameinfoDiscIdInputCapabilities * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_GAMEINFO_DISC_ID_INPUT_CAPABILITIES, GamesGameinfoDiscIdInputCapabilities);
	switch (property_id) {
		case GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_CLASSIC_GAMEPADS:
		games_gameinfo_disc_id_input_capabilities_set_default_allow_classic_gamepads (self, g_value_get_boolean (value));
		break;
		case GAMES_GAMEINFO_DISC_ID_INPUT_CAPABILITIES_DEFAULT_ALLOW_ANALOG_GAMEPADS:
		games_gameinfo_disc_id_input_capabilities_set_default_allow_analog_gamepads (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int 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, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



