diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-10 16:22:03 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-10 16:22:03 +0000 |
commit | 9cd5c3e1195d872cbac2e8744bac5430490f6636 (patch) | |
tree | 8e70af5786bf38379333c38f63bea6e379f01b07 /apps/tagcache.h | |
parent | dae39989db4809d02cb4f6743c5f152a78ea0f8b (diff) | |
download | rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.gz 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.h | 11 |
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, | |||
27 | 27 | ||
28 | #define TAG_COUNT 10 | 28 | #define TAG_COUNT 10 |
29 | 29 | ||
30 | #ifdef HAVE_DIRCACHE | ||
31 | #define HAVE_TC_RAMCACHE 1 | ||
32 | #endif | ||
33 | |||
34 | /* Allow a little drift to the filename ordering (should not be too high/low). */ | 30 | /* Allow a little drift to the filename ordering (should not be too high/low). */ |
35 | #define POS_HISTORY_COUNT 4 | 31 | #define POS_HISTORY_COUNT 4 |
36 | 32 | ||
@@ -70,7 +66,8 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, | |||
70 | #define TAGCACHE_FILE_INDEX ROCKBOX_DIR "/tagcache_%d.tcd" | 66 | #define TAGCACHE_FILE_INDEX ROCKBOX_DIR "/tagcache_%d.tcd" |
71 | 67 | ||
72 | /* Flags */ | 68 | /* Flags */ |
73 | #define FLAG_DELETED 0x0001 | 69 | #define FLAG_DELETED 0x0001 /* Entry has been removed from db */ |
70 | #define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ | ||
74 | 71 | ||
75 | enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, | 72 | enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, |
76 | clause_lteq, clause_contains, clause_begins_with, clause_ends_with }; | 73 | clause_lteq, clause_contains, clause_begins_with, clause_ends_with }; |
@@ -102,6 +99,7 @@ struct tagcache_search { | |||
102 | int fd, masterfd; | 99 | int fd, masterfd; |
103 | int idxfd[TAG_COUNT]; | 100 | int idxfd[TAG_COUNT]; |
104 | long seek_list[SEEK_LIST_SIZE]; | 101 | long seek_list[SEEK_LIST_SIZE]; |
102 | long seek_flags[SEEK_LIST_SIZE]; | ||
105 | long filter_tag[TAGCACHE_MAX_FILTERS]; | 103 | long filter_tag[TAGCACHE_MAX_FILTERS]; |
106 | long filter_seek[TAGCACHE_MAX_FILTERS]; | 104 | long filter_seek[TAGCACHE_MAX_FILTERS]; |
107 | int filter_count; | 105 | int filter_count; |
@@ -147,6 +145,7 @@ void tagcache_init(void); | |||
147 | bool tagcache_is_initialized(void); | 145 | bool tagcache_is_initialized(void); |
148 | void tagcache_start_scan(void); | 146 | void tagcache_start_scan(void); |
149 | void tagcache_stop_scan(void); | 147 | void tagcache_stop_scan(void); |
150 | bool tagcache_force_update(void); | 148 | bool tagcache_update(void); |
149 | bool tagcache_rebuild(void); | ||
151 | 150 | ||
152 | #endif | 151 | #endif |