diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-15 17:36:25 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-15 17:36:25 +0000 |
| commit | 45dfe2a36f03d1ada7036dedb50fb98d7c5421b2 (patch) | |
| tree | 866a57b677dce40ef5b772e1514a9ec6a35f60ea /apps/tagcache.h | |
| parent | e60cb43a982e03b062bd42dbe260abca299fe14d (diff) | |
| download | rockbox-45dfe2a36f03d1ada7036dedb50fb98d7c5421b2.zip rockbox-45dfe2a36f03d1ada7036dedb50fb98d7c5421b2.tar.gz rockbox-45dfe2a36f03d1ada7036dedb50fb98d7c5421b2.tar.bz2 rockbox-45dfe2a36f03d1ada7036dedb50fb98d7c5421b2.tar.xz | |
Initial runtimedb support for tagcache. Only for developers,
statistical data will be lost in future until changelogs has been
implemented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10217 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagcache.h')
| -rw-r--r-- | apps/tagcache.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/tagcache.h b/apps/tagcache.h index a82f6e1..04f9567 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -23,9 +23,11 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, tag_filename, tag_composer, tag_year, tag_tracknumber, - tag_bitrate, tag_length }; + tag_bitrate, tag_length, tag_playcount, tag_playtime, tag_lastplayed, + /* Virtual tags */ + tag_virt_autoscore }; -#define TAG_COUNT 10 +#define TAG_COUNT 13 /* Allow a little drift to the filename ordering (should not be too high/low). */ #define POS_HISTORY_COUNT 4 @@ -34,7 +36,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, #define IDX_BUF_DEPTH 64 /* Tag Cache Header version 'TCHxx'. Increment when changing internal structures. */ -#define TAGCACHE_MAGIC 0x54434804 +#define TAGCACHE_MAGIC 0x54434805 /* How much to allocate extra space for ramcache. */ #define TAGCACHE_RESERVE 32768 @@ -68,6 +70,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, /* Flags */ #define FLAG_DELETED 0x0001 /* Entry has been removed from db */ #define FLAG_DIRCACHE 0x0002 /* Filename is a dircache pointer */ +#define FLAG_DIRTYNUM 0x0004 /* Numeric data has been modified */ enum clause { clause_none, clause_is, clause_gt, clause_gteq, clause_lt, clause_lteq, clause_contains, clause_begins_with, clause_ends_with }; @@ -123,6 +126,7 @@ struct tagcache_search { bool tagcache_is_numeric_tag(int type); 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); bool tagcache_search_add_filter(struct tagcache_search *tcs, int tag, int seek); @@ -133,6 +137,8 @@ bool tagcache_retrieve(struct tagcache_search *tcs, int idxid, char *buf, long size); void tagcache_search_finish(struct tagcache_search *tcs); long tagcache_get_numeric(const struct tagcache_search *tcs, int tag); +bool tagcache_modify_numeric_entry(struct tagcache_search *tcs, + int tag, long data); struct tagcache_stat* tagcache_get_stat(void); int tagcache_get_commit_step(void); |