summaryrefslogtreecommitdiff
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.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,
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
75enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, 72enum 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);
147bool tagcache_is_initialized(void); 145bool tagcache_is_initialized(void);
148void tagcache_start_scan(void); 146void tagcache_start_scan(void);
149void tagcache_stop_scan(void); 147void tagcache_stop_scan(void);
150bool tagcache_force_update(void); 148bool tagcache_update(void);
149bool tagcache_rebuild(void);
151 150
152#endif 151#endif