diff options
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r-- | apps/tagcache.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h index e995784742..8863ecb7df 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -94,6 +94,21 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, | |||
94 | /* Serialized DB. */ | 94 | /* Serialized DB. */ |
95 | #define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd" | 95 | #define TAGCACHE_STATEFILE ROCKBOX_DIR "/database_state.tcd" |
96 | 96 | ||
97 | /* Numeric tags (we can use these tags with conditional clauses). */ | ||
98 | #define TAGCACHE_NUMERIC_TAGS ((1LU << tag_year) | (1LU << tag_discnumber) | \ | ||
99 | (1LU << tag_tracknumber) | (1LU << tag_length) | (1LU << tag_bitrate) | \ | ||
100 | (1LU << tag_playcount) | (1LU << tag_rating) | (1LU << tag_playtime) | \ | ||
101 | (1LU << tag_lastplayed) | (1LU << tag_commitid) | (1LU << tag_mtime) | \ | ||
102 | (1LU << tag_virt_length_min) | (1LU << tag_virt_length_sec) | \ | ||
103 | (1LU << tag_virt_playtime_min) | (1LU << tag_virt_playtime_sec) | \ | ||
104 | (1LU << tag_virt_entryage) | (1LU << tag_virt_autoscore)) | ||
105 | |||
106 | #ifdef CPU_SH | ||
107 | #define TAGCACHE_IS_NUMERIC(tag) (tagcache_is_numeric_tag(tag)) | ||
108 | #else | ||
109 | #define TAGCACHE_IS_NUMERIC(tag) ((1LU << tag) & TAGCACHE_NUMERIC_TAGS) | ||
110 | #endif | ||
111 | |||
97 | /* Flags */ | 112 | /* Flags */ |
98 | #define FLAG_DELETED 0x0001 /* Entry has been removed from db */ | 113 | #define FLAG_DELETED 0x0001 /* Entry has been removed from db */ |
99 | #define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ | 114 | #define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ |
@@ -183,9 +198,9 @@ void tagcache_reverse_scan(void); | |||
183 | 198 | ||
184 | const char* tagcache_tag_to_str(int tag); | 199 | const char* tagcache_tag_to_str(int tag); |
185 | 200 | ||
201 | #ifdef CPU_SH | ||
186 | bool tagcache_is_numeric_tag(int type); | 202 | bool tagcache_is_numeric_tag(int type); |
187 | bool tagcache_is_unique_tag(int type); | 203 | #endif |
188 | bool tagcache_is_sorted_tag(int type); | ||
189 | bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); | 204 | bool tagcache_find_index(struct tagcache_search *tcs, const char *filename); |
190 | bool tagcache_check_clauses(struct tagcache_search *tcs, | 205 | bool tagcache_check_clauses(struct tagcache_search *tcs, |
191 | struct tagcache_search_clause **clause, int count); | 206 | struct tagcache_search_clause **clause, int count); |