ID3v1.h 668 B

1234567891011121314151617181920212223242526272829
  1. #ifndef NULLSOFT_IN_MP3_ID3V1_H
  2. #define NULLSOFT_IN_MP3_ID3V1_H
  3. #include <bfc/platform/types.h>
  4. class ID3v1
  5. {
  6. public:
  7. ID3v1();
  8. int Decode(const void *data);
  9. // return -1 for empty, 1 for OK, 0 for "don't understand tag name"
  10. int GetString(const char *tag, wchar_t *data, int dataLen);
  11. // returns 1 for OK, 0 for "don't understand tag name"
  12. int SetString(const char *tag, const wchar_t *data);
  13. int Encode(void *data);
  14. bool IsDirty() { return dirty; }
  15. bool HasData() { return hasData; }
  16. void Clear();
  17. private:
  18. char title[31],artist[31],album[31],comment[31];
  19. char year[5];
  20. unsigned char genre;
  21. unsigned char track;
  22. bool hasData;
  23. bool dirty;
  24. };
  25. #endif