blob: 60b9ee7068348530ad94140c8ed4d64ae15c681d (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#ifndef _NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_HEADER
#define _NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_HEADER
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#include "./ifc_devicecommand.h"
#include "./ifc_devicecommandeditor.h"
#include "./ifc_deviceiconstore.h"
#include "./deviceIconStore.h"
#include <bfc/multipatch.h>
#define MPIID_DEVICECOMMAND 10
#define MPIID_DEVICECOMMANDEDITOR 20
class DeviceCommand : public MultiPatch<MPIID_DEVICECOMMAND, ifc_devicecommand>,
public MultiPatch<MPIID_DEVICECOMMANDEDITOR, ifc_devicecommandeditor>
{
protected:
DeviceCommand();
~DeviceCommand();
public:
static HRESULT CreateInstance(const char *name, DeviceCommand **instance);
public:
/* Dispatchable */
size_t AddRef();
size_t Release();
int QueryInterface(GUID interface_guid, void **object);
/* ifc_devicecommand */
const char *GetName();
HRESULT GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height);
HRESULT GetDisplayName(wchar_t *buffer, size_t bufferSize);
HRESULT GetDescription(wchar_t *buffer, size_t bufferSize);
/* ifc_devicetypeeditor */
HRESULT GetIconStore(ifc_deviceiconstore **store);
HRESULT SetDisplayName(const wchar_t *displayName);
HRESULT SetDescription(const wchar_t *description);
public:
void Lock();
void Unlock();
protected:
size_t ref;
char *name;
wchar_t *displayName;
wchar_t *description;
DeviceIconStore *iconStore;
CRITICAL_SECTION lock;
protected:
RECVS_MULTIPATCH;
};
#endif // _NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_HEADER
|