summaryrefslogtreecommitdiff
path: root/apps/tagcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index a82f6e1634..04f9567936 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -23,9 +23,11 @@
23 23
24enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, 24enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
25 tag_filename, tag_composer, tag_year, tag_tracknumber, 25 tag_filename, tag_composer, tag_year, tag_tracknumber,
26 tag_bitrate, tag_length }; 26 tag_bitrate, tag_length, tag_playcount, tag_playtime, tag_lastplayed,
27 /* Virtual tags */
28 tag_virt_autoscore };
27 29
28#define TAG_COUNT 10 30#define TAG_COUNT 13
29 31
30/* Allow a little drift to the filename ordering (should not be too high/low). */ 32/* Allow a little drift to the filename ordering (should not be too high/low). */
31#define POS_HISTORY_COUNT 4 33#define POS_HISTORY_COUNT 4
@@ -34,7 +36,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
34#define IDX_BUF_DEPTH 64 36#define IDX_BUF_DEPTH 64
35 37
36/* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */ 38/* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */
37#define TAGCACHE_MAGIC 0x54434804 39#define TAGCACHE_MAGIC 0x54434805
38 40
39/* How much to allocate extra space for ramcache. */ 41/* How much to allocate extra space for ramcache. */
40#define TAGCACHE_RESERVE 32768 42#define TAGCACHE_RESERVE 32768
@@ -68,6 +70,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
68/* Flags */ 70/* Flags */
69#define FLAG_DELETED 0x0001 /* Entry has been removed from db */ 71#define FLAG_DELETED 0x0001 /* Entry has been removed from db */
70#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ 72#define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */
73#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */
71 74
72enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, 75enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt,
73 clause_lteq, clause_contains, clause_begins_with, clause_ends_with }; 76 clause_lteq, clause_contains, clause_begins_with, clause_ends_with };
@@ -123,6 +126,7 @@ struct tagcache_search {
123bool tagcache_is_numeric_tag(int type); 126bool tagcache_is_numeric_tag(int type);
124bool tagcache_is_unique_tag(int type); 127bool tagcache_is_unique_tag(int type);
125bool tagcache_is_sorted_tag(int type); 128bool tagcache_is_sorted_tag(int type);
129bool tagcache_find_index(struct tagcache_search *tcs, const char *filename);
126bool tagcache_search(struct tagcache_search *tcs, int tag); 130bool tagcache_search(struct tagcache_search *tcs, int tag);
127bool tagcache_search_add_filter(struct tagcache_search *tcs, 131bool tagcache_search_add_filter(struct tagcache_search *tcs,
128 int tag, int seek); 132 int tag, int seek);
@@ -133,6 +137,8 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid,
133 char *buf, long size); 137 char *buf, long size);
134void tagcache_search_finish(struct tagcache_search *tcs); 138void tagcache_search_finish(struct tagcache_search *tcs);
135long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 139long tagcache_get_numeric(const struct tagcache_search *tcs, int tag);
140bool tagcache_modify_numeric_entry(struct tagcache_search *tcs,
141 int tag, long data);
136 142
137struct tagcache_stat* tagcache_get_stat(void); 143struct tagcache_stat* tagcache_get_stat(void);
138int tagcache_get_commit_step(void); 144int tagcache_get_commit_step(void);