aac: Collect all interesting ID3 frames
[cmus.git] / comment.h
blob1c87326a31bec60c46cf22317e4c0cc2ffc30fdf
1 #ifndef _COMMENT_H
2 #define _COMMENT_H
4 struct keyval {
5 char *key;
6 char *val;
7 };
9 struct growing_keyvals {
10 struct keyval *comments;
11 int alloc;
12 int count;
15 #define GROWING_KEYVALS(name) struct growing_keyvals name = { NULL, 0, 0 }
17 struct keyval *comments_dup(const struct keyval *comments);
18 void comments_free(struct keyval *comments);
20 /* case insensitive key */
21 const char *comments_get_val(const struct keyval *comments, const char *key);
22 const char *comments_get_albumartist(const struct keyval *comments);
23 int comments_get_int(const struct keyval *comments, const char *key);
24 int comments_get_date(const struct keyval *comments, const char *key);
26 int comments_add(struct growing_keyvals *c, const char *key, char *val);
27 int comments_add_const(struct growing_keyvals *c, const char *key, const char *val);
28 void comments_terminate(struct growing_keyvals *c);
30 #endif