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

#ifndef __SRC_LIBRYGEL_DB_RYGEL_DB_H__
#define __SRC_LIBRYGEL_DB_RYGEL_DB_H__

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

G_BEGIN_DECLS

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#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_TYPE_DATABASE_ERROR (rygel_database_database_error_get_type ())

#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;
typedef enum  {
	RYGEL_DATABASE_FLAVOR_CACHE,
	RYGEL_DATABASE_FLAVOR_CONFIG,
	RYGEL_DATABASE_FLAVOR_FOREIGN
} RygelDatabaseFlavor;

#define RYGEL_DATABASE_TYPE_FLAVOR (rygel_database_flavor_get_type ())
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;

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

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

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

G_END_DECLS

#endif
