-
Notifications
You must be signed in to change notification settings - Fork 37
/
ArtworkProvider.h
28 lines (23 loc) · 1.1 KB
/
ArtworkProvider.h
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
#pragma once
#include "IUnknownInterfaceImpl.h"
#include "SDK/apiAlbumArt.h"
#include "Tools.h"
class ArtworkProvider : public IUnknownInterfaceImpl<IAIMPExtensionAlbumArtProvider2> {
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvObj) {
if (!ppvObj) return E_POINTER;
if (riid == IID_IAIMPExtensionAlbumArtProvider) {
*ppvObj = static_cast<IAIMPExtensionAlbumArtProvider *>(this);
AddRef();
return S_OK;
}
if (riid == IID_IAIMPExtensionAlbumArtProvider2) {
*ppvObj = static_cast<IAIMPExtensionAlbumArtProvider2 *>(this);
AddRef();
return S_OK;
}
return E_NOINTERFACE;
}
virtual DWORD WINAPI GetCategory() { return AIMP_ALBUMART_PROVIDER_CATEGORY_FILE; }
virtual HRESULT WINAPI Get(IAIMPString *FileURI, IAIMPString *Artist, IAIMPString *Album, IAIMPPropertyList *Options, IAIMPImageContainer **Image) { return E_NOTIMPL; }
virtual HRESULT WINAPI Get2(IAIMPFileInfo *FileInfo, IAIMPPropertyList *Options, IAIMPImageContainer **Image);
};