aboutsummaryrefslogtreecommitdiff
path: root/include/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/database.h')
-rw-r--r--include/database.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/database.h b/include/database.h
index 2b1c91a..339b48b 100644
--- a/include/database.h
+++ b/include/database.h
@@ -8,6 +8,7 @@ typedef struct database{
char name[32];
ltable *lfiles, *ltags;
htable *hfiles, *htags;
+ htable *fcount, *tcount;
mtable *map;
} database;
@@ -18,11 +19,17 @@ 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);
+
int addFileTag(database *db, char *file, char *tag);
int addFileTags(database *db, char *file, int ntags, ...);
-int searchTag(database *db, char *tag, uint64_t *rl);
+int searchTag(database *db, char *tag, uint64_t n, uint64_t **r, uint64_t *rl);
+
+int searchFile(database *db, char *file, uint64_t n, uint64_t **r, uint64_t *rl);
void printDatabase(database *db);