flags.h 884 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef NULLSOFT_APEV2_FLAGS_H
  2. #define NULLSOFT_APEV2_FLAGS_H
  3. namespace APEv2
  4. {
  5. enum
  6. {
  7. APEV2_SUCCESS = 0,
  8. APEV2_FAILURE = 1,
  9. APEV2_TOO_SMALL = 2,
  10. APEV2_KEY_NOT_FOUND=3,
  11. APEV2_NO_DATA = 4, /* Key found, but data is empty or corrupt */
  12. APEV2_END_OF_ITEMS=5,
  13. };
  14. /*
  15. http://wiki.hydrogenaudio.org/index.php?title=Ape_Tags_Flags
  16. */
  17. enum
  18. {
  19. /* flags for header or item */
  20. FLAG_READONLY = 1,
  21. /* header/footer specific flags */
  22. FLAG_HEADER_HAS_HEADER = (1 << 31),
  23. FLAG_HEADER_NO_FOOTER = (1 << 30),
  24. FLAG_HEADER_IS_HEADER = (1 << 29),
  25. FLAG_HEADER_ENCODE_MASK = FLAG_READONLY|FLAG_HEADER_HAS_HEADER|FLAG_HEADER_NO_FOOTER,
  26. /* item specific flags */
  27. MASK_ITEM_TYPE = ((1 << 2) | (1 << 1)),
  28. FLAG_ITEM_TEXT = 0,
  29. FLAG_ITEM_BINARY = (1 << 1), /* We compare WITHOUT SHIFTING so all flag values are << 1 */
  30. FLAG_ITEM_LOCATOR = (2 << 1),
  31. FLAG_ITEM_RESERVED = (3 << 1),
  32. };
  33. }
  34. #endif