/* playstation-plugin.c generated by valac 0.36.9, the Vala compiler
 * generated from playstation-plugin.vala, do not modify */

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

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


#define GAMES_TYPE_PLAY_STATION (games_play_station_get_type ())
#define GAMES_PLAY_STATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PLAY_STATION, GamesPlayStation))
#define GAMES_PLAY_STATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PLAY_STATION, GamesPlayStationClass))
#define GAMES_IS_PLAY_STATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PLAY_STATION))
#define GAMES_IS_PLAY_STATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PLAY_STATION))
#define GAMES_PLAY_STATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PLAY_STATION, GamesPlayStationClass))

typedef struct _GamesPlayStation GamesPlayStation;
typedef struct _GamesPlayStationClass GamesPlayStationClass;
typedef struct _GamesPlayStationPrivate GamesPlayStationPrivate;

#define GAMES_TYPE_PLAY_STATION_GAME_FACTORY (games_play_station_game_factory_get_type ())
#define GAMES_PLAY_STATION_GAME_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_PLAY_STATION_GAME_FACTORY, GamesPlayStationGameFactory))
#define GAMES_PLAY_STATION_GAME_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_PLAY_STATION_GAME_FACTORY, GamesPlayStationGameFactoryClass))
#define GAMES_IS_PLAY_STATION_GAME_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_PLAY_STATION_GAME_FACTORY))
#define GAMES_IS_PLAY_STATION_GAME_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_PLAY_STATION_GAME_FACTORY))
#define GAMES_PLAY_STATION_GAME_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PLAY_STATION_GAME_FACTORY, GamesPlayStationGameFactoryClass))

typedef struct _GamesPlayStationGameFactory GamesPlayStationGameFactory;
typedef struct _GamesPlayStationGameFactoryClass GamesPlayStationGameFactoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GamesPlayStation {
	GObject parent_instance;
	GamesPlayStationPrivate * priv;
};

struct _GamesPlayStationClass {
	GObjectClass parent_class;
};


static gpointer games_play_station_parent_class = NULL;
static GamesPluginIface * games_play_station_games_plugin_parent_iface = NULL;
static GType games_play_station_type_id = 0;

GType games_play_station_get_type (void) G_GNUC_CONST;
enum  {
	GAMES_PLAY_STATION_0_PROPERTY
};
#define GAMES_PLAY_STATION_MIME_TYPE "application/x-cue"
static gchar** games_play_station_real_get_mime_types (GamesPlugin* base, int* result_length1);
static GamesUriGameFactory** games_play_station_real_get_uri_game_factories (GamesPlugin* base, int* result_length1);
GType games_play_station_game_factory_get_type (void) G_GNUC_CONST;
GamesPlayStationGameFactory* games_play_station_game_factory_new (void);
GamesPlayStationGameFactory* games_play_station_game_factory_construct (GType object_type);
GamesPlayStation* games_play_station_new (void);
GamesPlayStation* games_play_station_construct (GType object_type);
GType register_games_plugin (GTypeModule* module);
GType games_play_station_game_factory_register_type (GTypeModule * module);
GType games_play_station_header_register_type (GTypeModule * module);
GType games_play_station_register_type (GTypeModule * module);
GType games_play_station_uid_register_type (GTypeModule * module);


static gchar** games_play_station_real_get_mime_types (GamesPlugin* base, int* result_length1) {
	GamesPlayStation * self;
	gchar** result = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	self = (GamesPlayStation*) base;
	_tmp0_ = g_strdup (GAMES_PLAY_STATION_MIME_TYPE);
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp2__length1 = 1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}


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


static GamesUriGameFactory** games_play_station_real_get_uri_game_factories (GamesPlugin* base, int* result_length1) {
	GamesPlayStation * self;
	GamesUriGameFactory** result = NULL;
	GamesPlayStationGameFactory* factory = NULL;
	GamesPlayStationGameFactory* _tmp0_;
	GamesUriGameFactory* _tmp1_;
	GamesUriGameFactory** _tmp2_;
	GamesUriGameFactory** _tmp3_;
	gint _tmp3__length1;
	self = (GamesPlayStation*) base;
	_tmp0_ = games_play_station_game_factory_new ();
	factory = _tmp0_;
	_tmp1_ = _g_object_ref0 ((GamesUriGameFactory*) factory);
	_tmp2_ = g_new0 (GamesUriGameFactory*, 1 + 1);
	_tmp2_[0] = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 1;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	_g_object_unref0 (factory);
	return result;
}


GamesPlayStation* games_play_station_construct (GType object_type) {
	GamesPlayStation * self = NULL;
	self = (GamesPlayStation*) g_object_new (object_type, NULL);
	return self;
}


GamesPlayStation* games_play_station_new (void) {
	return games_play_station_construct (GAMES_TYPE_PLAY_STATION);
}


static void games_play_station_class_init (GamesPlayStationClass * klass) {
	games_play_station_parent_class = g_type_class_peek_parent (klass);
}


static void games_play_station_games_plugin_interface_init (GamesPluginIface * iface) {
	games_play_station_games_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_mime_types = (gchar** (*) (GamesPlugin *, int*)) games_play_station_real_get_mime_types;
	iface->get_uri_game_factories = (GamesUriGameFactory** (*) (GamesPlugin *, int*)) games_play_station_real_get_uri_game_factories;
}


static void games_play_station_instance_init (GamesPlayStation * self) {
}


GType games_play_station_get_type (void) {
	return games_play_station_type_id;
}


GType games_play_station_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (GamesPlayStationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_play_station_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesPlayStation), 0, (GInstanceInitFunc) games_play_station_instance_init, NULL };
	static const GInterfaceInfo games_plugin_info = { (GInterfaceInitFunc) games_play_station_games_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	games_play_station_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "GamesPlayStation", &g_define_type_info, 0);
	g_type_module_add_interface (module, games_play_station_type_id, GAMES_TYPE_PLUGIN, &games_plugin_info);
	return games_play_station_type_id;
}


GType register_games_plugin (GTypeModule* module) {
	GType result = 0UL;
	g_return_val_if_fail (module != NULL, 0UL);
	games_play_station_game_factory_register_type (module);
	games_play_station_header_register_type (module);
	games_play_station_register_type (module);
	games_play_station_uid_register_type (module);
	result = GAMES_TYPE_PLAY_STATION;
	return result;
}



