diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-10-03 21:54:19 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-10-03 21:54:19 -0400 |
commit | 6634a60bf0750159ffc34bdff548fac0817e72bc (patch) | |
tree | f91cd7b74cb518c57735ce22cb668f2737cb3fc7 /apps/tagcache.h | |
parent | eee48dca39cbbe3cf4ad13bcf1d90bb3492151e5 (diff) | |
download | rockbox-6634a60bf0750159ffc34bdff548fac0817e72bc.tar.gz rockbox-6634a60bf0750159ffc34bdff548fac0817e72bc.zip |
tagcache/tagtree remove static buffer from tagcache_get_next
callers can supply their own buffer
Change-Id: I8996ecfb88e30926296a0cb0563cf6c46977323e
Diffstat (limited to 'apps/tagcache.h')
-rw-r--r-- | apps/tagcache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h index 3b4df999b9..9cf796fafd 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -53,6 +53,10 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, | |||
53 | 53 | ||
54 | /* Tag to be used on untagged files. */ | 54 | /* Tag to be used on untagged files. */ |
55 | #define UNTAGGED "<Untagged>" | 55 | #define UNTAGGED "<Untagged>" |
56 | /* Maximum length of a single tag. */ | ||
57 | #define TAG_MAXLEN (MAX_PATH*2) | ||
58 | /* buffer size for all the (stack allocated & static) buffers handling tc data */ | ||
59 | #define TAGCACHE_BUFSZ (TAG_MAXLEN+32) | ||
56 | 60 | ||
57 | /* Numeric tags (we can use these tags with conditional clauses). */ | 61 | /* Numeric tags (we can use these tags with conditional clauses). */ |
58 | #define TAGCACHE_NUMERIC_TAGS ((1LU << tag_year) | (1LU << tag_discnumber) | \ | 62 | #define TAGCACHE_NUMERIC_TAGS ((1LU << tag_year) | (1LU << tag_discnumber) | \ |
@@ -172,7 +176,7 @@ bool tagcache_search_add_filter(struct tagcache_search *tcs, | |||
172 | int tag, int seek); | 176 | int tag, int seek); |
173 | bool tagcache_search_add_clause(struct tagcache_search *tcs, | 177 | bool tagcache_search_add_clause(struct tagcache_search *tcs, |
174 | struct tagcache_search_clause *clause); | 178 | struct tagcache_search_clause *clause); |
175 | bool tagcache_get_next(struct tagcache_search *tcs); | 179 | bool tagcache_get_next(struct tagcache_search *tcs, char *buf, long size); |
176 | bool tagcache_retrieve(struct tagcache_search *tcs, int idxid, | 180 | bool tagcache_retrieve(struct tagcache_search *tcs, int idxid, |
177 | int tag, char *buf, long size); | 181 | int tag, char *buf, long size); |
178 | void tagcache_search_finish(struct tagcache_search *tcs); | 182 | void tagcache_search_finish(struct tagcache_search *tcs); |