ref: f0bb0451afe4b3d4719c6b2446dfa8034c9eb4fc
dir: /dat.h/
enum decmsg{ START, STOP, PAUSE, NEXT, }; /* * ID3v1 represents the first version of ID3 metainformation. * The spec does not define character set, so we treat it as * UTF8, which should cover most bases. * See: http://id3.org/ID3v1 */ typedef struct ID3v1 ID3v1; struct ID3v1{ Rune *title; Rune *artist; Rune *album; int year; Rune *comment; char genre; }; typedef struct VorbisMeta VorbisMeta; struct VorbisMeta{ /* Raw values */ uint ncom; Rune **key; Rune **val; /* Common Tags */ Rune *title; Rune *artist; Rune *album; int year; int tracknumber; }; typedef struct FlacPic FlacPic; struct FlacPic{ char *mime; Rune *desc; Point p; uvlong size; uchar *data; }; typedef struct FlacMeta FlacMeta; struct FlacMeta{ VorbisMeta *com; FlacPic *pic; }; enum metatype{ FLAC, MP3, VORBIS, }; typedef struct Song Song; struct Song{ enum metatype type; union { FlacMeta *fmeta; VorbisMeta *vmeta; ID3v1 *idmeta; }; char *path; }; typedef struct Album Album; struct Album{ char *path; Rune *name; Image *cover; int nsong; Song **songs; };