/* rygel-db.h generated by valac 0.32.0, the Vala compiler, do not modify */


#ifndef __RYGEL_DB_H__
#define __RYGEL_DB_H__

#include <glib.h>
#include <glib-object.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <libgupnp-av/gupnp-av.h>

G_BEGIN_DECLS


#define RYGEL_DATABASE_TYPE_CURSOR (rygel_database_cursor_get_type ())
#define RYGEL_DATABASE_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_DATABASE_TYPE_CURSOR, RygelDatabaseCursor))
#define RYGEL_DATABASE_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_DATABASE_TYPE_CURSOR, RygelDatabaseCursorClass))
#define RYGEL_DATABASE_IS_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_DATABASE_TYPE_CURSOR))
#define RYGEL_DATABASE_IS_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_DATABASE_TYPE_CURSOR))
#define RYGEL_DATABASE_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_DATABASE_TYPE_CURSOR, RygelDatabaseCursorClass))

typedef struct _RygelDatabaseCursor RygelDatabaseCursor;
typedef struct _RygelDatabaseCursorClass RygelDatabaseCursorClass;
typedef struct _RygelDatabaseCursorPrivate RygelDatabaseCursorPrivate;

#define RYGEL_DATABASE_CURSOR_TYPE_ITERATOR (rygel_database_cursor_iterator_get_type ())
#define RYGEL_DATABASE_CURSOR_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_DATABASE_CURSOR_TYPE_ITERATOR, RygelDatabaseCursorIterator))
#define RYGEL_DATABASE_CURSOR_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_DATABASE_CURSOR_TYPE_ITERATOR, RygelDatabaseCursorIteratorClass))
#define RYGEL_DATABASE_CURSOR_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_DATABASE_CURSOR_TYPE_ITERATOR))
#define RYGEL_DATABASE_CURSOR_IS_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_DATABASE_CURSOR_TYPE_ITERATOR))
#define RYGEL_DATABASE_CURSOR_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_DATABASE_CURSOR_TYPE_ITERATOR, RygelDatabaseCursorIteratorClass))

typedef struct _RygelDatabaseCursorIterator RygelDatabaseCursorIterator;
typedef struct _RygelDatabaseCursorIteratorClass RygelDatabaseCursorIteratorClass;
typedef struct _RygelDatabaseCursorIteratorPrivate RygelDatabaseCursorIteratorPrivate;

#define RYGEL_DATABASE_TYPE_FLAVOR (rygel_database_flavor_get_type ())

#define RYGEL_DATABASE_TYPE_FLAGS (rygel_database_flags_get_type ())

#define RYGEL_DATABASE_TYPE_DATABASE (rygel_database_database_get_type ())
#define RYGEL_DATABASE_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_DATABASE_TYPE_DATABASE, RygelDatabaseDatabase))
#define RYGEL_DATABASE_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_DATABASE_TYPE_DATABASE, RygelDatabaseDatabaseClass))
#define RYGEL_DATABASE_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_DATABASE_TYPE_DATABASE))
#define RYGEL_DATABASE_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_DATABASE_TYPE_DATABASE))
#define RYGEL_DATABASE_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_DATABASE_TYPE_DATABASE, RygelDatabaseDatabaseClass))

typedef struct _RygelDatabaseDatabase RygelDatabaseDatabase;
typedef struct _RygelDatabaseDatabaseClass RygelDatabaseDatabaseClass;
typedef struct _RygelDatabaseDatabasePrivate RygelDatabaseDatabasePrivate;

#define RYGEL_DATABASE_TYPE_SQL_OPERATOR (rygel_database_sql_operator_get_type ())
#define RYGEL_DATABASE_SQL_OPERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_DATABASE_TYPE_SQL_OPERATOR, RygelDatabaseSqlOperator))
#define RYGEL_DATABASE_SQL_OPERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_DATABASE_TYPE_SQL_OPERATOR, RygelDatabaseSqlOperatorClass))
#define RYGEL_DATABASE_IS_SQL_OPERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_DATABASE_TYPE_SQL_OPERATOR))
#define RYGEL_DATABASE_IS_SQL_OPERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_DATABASE_TYPE_SQL_OPERATOR))
#define RYGEL_DATABASE_SQL_OPERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_DATABASE_TYPE_SQL_OPERATOR, RygelDatabaseSqlOperatorClass))

typedef struct _RygelDatabaseSqlOperator RygelDatabaseSqlOperator;
typedef struct _RygelDatabaseSqlOperatorClass RygelDatabaseSqlOperatorClass;
typedef struct _RygelDatabaseSqlOperatorPrivate RygelDatabaseSqlOperatorPrivate;

#define RYGEL_DATABASE_TYPE_SQL_FUNCTION (rygel_database_sql_function_get_type ())
#define RYGEL_DATABASE_SQL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_DATABASE_TYPE_SQL_FUNCTION, RygelDatabaseSqlFunction))
#define RYGEL_DATABASE_SQL_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_DATABASE_TYPE_SQL_FUNCTION, RygelDatabaseSqlFunctionClass))
#define RYGEL_DATABASE_IS_SQL_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_DATABASE_TYPE_SQL_FUNCTION))
#define RYGEL_DATABASE_IS_SQL_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_DATABASE_TYPE_SQL_FUNCTION))
#define RYGEL_DATABASE_SQL_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_DATABASE_TYPE_SQL_FUNCTION, RygelDatabaseSqlFunctionClass))

typedef struct _RygelDatabaseSqlFunction RygelDatabaseSqlFunction;
typedef struct _RygelDatabaseSqlFunctionClass RygelDatabaseSqlFunctionClass;
typedef struct _RygelDatabaseSqlFunctionPrivate RygelDatabaseSqlFunctionPrivate;

struct _RygelDatabaseCursor {
	GObject parent_instance;
	RygelDatabaseCursorPrivate * priv;
};

struct _RygelDatabaseCursorClass {
	GObjectClass parent_class;
};

typedef enum  {
	RYGEL_DATABASE_DATABASE_ERROR_SQLITE_ERROR,
	RYGEL_DATABASE_DATABASE_ERROR_OPEN,
	RYGEL_DATABASE_DATABASE_ERROR_PREPARE,
	RYGEL_DATABASE_DATABASE_ERROR_BIND,
	RYGEL_DATABASE_DATABASE_ERROR_STEP
} RygelDatabaseDatabaseError;
#define RYGEL_DATABASE_DATABASE_ERROR rygel_database_database_error_quark ()
struct _RygelDatabaseCursorIterator {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelDatabaseCursorIteratorPrivate * priv;
	RygelDatabaseCursor* cursor;
};

struct _RygelDatabaseCursorIteratorClass {
	GTypeClass parent_class;
	void (*finalize) (RygelDatabaseCursorIterator *self);
};

typedef enum  {
	RYGEL_DATABASE_FLAVOR_CACHE,
	RYGEL_DATABASE_FLAVOR_CONFIG,
	RYGEL_DATABASE_FLAVOR_FOREIGN
} RygelDatabaseFlavor;

typedef enum  {
	RYGEL_DATABASE_FLAGS_READ_ONLY = 1,
	RYGEL_DATABASE_FLAGS_WRITE_ONLY = 1 << 1,
	RYGEL_DATABASE_FLAGS_READ_WRITE = RYGEL_DATABASE_FLAGS_READ_ONLY | RYGEL_DATABASE_FLAGS_WRITE_ONLY,
	RYGEL_DATABASE_FLAGS_SHARED = 1 << 2
} RygelDatabaseFlags;

struct _RygelDatabaseDatabase {
	GObject parent_instance;
	RygelDatabaseDatabasePrivate * priv;
};

struct _RygelDatabaseDatabaseClass {
	GObjectClass parent_class;
};

struct _RygelDatabaseSqlOperator {
	GObject parent_instance;
	RygelDatabaseSqlOperatorPrivate * priv;
	gchar* name;
	gchar* arg;
	gchar* collate;
};

struct _RygelDatabaseSqlOperatorClass {
	GObjectClass parent_class;
	gchar* (*to_string) (RygelDatabaseSqlOperator* self);
};

struct _RygelDatabaseSqlFunction {
	RygelDatabaseSqlOperator parent_instance;
	RygelDatabaseSqlFunctionPrivate * priv;
};

struct _RygelDatabaseSqlFunctionClass {
	RygelDatabaseSqlOperatorClass parent_class;
};


GType rygel_database_cursor_get_type (void) G_GNUC_CONST;
GQuark rygel_database_database_error_quark (void);
RygelDatabaseCursor* rygel_database_cursor_new (sqlite3* db, const gchar* sql, GValue* arguments, int arguments_length1, GError** error);
RygelDatabaseCursor* rygel_database_cursor_construct (GType object_type, sqlite3* db, const gchar* sql, GValue* arguments, int arguments_length1, GError** error);
void rygel_database_cursor_bind (RygelDatabaseCursor* self, GValue* arguments, int arguments_length1, GError** error);
gboolean rygel_database_cursor_has_next (RygelDatabaseCursor* self, GError** error);
sqlite3_stmt* rygel_database_cursor_next (RygelDatabaseCursor* self, GError** error);
gpointer rygel_database_cursor_iterator_ref (gpointer instance);
void rygel_database_cursor_iterator_unref (gpointer instance);
GParamSpec* rygel_database_cursor_param_spec_iterator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_database_cursor_value_set_iterator (GValue* value, gpointer v_object);
void rygel_database_cursor_value_take_iterator (GValue* value, gpointer v_object);
gpointer rygel_database_cursor_value_get_iterator (const GValue* value);
GType rygel_database_cursor_iterator_get_type (void) G_GNUC_CONST;
RygelDatabaseCursorIterator* rygel_database_cursor_iterator (RygelDatabaseCursor* self);
void rygel_database_cursor_throw_if_code_is_error (RygelDatabaseCursor* self, gint sqlite_error, GError** error);
void rygel_database_cursor_throw_if_db_has_error (RygelDatabaseCursor* self, GError** error);
RygelDatabaseCursorIterator* rygel_database_cursor_iterator_new (RygelDatabaseCursor* cursor);
RygelDatabaseCursorIterator* rygel_database_cursor_iterator_construct (GType object_type, RygelDatabaseCursor* cursor);
gboolean rygel_database_cursor_iterator_next (RygelDatabaseCursorIterator* self, GError** error);
sqlite3_stmt* rygel_database_cursor_iterator_get (RygelDatabaseCursorIterator* self, GError** error);
GType rygel_database_flavor_get_type (void) G_GNUC_CONST;
GType rygel_database_flags_get_type (void) G_GNUC_CONST;
void rygel_database_null (GValue* result);
GType rygel_database_database_get_type (void) G_GNUC_CONST;
void rygel_database_database_utf8_contains (sqlite3_context* context, sqlite3_value** args, int args_length1);
gint rygel_database_database_utf8_collate (gint alen, void* a, gint blen, void* b);
RygelDatabaseDatabase* rygel_database_database_new (const gchar* name, RygelDatabaseFlavor flavor, RygelDatabaseFlags flags, GError** error);
RygelDatabaseDatabase* rygel_database_database_construct (GType object_type, const gchar* name, RygelDatabaseFlavor flavor, RygelDatabaseFlags flags, GError** error);
RygelDatabaseCursor* rygel_database_database_exec_cursor (RygelDatabaseDatabase* self, const gchar* sql, GValue* arguments, int arguments_length1, GError** error);
void rygel_database_database_exec (RygelDatabaseDatabase* self, const gchar* sql, GValue* arguments, int arguments_length1, GError** error);
gint rygel_database_database_query_value (RygelDatabaseDatabase* self, const gchar* sql, GValue* args, int args_length1, GError** error);
void rygel_database_database_analyze (RygelDatabaseDatabase* self);
void rygel_database_database_begin (RygelDatabaseDatabase* self, GError** error);
void rygel_database_database_commit (RygelDatabaseDatabase* self, GError** error);
void rygel_database_database_rollback (RygelDatabaseDatabase* self);
void rygel_database_database_set_name (RygelDatabaseDatabase* self, const gchar* value);
void rygel_database_database_set_flavor (RygelDatabaseDatabase* self, RygelDatabaseFlavor value);
void rygel_database_database_set_flags (RygelDatabaseDatabase* self, RygelDatabaseFlags value);
GType rygel_database_sql_operator_get_type (void) G_GNUC_CONST;
GType rygel_database_sql_function_get_type (void) G_GNUC_CONST;
RygelDatabaseSqlFunction* rygel_database_sql_function_new (const gchar* name, const gchar* arg);
RygelDatabaseSqlFunction* rygel_database_sql_function_construct (GType object_type, const gchar* name, const gchar* arg);
RygelDatabaseSqlOperator* rygel_database_sql_operator_new (const gchar* name, const gchar* arg, const gchar* collate);
RygelDatabaseSqlOperator* rygel_database_sql_operator_construct (GType object_type, const gchar* name, const gchar* arg, const gchar* collate);
RygelDatabaseSqlOperator* rygel_database_sql_operator_new_from_search_criteria_op (GUPnPSearchCriteriaOp op, const gchar* arg, const gchar* collate);
RygelDatabaseSqlOperator* rygel_database_sql_operator_construct_from_search_criteria_op (GType object_type, GUPnPSearchCriteriaOp op, const gchar* arg, const gchar* collate);
gchar* rygel_database_sql_operator_to_string (RygelDatabaseSqlOperator* self);


G_END_DECLS

#endif
