/* retro-simple-game-uri-adapter.c generated by valac 0.36.1.39-72bb2, the Vala compiler
 * generated from retro-simple-game-uri-adapter.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>


#define GAMES_TYPE_GAME_URI_ADAPTER (games_game_uri_adapter_get_type ())
#define GAMES_GAME_URI_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAME_URI_ADAPTER, GamesGameUriAdapter))
#define GAMES_IS_GAME_URI_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAME_URI_ADAPTER))
#define GAMES_GAME_URI_ADAPTER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_GAME_URI_ADAPTER, GamesGameUriAdapterIface))

typedef struct _GamesGameUriAdapter GamesGameUriAdapter;
typedef struct _GamesGameUriAdapterIface GamesGameUriAdapterIface;

#define GAMES_TYPE_URI (games_uri_get_type ())
#define GAMES_URI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_URI, GamesUri))
#define GAMES_URI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_URI, GamesUriClass))
#define GAMES_IS_URI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_URI))
#define GAMES_IS_URI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_URI))
#define GAMES_URI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_URI, GamesUriClass))

typedef struct _GamesUri GamesUri;
typedef struct _GamesUriClass GamesUriClass;

#define GAMES_TYPE_GAME (games_game_get_type ())
#define GAMES_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAME, GamesGame))
#define GAMES_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAME))
#define GAMES_GAME_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_GAME, GamesGameIface))

typedef struct _GamesGame GamesGame;
typedef struct _GamesGameIface GamesGameIface;

#define GAMES_TYPE_ICON (games_icon_get_type ())
#define GAMES_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_ICON, GamesIcon))
#define GAMES_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_ICON))
#define GAMES_ICON_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_ICON, GamesIconIface))

typedef struct _GamesIcon GamesIcon;
typedef struct _GamesIconIface GamesIconIface;

#define GAMES_TYPE_COVER (games_cover_get_type ())
#define GAMES_COVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_COVER, GamesCover))
#define GAMES_IS_COVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_COVER))
#define GAMES_COVER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_COVER, GamesCoverIface))

typedef struct _GamesCover GamesCover;
typedef struct _GamesCoverIface GamesCoverIface;

#define GAMES_TYPE_RUNNER (games_runner_get_type ())
#define GAMES_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RUNNER, GamesRunner))
#define GAMES_IS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RUNNER))
#define GAMES_RUNNER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_RUNNER, GamesRunnerIface))

typedef struct _GamesRunner GamesRunner;
typedef struct _GamesRunnerIface GamesRunnerIface;

#define GAMES_TYPE_MEDIA_SET (games_media_set_get_type ())
#define GAMES_MEDIA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_MEDIA_SET, GamesMediaSet))
#define GAMES_MEDIA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_MEDIA_SET, GamesMediaSetClass))
#define GAMES_IS_MEDIA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_MEDIA_SET))
#define GAMES_IS_MEDIA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_MEDIA_SET))
#define GAMES_MEDIA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_MEDIA_SET, GamesMediaSetClass))

typedef struct _GamesMediaSet GamesMediaSet;
typedef struct _GamesMediaSetClass GamesMediaSetClass;

#define GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER (games_retro_simple_game_uri_adapter_get_type ())
#define GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, GamesRetroSimpleGameUriAdapter))
#define GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, GamesRetroSimpleGameUriAdapterClass))
#define GAMES_IS_RETRO_SIMPLE_GAME_URI_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER))
#define GAMES_IS_RETRO_SIMPLE_GAME_URI_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER))
#define GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, GamesRetroSimpleGameUriAdapterClass))

typedef struct _GamesRetroSimpleGameUriAdapter GamesRetroSimpleGameUriAdapter;
typedef struct _GamesRetroSimpleGameUriAdapterClass GamesRetroSimpleGameUriAdapterClass;
typedef struct _GamesRetroSimpleGameUriAdapterPrivate GamesRetroSimpleGameUriAdapterPrivate;

#define GAMES_TYPE_RETRO_SIMPLE_TYPE (games_retro_simple_type_get_type ())
typedef struct _GamesRetroSimpleType GamesRetroSimpleType;
enum  {
	GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_DUMMY_PROPERTY,
	GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_LAST_PROPERTY
};
static GParamSpec* games_retro_simple_game_uri_adapter_properties[GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_LAST_PROPERTY];
#define _games_uri_unref0(var) ((var == NULL) ? NULL : (var = (games_uri_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GAMES_TYPE_FINGERPRINT_UID (games_fingerprint_uid_get_type ())
#define GAMES_FINGERPRINT_UID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_FINGERPRINT_UID, GamesFingerprintUid))
#define GAMES_FINGERPRINT_UID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_FINGERPRINT_UID, GamesFingerprintUidClass))
#define GAMES_IS_FINGERPRINT_UID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_FINGERPRINT_UID))
#define GAMES_IS_FINGERPRINT_UID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_FINGERPRINT_UID))
#define GAMES_FINGERPRINT_UID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_FINGERPRINT_UID, GamesFingerprintUidClass))

typedef struct _GamesFingerprintUid GamesFingerprintUid;
typedef struct _GamesFingerprintUidClass GamesFingerprintUidClass;

#define GAMES_TYPE_FILENAME_TITLE (games_filename_title_get_type ())
#define GAMES_FILENAME_TITLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_FILENAME_TITLE, GamesFilenameTitle))
#define GAMES_FILENAME_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_FILENAME_TITLE, GamesFilenameTitleClass))
#define GAMES_IS_FILENAME_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_FILENAME_TITLE))
#define GAMES_IS_FILENAME_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_FILENAME_TITLE))
#define GAMES_FILENAME_TITLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_FILENAME_TITLE, GamesFilenameTitleClass))

typedef struct _GamesFilenameTitle GamesFilenameTitle;
typedef struct _GamesFilenameTitleClass GamesFilenameTitleClass;

#define GAMES_TYPE_DUMMY_ICON (games_dummy_icon_get_type ())
#define GAMES_DUMMY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_DUMMY_ICON, GamesDummyIcon))
#define GAMES_DUMMY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_DUMMY_ICON, GamesDummyIconClass))
#define GAMES_IS_DUMMY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_DUMMY_ICON))
#define GAMES_IS_DUMMY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_DUMMY_ICON))
#define GAMES_DUMMY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_DUMMY_ICON, GamesDummyIconClass))

typedef struct _GamesDummyIcon GamesDummyIcon;
typedef struct _GamesDummyIconClass GamesDummyIconClass;

#define GAMES_TYPE_GRILO_MEDIA (games_grilo_media_get_type ())
#define GAMES_GRILO_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GRILO_MEDIA, GamesGriloMedia))
#define GAMES_GRILO_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GRILO_MEDIA, GamesGriloMediaClass))
#define GAMES_IS_GRILO_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GRILO_MEDIA))
#define GAMES_IS_GRILO_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GRILO_MEDIA))
#define GAMES_GRILO_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GRILO_MEDIA, GamesGriloMediaClass))

typedef struct _GamesGriloMedia GamesGriloMedia;
typedef struct _GamesGriloMediaClass GamesGriloMediaClass;

#define GAMES_TYPE_TITLE (games_title_get_type ())
#define GAMES_TITLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_TITLE, GamesTitle))
#define GAMES_IS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_TITLE))
#define GAMES_TITLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_TITLE, GamesTitleIface))

typedef struct _GamesTitle GamesTitle;
typedef struct _GamesTitleIface GamesTitleIface;

#define GAMES_TYPE_COMPOSITE_COVER (games_composite_cover_get_type ())
#define GAMES_COMPOSITE_COVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_COMPOSITE_COVER, GamesCompositeCover))
#define GAMES_COMPOSITE_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_COMPOSITE_COVER, GamesCompositeCoverClass))
#define GAMES_IS_COMPOSITE_COVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_COMPOSITE_COVER))
#define GAMES_IS_COMPOSITE_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_COMPOSITE_COVER))
#define GAMES_COMPOSITE_COVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_COMPOSITE_COVER, GamesCompositeCoverClass))

typedef struct _GamesCompositeCover GamesCompositeCover;
typedef struct _GamesCompositeCoverClass GamesCompositeCoverClass;

#define GAMES_TYPE_LOCAL_COVER (games_local_cover_get_type ())
#define GAMES_LOCAL_COVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_LOCAL_COVER, GamesLocalCover))
#define GAMES_LOCAL_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_LOCAL_COVER, GamesLocalCoverClass))
#define GAMES_IS_LOCAL_COVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_LOCAL_COVER))
#define GAMES_IS_LOCAL_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_LOCAL_COVER))
#define GAMES_LOCAL_COVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_LOCAL_COVER, GamesLocalCoverClass))

typedef struct _GamesLocalCover GamesLocalCover;
typedef struct _GamesLocalCoverClass GamesLocalCoverClass;

#define GAMES_TYPE_UID (games_uid_get_type ())
#define GAMES_UID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_UID, GamesUid))
#define GAMES_IS_UID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_UID))
#define GAMES_UID_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_UID, GamesUidIface))

typedef struct _GamesUid GamesUid;
typedef struct _GamesUidIface GamesUidIface;

#define GAMES_TYPE_GRILO_COVER (games_grilo_cover_get_type ())
#define GAMES_GRILO_COVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GRILO_COVER, GamesGriloCover))
#define GAMES_GRILO_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GRILO_COVER, GamesGriloCoverClass))
#define GAMES_IS_GRILO_COVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GRILO_COVER))
#define GAMES_IS_GRILO_COVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GRILO_COVER))
#define GAMES_GRILO_COVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GRILO_COVER, GamesGriloCoverClass))

typedef struct _GamesGriloCover GamesGriloCover;
typedef struct _GamesGriloCoverClass GamesGriloCoverClass;

#define GAMES_TYPE_RETRO_CORE_SOURCE (games_retro_core_source_get_type ())
#define GAMES_RETRO_CORE_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RETRO_CORE_SOURCE, GamesRetroCoreSource))
#define GAMES_RETRO_CORE_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_RETRO_CORE_SOURCE, GamesRetroCoreSourceClass))
#define GAMES_IS_RETRO_CORE_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RETRO_CORE_SOURCE))
#define GAMES_IS_RETRO_CORE_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_RETRO_CORE_SOURCE))
#define GAMES_RETRO_CORE_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_RETRO_CORE_SOURCE, GamesRetroCoreSourceClass))

typedef struct _GamesRetroCoreSource GamesRetroCoreSource;
typedef struct _GamesRetroCoreSourceClass GamesRetroCoreSourceClass;

#define GAMES_TYPE_RETRO_RUNNER (games_retro_runner_get_type ())
#define GAMES_RETRO_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RETRO_RUNNER, GamesRetroRunner))
#define GAMES_RETRO_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_RETRO_RUNNER, GamesRetroRunnerClass))
#define GAMES_IS_RETRO_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RETRO_RUNNER))
#define GAMES_IS_RETRO_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_RETRO_RUNNER))
#define GAMES_RETRO_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_RETRO_RUNNER, GamesRetroRunnerClass))

typedef struct _GamesRetroRunner GamesRetroRunner;
typedef struct _GamesRetroRunnerClass GamesRetroRunnerClass;

#define GAMES_TYPE_GENERIC_GAME (games_generic_game_get_type ())
#define GAMES_GENERIC_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GENERIC_GAME, GamesGenericGame))
#define GAMES_GENERIC_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GENERIC_GAME, GamesGenericGameClass))
#define GAMES_IS_GENERIC_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GENERIC_GAME))
#define GAMES_IS_GENERIC_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GENERIC_GAME))
#define GAMES_GENERIC_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GENERIC_GAME, GamesGenericGameClass))

typedef struct _GamesGenericGame GamesGenericGame;
typedef struct _GamesGenericGameClass GamesGenericGameClass;
typedef struct _GamesRetroSimpleGameUriAdapterGameForUriData GamesRetroSimpleGameUriAdapterGameForUriData;

struct _GamesIconIface {
	GTypeInterface parent_iface;
	GIcon* (*get_icon) (GamesIcon* self);
};

struct _GamesCoverIface {
	GTypeInterface parent_iface;
	GIcon* (*get_cover) (GamesCover* self);
};

struct _GamesRunnerIface {
	GTypeInterface parent_iface;
	gboolean (*check_is_valid) (GamesRunner* self, gchar* * error_message, GError** error);
	GtkWidget* (*get_display) (GamesRunner* self);
	void (*start) (GamesRunner* self, GError** error);
	void (*resume) (GamesRunner* self, GError** error);
	void (*pause) (GamesRunner* self);
	void (*stop) (GamesRunner* self);
	gboolean (*get_can_fullscreen) (GamesRunner* self);
	gboolean (*get_can_quit_safely) (GamesRunner* self);
	gboolean (*get_can_resume) (GamesRunner* self);
	GamesMediaSet* (*get_media_set) (GamesRunner* self);
};

struct _GamesGameIface {
	GTypeInterface parent_iface;
	GamesIcon* (*get_icon) (GamesGame* self);
	GamesCover* (*get_cover) (GamesGame* self);
	GamesRunner* (*get_runner) (GamesGame* self, GError** error);
	const gchar* (*get_name) (GamesGame* self);
};

struct _GamesGameUriAdapterIface {
	GTypeInterface parent_iface;
	void (*game_for_uri) (GamesGameUriAdapter* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GamesGame* (*game_for_uri_finish) (GamesGameUriAdapter* self, GAsyncResult* _res_, GError** error);
};

struct _GamesRetroSimpleGameUriAdapter {
	GObject parent_instance;
	GamesRetroSimpleGameUriAdapterPrivate * priv;
};

struct _GamesRetroSimpleGameUriAdapterClass {
	GObjectClass parent_class;
};

struct _GamesRetroSimpleType {
	gchar* mime_type;
	gboolean search_mime_type;
	gchar* platform;
	gchar* prefix;
};

struct _GamesRetroSimpleGameUriAdapterPrivate {
	GamesRetroSimpleType simple_type;
};

struct _GamesTitleIface {
	GTypeInterface parent_iface;
	gchar* (*get_title) (GamesTitle* self, GError** error);
};

struct _GamesUidIface {
	GTypeInterface parent_iface;
	gchar* (*get_uid) (GamesUid* self, GError** error);
};

struct _GamesRetroSimpleGameUriAdapterGameForUriData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean _task_complete_;
	GamesRetroSimpleGameUriAdapter* self;
	GamesUri* uri;
	GamesGame* result;
	GamesFingerprintUid* uid;
	GamesUri* _tmp0_;
	GamesRetroSimpleType _tmp1_;
	const gchar* _tmp2_;
	GamesFingerprintUid* _tmp3_;
	GamesFilenameTitle* title;
	GamesUri* _tmp4_;
	GamesFilenameTitle* _tmp5_;
	GamesDummyIcon* icon;
	GamesDummyIcon* _tmp6_;
	GamesGriloMedia* media;
	GamesRetroSimpleType _tmp7_;
	const gchar* _tmp8_;
	GamesGriloMedia* _tmp9_;
	GamesCompositeCover* cover;
	GamesUri* _tmp10_;
	GamesLocalCover* _tmp11_;
	GamesGriloCover* _tmp12_;
	GamesCover** _tmp13_;
	GamesCover** _tmp14_;
	gint _tmp14__length1;
	GamesCompositeCover* _tmp15_;
	GamesCompositeCover* _tmp16_;
	GamesRetroCoreSource* core_source;
	GamesRetroSimpleType _tmp17_;
	const gchar* _tmp18_;
	GamesRetroSimpleType _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	gchar** _tmp22_;
	gchar** _tmp23_;
	gint _tmp23__length1;
	GamesRetroCoreSource* _tmp24_;
	GamesRetroCoreSource* _tmp25_;
	GamesRetroRunner* runner;
	GamesUri* _tmp26_;
	GamesRetroRunner* _tmp27_;
	GamesGenericGame* _tmp28_;
};


static gpointer games_retro_simple_game_uri_adapter_parent_class = NULL;
static GamesGameUriAdapterIface * games_retro_simple_game_uri_adapter_games_game_uri_adapter_parent_iface = NULL;

gpointer games_uri_ref (gpointer instance);
void games_uri_unref (gpointer instance);
GParamSpec* games_param_spec_uri (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void games_value_set_uri (GValue* value, gpointer v_object);
void games_value_take_uri (GValue* value, gpointer v_object);
gpointer games_value_get_uri (const GValue* value);
GType games_uri_get_type (void) G_GNUC_CONST;
GType games_icon_get_type (void) G_GNUC_CONST;
GType games_cover_get_type (void) G_GNUC_CONST;
GType games_media_set_get_type (void) G_GNUC_CONST;
GType games_runner_get_type (void) G_GNUC_CONST;
GType games_game_get_type (void) G_GNUC_CONST;
GType games_game_uri_adapter_get_type (void) G_GNUC_CONST;
GType games_retro_simple_game_uri_adapter_get_type (void) G_GNUC_CONST;
GType games_retro_simple_type_get_type (void) G_GNUC_CONST;
GamesRetroSimpleType* games_retro_simple_type_dup (const GamesRetroSimpleType* self);
void games_retro_simple_type_free (GamesRetroSimpleType* self);
void games_retro_simple_type_copy (const GamesRetroSimpleType* self, GamesRetroSimpleType* dest);
void games_retro_simple_type_destroy (GamesRetroSimpleType* self);
#define GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, GamesRetroSimpleGameUriAdapterPrivate))
GamesRetroSimpleGameUriAdapter* games_retro_simple_game_uri_adapter_new (GamesRetroSimpleType* simple_type);
GamesRetroSimpleGameUriAdapter* games_retro_simple_game_uri_adapter_construct (GType object_type, GamesRetroSimpleType* simple_type);
static void games_retro_simple_game_uri_adapter_real_game_for_uri_data_free (gpointer _data);
static void games_retro_simple_game_uri_adapter_real_game_for_uri (GamesGameUriAdapter* base, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean games_retro_simple_game_uri_adapter_real_game_for_uri_co (GamesRetroSimpleGameUriAdapterGameForUriData* _data_);
void games_game_uri_adapter_game_for_uri (GamesGameUriAdapter* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
GamesGame* games_game_uri_adapter_game_for_uri_finish (GamesGameUriAdapter* self, GAsyncResult* _res_, GError** error);
static gboolean _games_retro_simple_game_uri_adapter_real_game_for_uri_co_gsource_func (gpointer self);
GType games_fingerprint_uid_get_type (void) G_GNUC_CONST;
GamesFingerprintUid* games_fingerprint_uid_new (GamesUri* uri, const gchar* prefix);
GamesFingerprintUid* games_fingerprint_uid_construct (GType object_type, GamesUri* uri, const gchar* prefix);
GType games_filename_title_get_type (void) G_GNUC_CONST;
GamesFilenameTitle* games_filename_title_new (GamesUri* uri);
GamesFilenameTitle* games_filename_title_construct (GType object_type, GamesUri* uri);
GType games_dummy_icon_get_type (void) G_GNUC_CONST;
GamesDummyIcon* games_dummy_icon_new (void);
GamesDummyIcon* games_dummy_icon_construct (GType object_type);
GType games_grilo_media_get_type (void) G_GNUC_CONST;
GType games_title_get_type (void) G_GNUC_CONST;
GamesGriloMedia* games_grilo_media_new (GamesTitle* title, const gchar* mime_type);
GamesGriloMedia* games_grilo_media_construct (GType object_type, GamesTitle* title, const gchar* mime_type);
GType games_composite_cover_get_type (void) G_GNUC_CONST;
GamesLocalCover* games_local_cover_new (GamesUri* uri);
GamesLocalCover* games_local_cover_construct (GType object_type, GamesUri* uri);
GType games_local_cover_get_type (void) G_GNUC_CONST;
GType games_uid_get_type (void) G_GNUC_CONST;
GamesGriloCover* games_grilo_cover_new (GamesGriloMedia* media, GamesUid* uid);
GamesGriloCover* games_grilo_cover_construct (GType object_type, GamesGriloMedia* media, GamesUid* uid);
GType games_grilo_cover_get_type (void) G_GNUC_CONST;
GamesCompositeCover* games_composite_cover_new (GamesCover** covers, int covers_length1);
GamesCompositeCover* games_composite_cover_construct (GType object_type, GamesCover** covers, int covers_length1);
GType games_retro_core_source_get_type (void) G_GNUC_CONST;
GamesRetroCoreSource* games_retro_core_source_new (const gchar* platform, gchar** mime_types, int mime_types_length1);
GamesRetroCoreSource* games_retro_core_source_construct (GType object_type, const gchar* platform, gchar** mime_types, int mime_types_length1);
GType games_retro_runner_get_type (void) G_GNUC_CONST;
GamesRetroRunner* games_retro_runner_new (GamesRetroCoreSource* core_source, GamesUri* uri, GamesUid* uid, GamesTitle* game_title);
GamesRetroRunner* games_retro_runner_construct (GType object_type, GamesRetroCoreSource* core_source, GamesUri* uri, GamesUid* uid, GamesTitle* game_title);
GamesGenericGame* games_generic_game_new (GamesTitle* title, GamesIcon* icon, GamesCover* cover, GamesRunner* runner);
GamesGenericGame* games_generic_game_construct (GType object_type, GamesTitle* title, GamesIcon* icon, GamesCover* cover, GamesRunner* runner);
GType games_generic_game_get_type (void) G_GNUC_CONST;
static void games_retro_simple_game_uri_adapter_finalize (GObject * obj);
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);


GamesRetroSimpleGameUriAdapter* games_retro_simple_game_uri_adapter_construct (GType object_type, GamesRetroSimpleType* simple_type) {
	GamesRetroSimpleGameUriAdapter * self = NULL;
	GamesRetroSimpleType _tmp0_;
	GamesRetroSimpleType _tmp1_ = {0};
	g_return_val_if_fail (simple_type != NULL, NULL);
	self = (GamesRetroSimpleGameUriAdapter*) g_object_new (object_type, NULL);
	_tmp0_ = *simple_type;
	games_retro_simple_type_copy (&_tmp0_, &_tmp1_);
	games_retro_simple_type_destroy (&self->priv->simple_type);
	self->priv->simple_type = _tmp1_;
	return self;
}


GamesRetroSimpleGameUriAdapter* games_retro_simple_game_uri_adapter_new (GamesRetroSimpleType* simple_type) {
	return games_retro_simple_game_uri_adapter_construct (GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, simple_type);
}


static void games_retro_simple_game_uri_adapter_real_game_for_uri_data_free (gpointer _data) {
	GamesRetroSimpleGameUriAdapterGameForUriData* _data_;
	_data_ = _data;
	_games_uri_unref0 (_data_->uri);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (GamesRetroSimpleGameUriAdapterGameForUriData, _data_);
}


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


static gpointer _games_uri_ref0 (gpointer self) {
	return self ? games_uri_ref (self) : NULL;
}


static void games_retro_simple_game_uri_adapter_real_game_for_uri (GamesGameUriAdapter* base, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GamesRetroSimpleGameUriAdapter * self;
	GamesRetroSimpleGameUriAdapterGameForUriData* _data_;
	GamesRetroSimpleGameUriAdapter* _tmp0_;
	GamesUri* _tmp1_;
	GamesUri* _tmp2_;
	self = (GamesRetroSimpleGameUriAdapter*) base;
	_data_ = g_slice_new0 (GamesRetroSimpleGameUriAdapterGameForUriData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	if (_callback_ == NULL) {
		_data_->_task_complete_ = TRUE;
	}
	g_task_set_task_data (_data_->_async_result, _data_, games_retro_simple_game_uri_adapter_real_game_for_uri_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = uri;
	_tmp2_ = _games_uri_ref0 (_tmp1_);
	_games_uri_unref0 (_data_->uri);
	_data_->uri = _tmp2_;
	games_retro_simple_game_uri_adapter_real_game_for_uri_co (_data_);
}


static GamesGame* games_retro_simple_game_uri_adapter_real_game_for_uri_finish (GamesGameUriAdapter* base, GAsyncResult* _res_, GError** error) {
	GamesGame* result;
	GamesRetroSimpleGameUriAdapterGameForUriData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	_data_->_task_complete_ = TRUE;
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static gboolean _games_retro_simple_game_uri_adapter_real_game_for_uri_co_gsource_func (gpointer self) {
	gboolean result;
	result = games_retro_simple_game_uri_adapter_real_game_for_uri_co (self);
	return result;
}


static gboolean games_retro_simple_game_uri_adapter_real_game_for_uri_co (GamesRetroSimpleGameUriAdapterGameForUriData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _games_retro_simple_game_uri_adapter_real_game_for_uri_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp0_ = _data_->uri;
	_data_->_tmp1_ = _data_->self->priv->simple_type;
	_data_->_tmp2_ = _data_->_tmp1_.prefix;
	_data_->_tmp3_ = games_fingerprint_uid_new (_data_->_tmp0_, _data_->_tmp2_);
	_data_->uid = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->uri;
	_data_->_tmp5_ = games_filename_title_new (_data_->_tmp4_);
	_data_->title = _data_->_tmp5_;
	_data_->_tmp6_ = games_dummy_icon_new ();
	_data_->icon = _data_->_tmp6_;
	_data_->_tmp7_ = _data_->self->priv->simple_type;
	_data_->_tmp8_ = _data_->_tmp7_.mime_type;
	_data_->_tmp9_ = games_grilo_media_new ((GamesTitle*) _data_->title, _data_->_tmp8_);
	_data_->media = _data_->_tmp9_;
	_data_->_tmp10_ = _data_->uri;
	_data_->_tmp11_ = games_local_cover_new (_data_->_tmp10_);
	_data_->_tmp12_ = games_grilo_cover_new (_data_->media, (GamesUid*) _data_->uid);
	_data_->_tmp13_ = g_new0 (GamesCover*, 2 + 1);
	_data_->_tmp13_[0] = (GamesCover*) _data_->_tmp11_;
	_data_->_tmp13_[1] = (GamesCover*) _data_->_tmp12_;
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp14__length1 = 2;
	_data_->_tmp15_ = games_composite_cover_new (_data_->_tmp14_, 2);
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp14_ = (_vala_array_free (_data_->_tmp14_, _data_->_tmp14__length1, (GDestroyNotify) g_object_unref), NULL);
	_data_->cover = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->self->priv->simple_type;
	_data_->_tmp18_ = _data_->_tmp17_.platform;
	_data_->_tmp19_ = _data_->self->priv->simple_type;
	_data_->_tmp20_ = _data_->_tmp19_.mime_type;
	_data_->_tmp21_ = g_strdup (_data_->_tmp20_);
	_data_->_tmp22_ = g_new0 (gchar*, 1 + 1);
	_data_->_tmp22_[0] = _data_->_tmp21_;
	_data_->_tmp23_ = _data_->_tmp22_;
	_data_->_tmp23__length1 = 1;
	_data_->_tmp24_ = games_retro_core_source_new (_data_->_tmp18_, _data_->_tmp23_, 1);
	_data_->_tmp25_ = _data_->_tmp24_;
	_data_->_tmp23_ = (_vala_array_free (_data_->_tmp23_, _data_->_tmp23__length1, (GDestroyNotify) g_free), NULL);
	_data_->core_source = _data_->_tmp25_;
	_data_->_tmp26_ = _data_->uri;
	_data_->_tmp27_ = games_retro_runner_new (_data_->core_source, _data_->_tmp26_, (GamesUid*) _data_->uid, (GamesTitle*) _data_->title);
	_data_->runner = _data_->_tmp27_;
	_data_->_tmp28_ = games_generic_game_new ((GamesTitle*) _data_->title, (GamesIcon*) _data_->icon, (GamesCover*) _data_->cover, (GamesRunner*) _data_->runner);
	_data_->result = (GamesGame*) _data_->_tmp28_;
	_g_object_unref0 (_data_->runner);
	_g_object_unref0 (_data_->core_source);
	_g_object_unref0 (_data_->cover);
	_g_object_unref0 (_data_->media);
	_g_object_unref0 (_data_->icon);
	_g_object_unref0 (_data_->title);
	_g_object_unref0 (_data_->uid);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (_data_->_task_complete_ != TRUE) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void games_retro_simple_game_uri_adapter_class_init (GamesRetroSimpleGameUriAdapterClass * klass) {
	games_retro_simple_game_uri_adapter_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesRetroSimpleGameUriAdapterPrivate));
	G_OBJECT_CLASS (klass)->finalize = games_retro_simple_game_uri_adapter_finalize;
}


static void games_retro_simple_game_uri_adapter_games_game_uri_adapter_interface_init (GamesGameUriAdapterIface * iface) {
	games_retro_simple_game_uri_adapter_games_game_uri_adapter_parent_iface = g_type_interface_peek_parent (iface);
	iface->game_for_uri = (void (*) (GamesGameUriAdapter *, GamesUri*, GAsyncReadyCallback, gpointer)) games_retro_simple_game_uri_adapter_real_game_for_uri;
	iface->game_for_uri_finish = (GamesGame* (*) (GamesGameUriAdapter *, GAsyncResult*, GError**)) games_retro_simple_game_uri_adapter_real_game_for_uri_finish;
}


static void games_retro_simple_game_uri_adapter_instance_init (GamesRetroSimpleGameUriAdapter * self) {
	self->priv = GAMES_RETRO_SIMPLE_GAME_URI_ADAPTER_GET_PRIVATE (self);
}


static void games_retro_simple_game_uri_adapter_finalize (GObject * obj) {
	GamesRetroSimpleGameUriAdapter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_RETRO_SIMPLE_GAME_URI_ADAPTER, GamesRetroSimpleGameUriAdapter);
	games_retro_simple_type_destroy (&self->priv->simple_type);
	G_OBJECT_CLASS (games_retro_simple_game_uri_adapter_parent_class)->finalize (obj);
}


GType games_retro_simple_game_uri_adapter_get_type (void) {
	static volatile gsize games_retro_simple_game_uri_adapter_type_id__volatile = 0;
	if (g_once_init_enter (&games_retro_simple_game_uri_adapter_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesRetroSimpleGameUriAdapterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_retro_simple_game_uri_adapter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesRetroSimpleGameUriAdapter), 0, (GInstanceInitFunc) games_retro_simple_game_uri_adapter_instance_init, NULL };
		static const GInterfaceInfo games_game_uri_adapter_info = { (GInterfaceInitFunc) games_retro_simple_game_uri_adapter_games_game_uri_adapter_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType games_retro_simple_game_uri_adapter_type_id;
		games_retro_simple_game_uri_adapter_type_id = g_type_register_static (G_TYPE_OBJECT, "GamesRetroSimpleGameUriAdapter", &g_define_type_info, 0);
		g_type_add_interface_static (games_retro_simple_game_uri_adapter_type_id, GAMES_TYPE_GAME_URI_ADAPTER, &games_game_uri_adapter_info);
		g_once_init_leave (&games_retro_simple_game_uri_adapter_type_id__volatile, games_retro_simple_game_uri_adapter_type_id);
	}
	return games_retro_simple_game_uri_adapter_type_id__volatile;
}


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);
}



