1
0

ifc_filemetadata_editor.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "foundation/dispatch.h"
  3. #include "foundation/error.h"
  4. #include "metadata/ifc_metadata_editor.h"
  5. class ifc_filemetadata_editor : public Wasabi2::Dispatchable
  6. {
  7. protected:
  8. ifc_filemetadata_editor() : Wasabi2::Dispatchable(DISPATCHABLE_VERSION) {}
  9. ~ifc_filemetadata_editor() {}
  10. public:
  11. ns_error_t GetMetdataObject(ifc_metadata_editor **metadata) { return FileMetadata_GetMetdataObject(metadata); }
  12. ns_error_t Save(nx_file_t file) { return FileMetadata_Save(file); }
  13. ns_error_t RequireTempFile() { return FileMetadata_RequireTempFile(); }
  14. ns_error_t SaveAs(nx_file_t destination, nx_file_t source) { return FileMetadata_SaveAs(destination, source); }
  15. void Close() { FileMetadata_Close(); }
  16. ns_error_t WantID3v2(int *position) { return FileMetadata_WantID3v2(position); }
  17. ns_error_t WantID3v1() { return FileMetadata_WantID3v1(); }
  18. ns_error_t WantAPEv2(int *position) { return FileMetadata_WantAPEv2(position); }
  19. ns_error_t WantLyrics3() { return FileMetadata_WantLyrics3(); }
  20. enum
  21. {
  22. DISPATCHABLE_VERSION=0,
  23. TAG_POSITION_INDIFFERENT=0,
  24. TAG_POSITION_PREPENDED=1,
  25. TAG_POSITION_APPENDED=2,
  26. };
  27. protected:
  28. virtual ns_error_t WASABICALL FileMetadata_GetMetdataObject(ifc_metadata_editor **metadata)=0;
  29. virtual ns_error_t WASABICALL FileMetadata_Save(nx_file_t file) { return NErr_NotImplemented; }
  30. virtual ns_error_t WASABICALL FileMetadata_RequireTempFile()=0;
  31. virtual ns_error_t WASABICALL FileMetadata_SaveAs(nx_file_t destination, nx_file_t source) { return NErr_NotImplemented; }
  32. virtual void WASABICALL FileMetadata_Close() {}
  33. virtual ns_error_t WASABICALL FileMetadata_WantID3v2(int *position) { return NErr_False; }
  34. virtual ns_error_t WASABICALL FileMetadata_WantID3v1() { return NErr_False; }
  35. virtual ns_error_t WASABICALL FileMetadata_WantAPEv2(int *position) { return NErr_False; }
  36. virtual ns_error_t WASABICALL FileMetadata_WantLyrics3() { return NErr_False; }
  37. };