summaryrefslogtreecommitdiffstats
path: root/apps/tagcache.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-07-10 16:22:03 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-07-10 16:22:03 +0000
commit9cd5c3e1195d872cbac2e8744bac5430490f6636 (patch)
tree8e70af5786bf38379333c38f63bea6e379f01b07 /apps/tagcache.h
parentdae39989db4809d02cb4f6743c5f152a78ea0f8b (diff)
downloadrockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.gz
rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.bz2
rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.zip
Tagcache update: Support removal of entries and no longer the need for
dircache to load tagcache in ram (however, dircache with tagcache is still strongly recommended). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index c94c77f277..a82f6e1634 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -27,10 +27,6 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
#define TAG_COUNT 10
-#ifdef HAVE_DIRCACHE
-#define HAVE_TC_RAMCACHE 1
-#endif
-
/* Allow a little drift to the filename ordering (should not be too high/low). */
#define POS_HISTORY_COUNT 4
@@ -70,7 +66,8 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
#define TAGCACHE_FILE_INDEX ROCKBOX_DIR "/tagcache_%d.tcd"
/* Flags */
-#define FLAG_DELETED 0x0001
+#define FLAG_DELETED 0x0001 /* Entry has been removed from db */
+#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */
enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt,
clause_lteq, clause_contains, clause_begins_with, clause_ends_with };
@@ -102,6 +99,7 @@ struct tagcache_search {
int fd, masterfd;
int idxfd[TAG_COUNT];
long seek_list[SEEK_LIST_SIZE];
+ long seek_flags[SEEK_LIST_SIZE];
long filter_tag[TAGCACHE_MAX_FILTERS];
long filter_seek[TAGCACHE_MAX_FILTERS];
int filter_count;
@@ -147,6 +145,7 @@ void tagcache_init(void);
bool tagcache_is_initialized(void);
void tagcache_start_scan(void);
void tagcache_stop_scan(void);
-bool tagcache_force_update(void);
+bool tagcache_update(void);
+bool tagcache_rebuild(void);
#endif