summaryrefslogtreecommitdiffstats
path: root/apps/tagcache.h
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-08-25 13:22:46 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-08-25 13:22:46 +0000
commite3080643537e778060f7456bc5777d369d6ffd20 (patch)
tree7890dda53faa147b41a7bf83a28a4c7b58d44269 /apps/tagcache.h
parenta3ba6725cb445f81e25a009aab51317e7d4a7dc9 (diff)
downloadrockbox-e3080643537e778060f7456bc5777d369d6ffd20.tar.gz
rockbox-e3080643537e778060f7456bc5777d369d6ffd20.tar.bz2
rockbox-e3080643537e778060f7456bc5777d369d6ffd20.zip
Tagcache: Don't show duplicate entries and automatically inherit
clauses for correct search results. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10746 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index e43414cba5..d9e1c93cab 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -51,13 +51,13 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
#define TAGFILE_ENTRY_AVG_LENGTH 16
/* How many entries to fetch to the seek table at once while searching. */
-#define SEEK_LIST_SIZE 50
+#define SEEK_LIST_SIZE 32
/* Always strict align entries for best performance and binary compatability. */
#define TAGCACHE_STRICT_ALIGN 1
-#define TAGCACHE_MAX_FILTERS 3
-#define TAGCACHE_MAX_CLAUSES 10
+#define TAGCACHE_MAX_FILTERS 4
+#define TAGCACHE_MAX_CLAUSES 16
/* Tag database files. */
#define TAGCACHE_FILE_TEMP ROCKBOX_DIR "/tagcache_tmp.tcd"
@@ -116,6 +116,9 @@ struct tagcache_search {
int entry_count;
bool valid;
bool initialized;
+ long *unique_list;
+ int unique_list_capacity;
+ int unique_list_count;
/* Exported variables. */
bool ramsearch;
@@ -133,6 +136,8 @@ bool tagcache_is_unique_tag(int type);
bool tagcache_is_sorted_tag(int type);
bool tagcache_find_index(struct tagcache_search *tcs, const char *filename);
bool tagcache_search(struct tagcache_search *tcs, int tag);
+void tagcache_search_set_uniqbuf(struct tagcache_search *tcs,
+ void *buffer, long length);
bool tagcache_search_add_filter(struct tagcache_search *tcs,
int tag, int seek);
bool tagcache_search_add_clause(struct tagcache_search *tcs,