From 5ac40104a4c54e0df8136c66350cda823b912a80 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Tue, 11 Oct 2011 15:59:36 +0200 Subject: [PATCH] Add database-plain.c --- database-plain.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ database-sqlite.c | 4 ++++ 2 files changed, 60 insertions(+) create mode 100644 database-plain.c diff --git a/database-plain.c b/database-plain.c new file mode 100644 index 0000000..65ab6e6 --- /dev/null +++ b/database-plain.c @@ -0,0 +1,56 @@ +/* See LICENSE file for license and copyright information */ + +#include +#include + +#include "database.h" + +struct zathura_database_s +{ + void* tmp; +}; + +zathura_database_t* +zathura_db_init(const char* dir) +{ + return NULL; +} + +void +zathura_db_free(zathura_database_t* db) +{ +} + +bool +zathura_db_add_bookmark(zathura_database_t* db, const char* file, + zathura_bookmark_t* bookmark) +{ + return false; +} + +bool +zathura_db_remove_bookmark(zathura_database_t* db, const char* file, const char* + id) +{ + return false; +} + +girara_list_t* +zathura_db_load_bookmarks(zathura_database_t* db, const char* file) +{ + return NULL; +} + +bool +zathura_db_set_fileinfo(zathura_database_t* db, const char* file, unsigned int + page, int offset, float scale) +{ + return false; +} + +bool +zathura_db_get_fileinfo(zathura_database_t* db, const char* file, unsigned int* + page, int* offset, float* scale) +{ + return false; +} diff --git a/database-sqlite.c b/database-sqlite.c index fa76be3..da81d22 100644 --- a/database-sqlite.c +++ b/database-sqlite.c @@ -16,6 +16,10 @@ struct zathura_database_s zathura_database_t* zathura_db_init(const char* dir) { + if (dir == NULL) { + goto error_ret; + } + char* path = g_build_filename(dir, DATABASE, NULL); if (path == NULL) { goto error_ret;