aboutsummaryrefslogtreecommitdiff
path: root/include/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/database.h')
-rw-r--r--include/database.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/database.h b/include/database.h
index bd60e72..d5ad8e9 100644
--- a/include/database.h
+++ b/include/database.h
@@ -15,19 +15,25 @@ typedef struct database{
database *newDatabase(char *name);
+int freeDatabase(database **db);
+
+int deleteDatabase(database **db);
+
uint64_t addFile(database *db, char *file);
uint64_t addTag(database *db, char *tag);
+int removeFile(database *db, char *file);
+
+int removeTag(database *db, char *tag);
+
int addFileTag(database *db, char *file, char *tag);
int addFileTags(database *db, char *file, int ntags, ...);
int addTagFiles(database *db, char *tag, int nfiles, ...);
-int removeFile(database *db, char *file);
-
-int removeTag(database *db, char *tag);
+int removeFileTag(database *db, char *file, char *tag);
int searchFile(database *db, char *file, uint64_t n, uint64_t **r, uint64_t *rl);
@@ -39,8 +45,6 @@ database *loadDatabase(const char* path);
void printDatabase(database *db);
-void debugAVLtree(node *n);
-
void debugDatabase(database *db);
#endif