fix FS#8701 - metronome doesnt change back to ui font after drawing
[Rockbox.git] / apps / metadata / metadata_common.h
blob272a3913ab84e6ae330354cdcee084dba7d366fd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 Dave Chapman
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include "id3.h"
21 #ifdef ROCKBOX_BIG_ENDIAN
22 #define IS_BIG_ENDIAN 1
23 #else
24 #define IS_BIG_ENDIAN 0
25 #endif
27 #define TAG_NAME_LENGTH 32
28 #define TAG_VALUE_LENGTH 128
30 enum tagtype { TAGTYPE_APE = 1, TAGTYPE_VORBIS };
32 bool read_ape_tags(int fd, struct mp3entry* id3);
33 bool read_vorbis_tags(int fd, struct mp3entry *id3,
34 long tag_remaining);
36 bool skip_id3v2(int fd, struct mp3entry *id3);
37 long read_string(int fd, char* buf, long buf_size, int eos, long size);
39 #ifdef ROCKBOX_BIG_ENDIAN
40 #define read_uint32be(fd,buf) read((fd), (buf), 4)
41 int read_uint16le(int fd, uint16_t* buf);
42 int read_uint32le(int fd, uint32_t* buf);
43 int read_uint64le(int fd, uint64_t* buf);
44 #else
45 int read_uint32be(int fd, unsigned int* buf);
46 #define read_uint16le(fd,buf) read((fd), (buf), 2)
47 #define read_uint32le(fd,buf) read((fd), (buf), 4)
48 #define read_uint64le(fd,buf) read((fd), (buf), 8)
49 #endif
51 unsigned long get_long_le(void* buf);
52 unsigned short get_short_le(void* buf);
53 unsigned long get_long_be(void* buf);
54 long get_slong(void* buf);
55 unsigned long get_itunes_int32(char* value, int count);
56 long parse_tag(const char* name, char* value, struct mp3entry* id3,
57 char* buf, long buf_remaining, enum tagtype type);