From 5dd0d7700fa98197cdadaa2369d789e092cc0f49 Mon Sep 17 00:00:00 2001 From: Soikk Date: Sun, 7 Aug 2022 15:41:19 +0200 Subject: Added removing things from db. Ref counts update when removing things. Added changelog. --- include/database.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/database.h') diff --git a/include/database.h b/include/database.h index 5f2d99d..1ae65b6 100644 --- a/include/database.h +++ b/include/database.h @@ -15,10 +15,6 @@ typedef struct database{ database *newDatabase(char *name); -database *loadDatabase(const char* path); - -int storeDatabase(database *db, const char *path); - uint64_t addFile(database *db, char *file); uint64_t addTag(database *db, char *tag); @@ -27,10 +23,18 @@ int addFileTag(database *db, char *file, char *tag); int addFileTags(database *db, char *file, int ntags, ...); +int removeFile(database *db, char *file); + +int removeTag(database *db, char *tag); + int searchFile(database *db, char *file, uint64_t n, uint64_t **r, uint64_t *rl); int searchTag(database *db, char *tag, uint64_t n, uint64_t **r, uint64_t *rl); +int storeDatabase(database *db, const char *path); + +database *loadDatabase(const char* path); + void printDatabase(database *db); void debugAVLtree(node *n); -- cgit v1.2.3