chiark / gitweb /
New refresh_min option to bound below the web interface refresh
[disorder] / lib / trackdb-int.h
index 9ec328ee0df42bd6d25dba8a6cfc3dfafda576e4..3be725e32d4d9106a4faa5a6bf59e4d56ddc0191 100644 (file)
@@ -2,25 +2,29 @@
  * This file is part of DisOrder
  * Copyright (C) 2005, 2007 Richard Kettlewell
  *
- * This program is free software; you can redistribute it and/or modify
+ * 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-
+/** @file lib/trackdb-int.h
+ * @brief Track database internals */
 #ifndef TRACKDB_INT_H
 #define TRACKDB_INT_H
 
+#include <db.h>
+
+#include "trackdb.h"
+#include "kvp.h"
+
 struct vector;                          /* forward declaration */
 
 extern DB_ENV *trackdb_env;
@@ -32,6 +36,8 @@ extern DB *trackdb_tagsdb;
 extern DB *trackdb_noticeddb;
 extern DB *trackdb_globaldb;
 extern DB *trackdb_usersdb;
+extern DB *trackdb_scheduledb;
+extern DB *trackdb_playlistsdb;
 
 DBC *trackdb_opencursor(DB *db, DB_TXN *tid);
 /* open a transaction */
@@ -102,6 +108,7 @@ int trackdb_delkeydata(DB *db,
 int trackdb_scan(const char *root,
                  int (*callback)(const char *track,
                                  struct kvp *data,
+                                 struct kvp *prefs,
                                  void *u,
                                  DB_TXN *tid),
                  void *u,
@@ -144,6 +151,9 @@ int trackdb_get_global_tid(const char *name,
                            DB_TXN *tid,
                            const char **rp);
 
+char **parsetags(const char *s);
+int tag_intersection(char **a, char **b);
+
 #endif /* TRACKDB_INT_H */
 
 /*