aboutsummaryrefslogtreecommitdiff
path: root/Src/devices/deviceCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/devices/deviceCommand.h')
-rw-r--r--Src/devices/deviceCommand.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/Src/devices/deviceCommand.h b/Src/devices/deviceCommand.h
new file mode 100644
index 00000000..60b9ee70
--- /dev/null
+++ b/Src/devices/deviceCommand.h
@@ -0,0 +1,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