summaryrefslogtreecommitdiff
path: root/apps/tagcache.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r--apps/tagcache.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h
index e655088cc2..387f8ab74c 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -36,7 +36,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title,
36#define IDX_BUF_DEPTH 64 36#define IDX_BUF_DEPTH 64
37 37
38/* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */ 38/* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */
39#define TAGCACHE_MAGIC 0x54434805 39#define TAGCACHE_MAGIC 0x54434806
40 40
41/* How much to allocate extra space for ramcache. */ 41/* How much to allocate extra space for ramcache. */
42#define TAGCACHE_RESERVE 32768 42#define TAGCACHE_RESERVE 32768
@@ -79,6 +79,7 @@ enum modifiers { clause_mod_none, clause_mod_not };
79 79
80struct tagcache_stat { 80struct tagcache_stat {
81 bool initialized; /* Is tagcache currently busy? */ 81 bool initialized; /* Is tagcache currently busy? */
82 bool ready; /* Is tagcache ready to be used? */
82 bool ramcache; /* Is tagcache loaded in ram? */ 83 bool ramcache; /* Is tagcache loaded in ram? */
83 bool commit_delayed; /* Has commit been delayed until next reboot? */ 84 bool commit_delayed; /* Has commit been delayed until next reboot? */
84 int commit_step; /* Commit progress */ 85 int commit_step; /* Commit progress */
@@ -124,6 +125,9 @@ struct tagcache_search {
124 long result_seek; 125 long result_seek;
125}; 126};
126 127
128int tagcache_str_to_tag(const char *str);
129const char* tagcache_tag_to_str(int tag);
130
127bool tagcache_is_numeric_tag(int type); 131bool tagcache_is_numeric_tag(int type);
128bool tagcache_is_unique_tag(int type); 132bool tagcache_is_unique_tag(int type);
129bool tagcache_is_sorted_tag(int type); 133bool tagcache_is_sorted_tag(int type);
@@ -138,6 +142,9 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid,
138 char *buf, long size); 142 char *buf, long size);
139void tagcache_search_finish(struct tagcache_search *tcs); 143void tagcache_search_finish(struct tagcache_search *tcs);
140long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); 144long tagcache_get_numeric(const struct tagcache_search *tcs, int tag);
145long tagcache_increase_serial(void);
146long tagcache_get_serial(void);
147bool tagcache_import_changelog(void);
141bool tagcache_create_changelog(struct tagcache_search *tcs); 148bool tagcache_create_changelog(struct tagcache_search *tcs);
142bool tagcache_modify_numeric_entry(struct tagcache_search *tcs, 149bool tagcache_modify_numeric_entry(struct tagcache_search *tcs,
143 int tag, long data); 150 int tag, long data);