From 4e9cdd282beb1c6dcbcca148745f5665b561c403 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 22 Dec 2009 19:26:54 +0100 Subject: Initial commit. --- db.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 db.h (limited to 'db.h') diff --git a/db.h b/db.h new file mode 100644 index 0000000..3e17d9c --- /dev/null +++ b/db.h @@ -0,0 +1,29 @@ +#ifndef _DB_H_ +#define _DB_H_ + +#include +#include + +struct directory_t { + gchar *name; + sqlite_uint64 dirid; +}; + +struct wallpaper_t { + gchar *filepath; + sqlite_uint64 id; + int size; + int width; + int height; +}; + +int db_open(); +void db_close(); +sqlite_uint64 db_add_directory(const char*, sqlite_uint64); +sqlite_uint64 db_get_directory(const char*); +int db_get_top_level_directories(GArray**); +int db_get_directories(sqlite_uint64, GArray**); +sqlite_uint64 db_add_wallpaper(const char*, sqlite_uint64, int, int, int); +int db_get_wallpapers(sqlite_uint64, GArray**); + +#endif -- cgit v1.2.3