2 * Copyright 2005 Timo Hirvonen
10 /* flags for id3_read_tags */
11 #define ID3_V1 (1 << 0)
12 #define ID3_V2 (1 << 1)
34 char *v2
[NUM_ID3_KEYS
];
36 unsigned int has_v1
: 1;
37 unsigned int has_v2
: 1;
40 #define UTF16_IS_LSURROGATE(uch) (0xdc00 <= uch && 0xdfff >= uch)
41 #define UTF16_IS_HSURROGATE(uch) (0xd800 <= uch && 0xdbff >= uch)
42 #define UTF16_IS_BOM(uch) (uch == 0xfeff)
44 extern const char * const id3_key_names
[NUM_ID3_KEYS
];
46 int id3_tag_size(const char *buf
, int buf_size
);
48 static inline void id3_init(struct id3tag
*id3
)
50 memset(id3
, 0, sizeof(*id3
));
53 void id3_free(struct id3tag
*id3
);
54 int id3_read_tags(struct id3tag
*id3
, int fd
, unsigned int flags
);
55 char *id3_get_comment(struct id3tag
*id3
, enum id3_key key
);