-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdb.h
More file actions
29 lines (21 loc) · 702 Bytes
/
Copy pathdb.h
File metadata and controls
29 lines (21 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef CDCC_DB_H
#define CDCC_DB_H
#include <glib.h>
#include <gio/gio.h>
#include <sqlite3.h>
G_BEGIN_DECLS
typedef struct Record {
const unsigned char *dir;
const unsigned char *filename;
const unsigned char *args;
} Record;
typedef gboolean (*db_query_result_fn) (const Record *data, gpointer user_data);
gchar * db_path ();
sqlite3 * db_open (const char *path);
void db_close (sqlite3 *db);
void db_insert (sqlite3 *db, GFile *dir, GList *files,
const gchar * const *argv);
gboolean db_query (sqlite3 *db, const char *path, db_query_result_fn fn,
gpointer user_data);
G_END_DECLS
#endif