/* database-uri-source.c generated by valac 0.56.18-dirty, 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-object.h>
#include "gnome-games.h"
#include <sqlite3.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#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;
enum  {
	GAMES_DATABASE_URI_SOURCE_0_PROPERTY,
	GAMES_DATABASE_URI_SOURCE_NUM_PROPERTIES
};
static GParamSpec* games_database_uri_source_properties[GAMES_DATABASE_URI_SOURCE_NUM_PROPERTIES];

#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 _GamesDatabaseUriSource {
	GObject parent_instance;
	GamesDatabaseUriSourcePrivate * priv;
};

struct _GamesDatabaseUriSourceClass {
	GObjectClass parent_class;
};

struct _GamesDatabaseUriSourcePrivate {
	sqlite3* database;
};

static gint GamesDatabaseUriSource_private_offset;
static gpointer games_database_uri_source_parent_class = NULL;
static GamesUriSourceIface * games_database_uri_source_games_uri_source_parent_iface = NULL;

VALA_EXTERN GType games_database_uri_source_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GamesDatabaseUriSource* games_database_uri_source_new (sqlite3* database);
VALA_EXTERN GamesDatabaseUriSource* games_database_uri_source_construct (GType object_type,
                                                             sqlite3* database);
static GamesUriIterator* games_database_uri_source_real_iterator (GamesUriSource* base);
VALA_EXTERN GamesDatabaseUriIterator* games_database_uri_iterator_new (sqlite3* database);
VALA_EXTERN GamesDatabaseUriIterator* games_database_uri_iterator_construct (GType object_type,
                                                                 sqlite3* database);
VALA_EXTERN GType games_database_uri_iterator_get_type (void) G_GNUC_CONST ;
static void games_database_uri_source_finalize (GObject * obj);
static GType games_database_uri_source_get_type_once (void);

static inline gpointer
games_database_uri_source_get_instance_private (GamesDatabaseUriSource* self)
{
	return G_STRUCT_MEMBER_P (self, GamesDatabaseUriSource_private_offset);
}

GamesDatabaseUriSource*
games_database_uri_source_construct (GType object_type,
                                     sqlite3* database)
{
	GamesDatabaseUriSource * self = NULL;
	g_return_val_if_fail (database != NULL, NULL);
	self = (GamesDatabaseUriSource*) g_object_new (object_type, NULL);
	self->priv->database = database;
	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;
	sqlite3* _tmp0_;
	GamesDatabaseUriIterator* _tmp1_;
	GamesUriIterator* result;
	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,
                                      gpointer klass_data)
{
	games_database_uri_source_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GamesDatabaseUriSource_private_offset);
	G_OBJECT_CLASS (klass)->finalize = games_database_uri_source_finalize;
}

static void
games_database_uri_source_games_uri_source_interface_init (GamesUriSourceIface * iface,
                                                           gpointer iface_data)
{
	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,
                                         gpointer klass)
{
	self->priv = games_database_uri_source_get_instance_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);
}

static GType
games_database_uri_source_get_type_once (void)
{
	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);
	GamesDatabaseUriSource_private_offset = g_type_add_instance_private (games_database_uri_source_type_id, sizeof (GamesDatabaseUriSourcePrivate));
	return games_database_uri_source_type_id;
}

GType
games_database_uri_source_get_type (void)
{
	static volatile gsize games_database_uri_source_type_id__once = 0;
	if (g_once_init_enter (&games_database_uri_source_type_id__once)) {
		GType games_database_uri_source_type_id;
		games_database_uri_source_type_id = games_database_uri_source_get_type_once ();
		g_once_init_leave (&games_database_uri_source_type_id__once, games_database_uri_source_type_id);
	}
	return games_database_uri_source_type_id__once;
}

