1
0

ID3v2.h 923 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef NULLSOFT_IN_MP3_ID3v2_H
  2. #define NULLSOFT_IN_MP3_ID3v2_H
  3. #include "../id3v2/id3_tag.h"
  4. class ID3v2
  5. {
  6. public:
  7. ID3v2();
  8. bool HasData() { return hasData; }
  9. bool IsDirty() { return dirty; }
  10. int Decode(const void *data, size_t len);
  11. int Encode(const void *data, size_t len);
  12. uint32_t EncodeSize();
  13. // return -1 for empty, 1 for OK, 0 for "don't understand tag name"
  14. int GetString(const char *tag, wchar_t *data, int dataLen);
  15. int SetString(const char *tag, const wchar_t *data);
  16. int GetAlbumArt(const wchar_t *type, void **bits, size_t *len, wchar_t **mimeType);
  17. int SetAlbumArt(const wchar_t *type, void *bits, size_t len, const wchar_t *mimeType);
  18. int DeleteAlbumArt(const wchar_t *type);
  19. void Clear();
  20. private:
  21. void add_set_id3v2_frame(ID3_FrameID id, const wchar_t *c);
  22. void add_set_latin_id3v2_frame(ID3_FrameID id, const wchar_t *c);
  23. bool hasData;
  24. bool dirty;
  25. public:
  26. ID3_Tag id3v2;
  27. };
  28. #endif