aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/metadata/api_artwork.h
blob: b4ee6be572afe37fa883e6c61609ce9d8e3495d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
};