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