aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_mp3/ID3v2.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Plugins/Input/in_mp3/ID3v2.h')
-rw-r--r--Src/Plugins/Input/in_mp3/ID3v2.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Src/Plugins/Input/in_mp3/ID3v2.h b/Src/Plugins/Input/in_mp3/ID3v2.h
new file mode 100644
index 00000000..f7f21f0e
--- /dev/null
+++ b/Src/Plugins/Input/in_mp3/ID3v2.h
@@ -0,0 +1,33 @@
+#ifndef NULLSOFT_IN_MP3_ID3v2_H
+#define NULLSOFT_IN_MP3_ID3v2_H
+
+#include "../id3v2/id3_tag.h"
+
+class ID3v2
+{
+public:
+ ID3v2();
+ bool HasData() { return hasData; }
+ bool IsDirty() { return dirty; }
+ int Decode(const void *data, size_t len);
+ int Encode(const void *data, size_t len);
+ uint32_t EncodeSize();
+ // return -1 for empty, 1 for OK, 0 for "don't understand tag name"
+ int GetString(const char *tag, wchar_t *data, int dataLen);
+ int SetString(const char *tag, const wchar_t *data);
+
+ int GetAlbumArt(const wchar_t *type, void **bits, size_t *len, wchar_t **mimeType);
+ int SetAlbumArt(const wchar_t *type, void *bits, size_t len, const wchar_t *mimeType);
+ int DeleteAlbumArt(const wchar_t *type);
+
+ void Clear();
+private:
+ void add_set_id3v2_frame(ID3_FrameID id, const wchar_t *c);
+ void add_set_latin_id3v2_frame(ID3_FrameID id, const wchar_t *c);
+ bool hasData;
+ bool dirty;
+public:
+ ID3_Tag id3v2;
+};
+
+#endif \ No newline at end of file