1
0

APEv2Metadata.h 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "metadata/metadata.h"
  3. #include "nsapev2/nsapev2.h"
  4. /* this class mimics ifc_metadata and ifc_metadata_editor, but doesn't inherit (because it's not given out directly) */
  5. class APEv2Metadata
  6. {
  7. public:
  8. APEv2Metadata();
  9. ~APEv2Metadata();
  10. static int Initialize(api_metadata *metadata_api);
  11. int Initialize(nsapev2_tag_t tag);
  12. /* ifc_metadata implementation */
  13. int WASABICALL Metadata_GetField(int field, unsigned int index, nx_string_t *value);
  14. int WASABICALL Metadata_GetInteger(int field, unsigned int index, int64_t *value);
  15. int WASABICALL Metadata_GetReal(int field, unsigned int index, double *value);
  16. int WASABICALL Metadata_GetArtwork(int field, unsigned int index, artwork_t *artwork, data_flags_t flags);
  17. /* ifc_metadata_editor implementation */
  18. int WASABICALL MetadataEditor_SetField(int field, unsigned int index, nx_string_t value);
  19. int WASABICALL MetadataEditor_SetInteger(int field, unsigned int index, int64_t value);
  20. int WASABICALL MetadataEditor_SetReal(int field, unsigned int index, double value);
  21. int WASABICALL MetadataEditor_SetArtwork(int field, unsigned int index, artwork_t *data, data_flags_t flags);
  22. private:
  23. nsapev2_tag_t apev2_tag;
  24. static api_metadata *metadata_api;
  25. };