1
0

api_artwork.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "service/types.h"
  3. #include "nx/nx.h"
  4. #include "foundation/foundation.h"
  5. #include "metadata/types.h"
  6. // {60DB7F78-0238-4DA7-9260-87E60D30FAC4}
  7. static const GUID artwork_api_guid =
  8. { 0x60db7f78, 0x238, 0x4da7, { 0x92, 0x60, 0x87, 0xe6, 0xd, 0x30, 0xfa, 0xc4 } };
  9. // ----------------------------------------------------------------------------
  10. class NOVTABLE api_artwork : public Wasabi2::Dispatchable
  11. {
  12. protected:
  13. api_artwork() : Dispatchable(DISPATCHABLE_VERSION) {}
  14. ~api_artwork() {}
  15. public:
  16. static GUID GetServiceType() { return SVC_TYPE_UNIQUE; }
  17. static GUID GetServiceGUID() { return artwork_api_guid; }
  18. /* returns the data for the first piece of artwork found
  19. pass NULL for any of the values that you don't care about */
  20. int GetArtwork(nx_uri_t filename, unsigned int field, artwork_t *artwork, data_flags_t flags=DATA_FLAG_ALL, nx_time_unix_64_t *file_modified=0)
  21. {
  22. return Artwork_GetArtwork(filename, field, artwork, flags, file_modified);
  23. }
  24. enum
  25. {
  26. DISPATCHABLE_VERSION,
  27. };
  28. protected:
  29. virtual int WASABICALL Artwork_GetArtwork(nx_uri_t filename, unsigned int field, artwork_t *artwork, data_flags_t flags, nx_time_unix_64_t *file_modified)=0;
  30. };