aboutsummaryrefslogtreecommitdiff
path: root/Src/devices/ifc_deviceobject.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/devices/ifc_deviceobject.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/devices/ifc_deviceobject.h')
-rw-r--r--Src/devices/ifc_deviceobject.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/Src/devices/ifc_deviceobject.h b/Src/devices/ifc_deviceobject.h
new file mode 100644
index 00000000..3653e649
--- /dev/null
+++ b/Src/devices/ifc_deviceobject.h
@@ -0,0 +1,55 @@
+#ifndef _NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER
+#define _NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+#include <bfc/platform/guid.h>
+
+// {90A1273D-3E52-415f-ADC1-F151E6240C5B}
+static const GUID IFC_DeviceObject =
+{ 0x90a1273d, 0x3e52, 0x415f, { 0xad, 0xc1, 0xf1, 0x51, 0xe6, 0x24, 0xc, 0x5b } };
+
+
+#include <bfc/dispatch.h>
+
+
+// supports AddRef(), Release(), QueryInterface()
+class __declspec(novtable) ifc_deviceobject : public Dispatchable
+{
+protected:
+ ifc_deviceobject() {}
+ ~ifc_deviceobject() {}
+
+public:
+ const char *GetName();
+ HRESULT GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height);
+ HRESULT GetDisplayName(wchar_t *buffer, size_t bufferSize);
+
+public:
+ DISPATCH_CODES
+ {
+ API_GETNAME = -10,
+ API_GETICON = -11,
+ API_GETDISPLAYNAME = -12,
+ };
+};
+
+
+inline const char *ifc_deviceobject::GetName()
+{
+ return _call(API_GETNAME, (const char *)NULL);
+}
+
+inline HRESULT ifc_deviceobject::GetIcon(wchar_t *buffer, size_t bufferSize, int width, int height)
+{
+ return _call(API_GETICON, (HRESULT)E_NOTIMPL, buffer, bufferSize, width, height);
+}
+
+inline HRESULT ifc_deviceobject::GetDisplayName(wchar_t *buffer, size_t bufferSize)
+{
+ return _call(API_GETDISPLAYNAME, (HRESULT)E_NOTIMPL, buffer, bufferSize);
+}
+
+#endif //_NULLSOFT_WINAMP_DEVICES_DEVICE_OBJECT_INTERFACE_HEADER \ No newline at end of file