diff options
author | Niels Laukens <niobos@rockbox.org> | 2005-07-06 11:03:20 +0000 |
---|---|---|
committer | Niels Laukens <niobos@rockbox.org> | 2005-07-06 11:03:20 +0000 |
commit | d1c294c17de95615b7af428da938b686830b42df (patch) | |
tree | 950080f5b6c9503c090df6e4f0929f13eae8891e /apps/tagdb/header.h | |
parent | 5e9f52f6d1f3356bc6df75a675e1a2d5cdbf9d77 (diff) | |
download | rockbox-d1c294c17de95615b7af428da938b686830b42df.tar.gz rockbox-d1c294c17de95615b7af428da938b686830b42df.zip |
Initial import of tagdb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7039 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagdb/header.h')
-rw-r--r-- | apps/tagdb/header.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/tagdb/header.h b/apps/tagdb/header.h new file mode 100644 index 0000000000..08a563ec72 --- /dev/null +++ b/apps/tagdb/header.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef __HEADER_H__ | ||
2 | #define __HEADER_H__ | ||
3 | |||
4 | #include "config.h" | ||
5 | |||
6 | #define HEADER_SIZE 68 | ||
7 | |||
8 | struct header { | ||
9 | char magic[3]; // (four bytes: 'R' 'D' 'B' and a byte for version. This is version 2. (0x02) | ||
10 | unsigned char version; | ||
11 | |||
12 | uint32_t artist_start; // File Offset to the artist table(starting from 0) | ||
13 | uint32_t album_start; // File Offset to the album table(starting from 0) | ||
14 | uint32_t song_start; // File Offset of the song table(starting from 0) | ||
15 | uint32_t file_start; // File Offset to the filename table(starting from 0) | ||
16 | |||
17 | uint32_t artist_count; // Number of artists | ||
18 | uint32_t album_count; // Number of albums | ||
19 | uint32_t song_count; // Number of songs | ||
20 | uint32_t file_count; // Number of File Entries, this is needed for the binary search. | ||
21 | |||
22 | uint32_t artist_len; // Max Length of the artist name field | ||
23 | uint32_t album_len; // Max Length of the album name field | ||
24 | uint32_t song_len; // Max Length of the song name field | ||
25 | uint32_t genre_len; // Max Length of the genre field | ||
26 | uint32_t file_len; // Max Length of the filename field. | ||
27 | |||
28 | uint32_t song_array_count; // Number of entries in songs-per-album array | ||
29 | uint32_t album_array_count; // Number of entries in albums-per-artist array | ||
30 | |||
31 | struct { | ||
32 | unsigned reserved : 31; // must be 0 | ||
33 | unsigned rundb_dirty : 1; // if the TagDatabase in unsynchronized with the RuntimeDatabase, 0 if synchronized. | ||
34 | } flags; | ||
35 | }; | ||
36 | |||
37 | int header_write(FILE *fd, const struct header *header); | ||
38 | |||
39 | #endif | ||