diff options
| author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
| commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
| tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/metadata/api_artwork.h | |
| parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
| parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
| download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz | |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/replicant/metadata/api_artwork.h')
| -rw-r--r-- | Src/replicant/metadata/api_artwork.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Src/replicant/metadata/api_artwork.h b/Src/replicant/metadata/api_artwork.h new file mode 100644 index 00000000..b4ee6be5 --- /dev/null +++ b/Src/replicant/metadata/api_artwork.h @@ -0,0 +1,35 @@ +#pragma once +#include "service/types.h" +#include "nx/nx.h" +#include "foundation/foundation.h" +#include "metadata/types.h" + +// {60DB7F78-0238-4DA7-9260-87E60D30FAC4} +static const GUID artwork_api_guid = +{ 0x60db7f78, 0x238, 0x4da7, { 0x92, 0x60, 0x87, 0xe6, 0xd, 0x30, 0xfa, 0xc4 } }; + +// ---------------------------------------------------------------------------- +class NOVTABLE api_artwork : public Wasabi2::Dispatchable +{ +protected: + api_artwork() : Dispatchable(DISPATCHABLE_VERSION) {} + ~api_artwork() {} +public: + static GUID GetServiceType() { return SVC_TYPE_UNIQUE; } + static GUID GetServiceGUID() { return artwork_api_guid; } + + /* returns the data for the first piece of artwork found + pass NULL for any of the values that you don't care about */ + 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) + { + return Artwork_GetArtwork(filename, field, artwork, flags, file_modified); + } + enum + { + DISPATCHABLE_VERSION, + }; + +protected: + 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; +}; + |
