/* uri-game-factory.c generated by valac 0.36.12.13-3ae08, the Vala compiler
 * generated from uri-game-factory.vala, do not modify */

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

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


#define GAMES_TYPE_URI_GAME_FACTORY (games_uri_game_factory_get_type ())
#define GAMES_URI_GAME_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_URI_GAME_FACTORY, GamesUriGameFactory))
#define GAMES_IS_URI_GAME_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_URI_GAME_FACTORY))
#define GAMES_URI_GAME_FACTORY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_URI_GAME_FACTORY, GamesUriGameFactoryIface))

typedef struct _GamesUriGameFactory GamesUriGameFactory;
typedef struct _GamesUriGameFactoryIface GamesUriGameFactoryIface;

#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;
enum  {
	GAMES_URI_GAME_FACTORY_GAME_ADDED_SIGNAL,
	GAMES_URI_GAME_FACTORY_NUM_SIGNALS
};
static guint games_uri_game_factory_signals[GAMES_URI_GAME_FACTORY_NUM_SIGNALS] = {0};

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

typedef void (*GamesGameCallback) (GamesGame* game, void* user_data);
struct _GamesUriGameFactoryIface {
	GTypeInterface parent_iface;
	gchar** (*get_mime_types) (GamesUriGameFactory* self, int* result_length1);
	gchar** (*get_schemes) (GamesUriGameFactory* self, int* result_length1);
	void (*add_uri) (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*add_uri_finish) (GamesUriGameFactory* self, GAsyncResult* _res_);
	void (*query_game_for_uri) (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GamesGame* (*query_game_for_uri_finish) (GamesUriGameFactory* self, GAsyncResult* _res_);
	void (*foreach_game) (GamesUriGameFactory* self, GamesGameCallback game_callback, void* game_callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*foreach_game_finish) (GamesUriGameFactory* self, GAsyncResult* _res_);
};



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_uri_game_factory_get_type (void) G_GNUC_CONST;
gchar** games_uri_game_factory_get_mime_types (GamesUriGameFactory* self, int* result_length1);
static gchar** games_uri_game_factory_real_get_mime_types (GamesUriGameFactory* self, int* result_length1);
gchar** games_uri_game_factory_get_schemes (GamesUriGameFactory* self, int* result_length1);
static gchar** games_uri_game_factory_real_get_schemes (GamesUriGameFactory* self, int* result_length1);
void games_uri_game_factory_add_uri (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
void games_uri_game_factory_add_uri_finish (GamesUriGameFactory* self, GAsyncResult* _res_);
void games_uri_game_factory_query_game_for_uri (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
GamesGame* games_uri_game_factory_query_game_for_uri_finish (GamesUriGameFactory* self, GAsyncResult* _res_);
void games_uri_game_factory_foreach_game (GamesUriGameFactory* self, GamesGameCallback game_callback, void* game_callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
void games_uri_game_factory_foreach_game_finish (GamesUriGameFactory* self, GAsyncResult* _res_);


static gchar** games_uri_game_factory_real_get_mime_types (GamesUriGameFactory* self, int* result_length1) {
	gchar** result = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}


gchar** games_uri_game_factory_get_mime_types (GamesUriGameFactory* self, int* result_length1) {
	g_return_val_if_fail (self != NULL, NULL);
	return GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->get_mime_types (self, result_length1);
}


static gchar** games_uri_game_factory_real_get_schemes (GamesUriGameFactory* self, int* result_length1) {
	gchar** result = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}


gchar** games_uri_game_factory_get_schemes (GamesUriGameFactory* self, int* result_length1) {
	g_return_val_if_fail (self != NULL, NULL);
	return GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->get_schemes (self, result_length1);
}


void games_uri_game_factory_add_uri (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->add_uri (self, uri, _callback_, _user_data_);
}


void games_uri_game_factory_add_uri_finish (GamesUriGameFactory* self, GAsyncResult* _res_) {
	GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->add_uri_finish (self, _res_);
}


void games_uri_game_factory_query_game_for_uri (GamesUriGameFactory* self, GamesUri* uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->query_game_for_uri (self, uri, _callback_, _user_data_);
}


GamesGame* games_uri_game_factory_query_game_for_uri_finish (GamesUriGameFactory* self, GAsyncResult* _res_) {
	return GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->query_game_for_uri_finish (self, _res_);
}


void games_uri_game_factory_foreach_game (GamesUriGameFactory* self, GamesGameCallback game_callback, void* game_callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->foreach_game (self, game_callback, game_callback_target, _callback_, _user_data_);
}


void games_uri_game_factory_foreach_game_finish (GamesUriGameFactory* self, GAsyncResult* _res_) {
	GAMES_URI_GAME_FACTORY_GET_INTERFACE (self)->foreach_game_finish (self, _res_);
}


static void games_uri_game_factory_base_init (GamesUriGameFactoryIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		games_uri_game_factory_signals[GAMES_URI_GAME_FACTORY_GAME_ADDED_SIGNAL] = g_signal_new ("game-added", GAMES_TYPE_URI_GAME_FACTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GAMES_TYPE_GAME);
		iface->get_mime_types = games_uri_game_factory_real_get_mime_types;
		iface->get_schemes = games_uri_game_factory_real_get_schemes;
	}
}


GType games_uri_game_factory_get_type (void) {
	static volatile gsize games_uri_game_factory_type_id__volatile = 0;
	if (g_once_init_enter (&games_uri_game_factory_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesUriGameFactoryIface), (GBaseInitFunc) games_uri_game_factory_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType games_uri_game_factory_type_id;
		games_uri_game_factory_type_id = g_type_register_static (G_TYPE_INTERFACE, "GamesUriGameFactory", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (games_uri_game_factory_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&games_uri_game_factory_type_id__volatile, games_uri_game_factory_type_id);
	}
	return games_uri_game_factory_type_id__volatile;
}



