chiark / gitweb /
more thorough kvp.c testing
[disorder] / server / trackdb-int.h
index a4b278e23633bfe60d52908bfb450bada67dbb6f..02b07b9a9e1ea86685fa927cb8a1b1e4d39f3f04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder
- * Copyright (C) 2005 Richard Kettlewell
+ * Copyright (C) 2005, 2007 Richard Kettlewell
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,6 +26,9 @@ extern DB_ENV *trackdb_env;
 extern DB *trackdb_tracksdb;
 extern DB *trackdb_prefsdb;
 extern DB *trackdb_searchdb;
+extern DB *trackdb_tagsdb;
+extern DB *trackdb_noticeddb;
+extern DB *trackdb_globaldb;
 
 DBC *trackdb_opencursor(DB *db, DB_TXN *tid);
 /* open a transaction */
@@ -82,11 +85,12 @@ int trackdb_scan(const char *root,
                                  DB_TXN *tid),
                  void *u,
                  DB_TXN *tid);
-/* Call CALLBACK for each non-alias track below ROOT.  Return 0 or
- * DB_LOCK_DEADLOCK.  CALLBACK should return 0 on success or EINTR to cancel
- * the scan. */
+/* Call CALLBACK for each non-alias track below ROOT (or all tracks if ROOT is
+ * 0).  Return 0 or DB_LOCK_DEADLOCK.  CALLBACK should return 0 on success or
+ * EINTR to cancel the scan. */
 
 /* fill KEY in with S, returns KEY */
+
 static inline DBT *make_key(DBT *key, const char *s) {
   memset(key, 0, sizeof *key);
   key->data = (void *)s;
@@ -111,6 +115,13 @@ static inline DBT *encode_data(DBT *data, const struct kvp *k) {
   return data;
 }
 
+int trackdb_set_global_tid(const char *name,
+                           const char *value,
+                           DB_TXN *tid);
+int trackdb_get_global_tid(const char *name,
+                           DB_TXN *tid,
+                           const char **rp);
+
 #endif /* TRACKDB_INT_H */
 
 /*