XMMS2
xmms_sqlite.h
Go to the documentation of this file.
1/* XMMS2 - X Music Multiplexer System
2 * Copyright (C) 2003-2011 XMMS2 Team
3 *
4 * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 */
16
17
18
19
20#ifndef __XMMS_PRIV_SQLITE_H__
21#define __XMMS_PRIV_SQLITE_H__
22
23#include <sqlite3.h>
24#include <xmms/xmms_object.h>
25
26typedef gboolean (*xmms_medialib_row_array_method_t) (xmmsv_t **row, gpointer udata);
27typedef gboolean (*xmms_medialib_row_table_method_t) (xmmsv_t *row, gpointer udata);
28
29sqlite3 *xmms_sqlite_open (void);
30gboolean xmms_sqlite_create (gboolean *create);
31gboolean xmms_sqlite_query_array (sqlite3 *sql, xmms_medialib_row_array_method_t method, gpointer udata, const gchar *query, ...);
32gboolean xmms_sqlite_query_int (sqlite3 *sql, gint32 *r, const gchar *query, ...);
33gboolean xmms_sqlite_query_table (sqlite3 *sql, xmms_medialib_row_table_method_t method, gpointer udata, xmms_error_t *error, const gchar *query, ...);
34gboolean xmms_sqlite_exec (sqlite3 *sql, const char *query, ...);
35void xmms_sqlite_close (sqlite3 *sql);
37gchar *sqlite_prepare_string (const gchar *input);
38
39#endif
gboolean xmms_sqlite_exec(sqlite3 *sql, const char *query,...)
A query that can't retrieve results.
Definition: sqlite.c:564
gchar * sqlite_prepare_string(const gchar *input)
Definition: sqlite.c:809
gboolean xmms_sqlite_query_int(sqlite3 *sql, gint32 *r, const gchar *query,...)
Definition: sqlite.c:773
gboolean xmms_sqlite_query_table(sqlite3 *sql, xmms_medialib_row_table_method_t method, gpointer udata, xmms_error_t *error, const gchar *query,...)
Execute a query to the database.
Definition: sqlite.c:599
void xmms_sqlite_print_version(void)
Definition: sqlite.c:800
gboolean xmms_sqlite_create(gboolean *create)
Definition: sqlite.c:365
gboolean xmms_sqlite_query_array(sqlite3 *sql, xmms_medialib_row_array_method_t method, gpointer udata, const gchar *query,...)
Definition: sqlite.c:747
sqlite3 * xmms_sqlite_open(void)
Open a database or create a new one.
Definition: sqlite.c:513
void xmms_sqlite_close(sqlite3 *sql)
Close database and free all resources used.
Definition: sqlite.c:793
struct xmmsv_St xmmsv_t
Definition: xmmsv_general.h:48
G_BEGIN_DECLS struct xmms_error_St xmms_error_t
gboolean(* xmms_medialib_row_table_method_t)(xmmsv_t *row, gpointer udata)
Definition: xmms_sqlite.h:27
gboolean(* xmms_medialib_row_array_method_t)(xmmsv_t **row, gpointer udata)
Definition: xmms_sqlite.h:26