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

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

#include <glib.h>
#include <glib-object.h>
#include <sqlite3.h>


#define GAMES_TYPE_URI_SOURCE (games_uri_source_get_type ())
#define GAMES_URI_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_URI_SOURCE, GamesUriSource))
#define GAMES_IS_URI_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_URI_SOURCE))
#define GAMES_URI_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_URI_SOURCE, GamesUriSourceIface))

typedef struct _GamesUriSource GamesUriSource;
typedef struct _GamesUriSourceIface GamesUriSourceIface;

#define GAMES_TYPE_URI_ITERATOR (games_uri_iterator_get_type ())
#define GAMES_URI_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_URI_ITERATOR, GamesUriIterator))
#define GAMES_IS_URI_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_URI_ITERATOR))
#define GAMES_URI_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GAMES_TYPE_URI_ITERATOR, GamesUriIteratorIface))

typedef struct _GamesUriIterator GamesUriIterator;
typedef struct _GamesUriIteratorIface GamesUriIteratorIface;

#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_DATABASE_URI_SOURCE (games_database_uri_source_get_type ())
#define GAMES_DATABASE_URI_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_DATABASE_URI_SOURCE, GamesDatabaseUriSource))
#define GAMES_DATABASE_URI_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_DATABASE_URI_SOURCE, GamesDatabaseUriSourceClass))
#define GAMES_IS_DATABASE_URI_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_DATABASE_URI_SOURCE))
#define GAMES_IS_DATABASE_URI_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_DATABASE_URI_SOURCE))
#define GAMES_DATABASE_URI_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_DATABASE_URI_SOURCE, GamesDatabaseUriSourceClass))

typedef struct _GamesDatabaseUriSource GamesDatabaseUriSource;
typedef struct _GamesDatabaseUriSourceClass GamesDatabaseUriSourceClass;
typedef struct _GamesDatabaseUriSourcePrivate GamesDatabaseUriSourcePrivate;

#define GAMES_TYPE_DATABASE_URI_ITERATOR (games_database_uri_iterator_get_type ())
#define GAMES_DATABASE_URI_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_DATABASE_URI_ITERATOR, GamesDatabaseUriIterator))
#define GAMES_DATABASE_URI_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_DATABASE_URI_ITERATOR, GamesDatabaseUriIteratorClass))
#define GAMES_IS_DATABASE_URI_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_DATABASE_URI_ITERATOR))
#define GAMES_IS_DATABASE_URI_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_DATABASE_URI_ITERATOR))
#define GAMES_DATABASE_URI_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_DATABASE_URI_ITERATOR, GamesDatabaseUriIteratorClass))

typedef struct _GamesDatabaseUriIterator GamesDatabaseUriIterator;
typedef struct _GamesDatabaseUriIteratorClass GamesDatabaseUriIteratorClass;

struct _GamesUriIteratorIface {
	GTypeInterface parent_iface;
	GamesUri* (*get) (GamesUriIterator* self);
	gboolean (*next) (GamesUriIterator* self);
};

struct _GamesUriSourceIface {
	GTypeInterface parent_iface;
	GamesUriIterator* (*iterator) (GamesUriSource* self);
};

struct _GamesDatabaseUriSource {
	GObject parent_instance;
	GamesDatabaseUriSourcePrivate * priv;
};

struct _GamesDatabaseUriSourceClass {
	GObjectClass parent_class;
};

struct _GamesDatabaseUriSourcePrivate {
	sqlite3* database;
};


static gpointer games_database_uri_source_parent_class = NULL;
static GamesUriSourceIface * games_database_uri_source_games_uri_source_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_uri_iterator_get_type (void) G_GNUC_CONST;
GType games_uri_source_get_type (void) G_GNUC_CONST;
GType games_database_uri_source_get_type (void) G_GNUC_CONST;
#define GAMES_DATABASE_URI_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_DATABASE_URI_SOURCE, GamesDatabaseUriSourcePrivate))
enum  {
	GAMES_DATABASE_URI_SOURCE_0_PROPERTY
};
GamesDatabaseUriSource* games_database_uri_source_new (sqlite3* database);
GamesDatabaseUriSource* games_database_uri_source_construct (GType object_type, sqlite3* database);
static GamesUriIterator* games_database_uri_source_real_iterator (GamesUriSource* base);
GamesDatabaseUriIterator* games_database_uri_iterator_new (sqlite3* database);
GamesDatabaseUriIterator* games_database_uri_iterator_construct (GType object_type, sqlite3* database);
GType games_database_uri_iterator_get_type (void) G_GNUC_CONST;
static void games_database_uri_source_finalize (GObject * obj);


GamesDatabaseUriSource* games_database_uri_source_construct (GType object_type, sqlite3* database) {
	GamesDatabaseUriSource * self = NULL;
	sqlite3* _tmp0_;
	g_return_val_if_fail (database != NULL, NULL);
	self = (GamesDatabaseUriSource*) g_object_new (object_type, NULL);
	_tmp0_ = database;
	self->priv->database = _tmp0_;
	return self;
}


GamesDatabaseUriSource* games_database_uri_source_new (sqlite3* database) {
	return games_database_uri_source_construct (GAMES_TYPE_DATABASE_URI_SOURCE, database);
}


static GamesUriIterator* games_database_uri_source_real_iterator (GamesUriSource* base) {
	GamesDatabaseUriSource * self;
	GamesUriIterator* result = NULL;
	sqlite3* _tmp0_;
	GamesDatabaseUriIterator* _tmp1_;
	self = (GamesDatabaseUriSource*) base;
	_tmp0_ = self->priv->database;
	_tmp1_ = games_database_uri_iterator_new (_tmp0_);
	result = (GamesUriIterator*) _tmp1_;
	return result;
}


static void games_database_uri_source_class_init (GamesDatabaseUriSourceClass * klass) {
	games_database_uri_source_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesDatabaseUriSourcePrivate));
	G_OBJECT_CLASS (klass)->finalize = games_database_uri_source_finalize;
}


static void games_database_uri_source_games_uri_source_interface_init (GamesUriSourceIface * iface) {
	games_database_uri_source_games_uri_source_parent_iface = g_type_interface_peek_parent (iface);
	iface->iterator = (GamesUriIterator* (*) (GamesUriSource *)) games_database_uri_source_real_iterator;
}


static void games_database_uri_source_instance_init (GamesDatabaseUriSource * self) {
	self->priv = GAMES_DATABASE_URI_SOURCE_GET_PRIVATE (self);
}


static void games_database_uri_source_finalize (GObject * obj) {
	GamesDatabaseUriSource * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_DATABASE_URI_SOURCE, GamesDatabaseUriSource);
	G_OBJECT_CLASS (games_database_uri_source_parent_class)->finalize (obj);
}


GType games_database_uri_source_get_type (void) {
	static volatile gsize games_database_uri_source_type_id__volatile = 0;
	if (g_once_init_enter (&games_database_uri_source_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesDatabaseUriSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_database_uri_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesDatabaseUriSource), 0, (GInstanceInitFunc) games_database_uri_source_instance_init, NULL };
		static const GInterfaceInfo games_uri_source_info = { (GInterfaceInitFunc) games_database_uri_source_games_uri_source_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType games_database_uri_source_type_id;
		games_database_uri_source_type_id = g_type_register_static (G_TYPE_OBJECT, "GamesDatabaseUriSource", &g_define_type_info, 0);
		g_type_add_interface_static (games_database_uri_source_type_id, GAMES_TYPE_URI_SOURCE, &games_uri_source_info);
		g_once_init_leave (&games_database_uri_source_type_id__volatile, games_database_uri_source_type_id);
	}
	return games_database_uri_source_type_id__volatile;
}



