apev2.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLSOFT_IN_MP3_APEV2_H
  2. #define NULLSOFT_IN_MP3_APEV2_H
  3. #include "../apev2/tag.h"
  4. class APE : private APEv2::Tag
  5. {
  6. public:
  7. APE();
  8. bool HasData() { return hasData; }
  9. bool IsDirty() { return dirty; }
  10. void ResetDirty() { dirty=0; hasData = true; }
  11. void Clear();
  12. void MarkClear();
  13. int Decode(const void *data, size_t len);
  14. // return -1 for empty, 1 for OK, 0 for "don't understand tag name"
  15. int GetString(const char *tag, wchar_t *data, int dataLen);
  16. int SetString(const char *tag, const wchar_t *data);
  17. int AddKeyValue(const char *key, const wchar_t *data);
  18. int SetKeyValueByIndex(size_t index, const char *key, const wchar_t *data);
  19. int RemoveItem(size_t index);
  20. int AddItem();
  21. static const char *MapApeKeyToWinampKey(const char *ape_key);
  22. static const wchar_t *MapApeKeyToWinampKeyW(const char *ape_key);
  23. static const char *MapWinampKeyToApeKey(const char *winamp_key);
  24. using APEv2::Tag::EnumValue;
  25. using APEv2::Tag::EncodeSize;
  26. using APEv2::Tag::Encode;
  27. using APEv2::Tag::FindItemByKey;
  28. using APEv2::Tag::GetNumItems;
  29. using APEv2::Tag::IsItemReadOnly;
  30. using APEv2::Tag::SetFlags;
  31. private:
  32. bool hasData;
  33. bool dirty;
  34. };
  35. #endif