1
0

ifc_devicecommandinfo.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef _NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_INFO_INTERFACE_HEADER
  2. #define _NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_INFO_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {EFFB983B-D087-4021-8894-BA795626048B}
  7. static const GUID IFC_DeviceCommandInfo =
  8. { 0xeffb983b, 0xd087, 0x4021, { 0x88, 0x94, 0xba, 0x79, 0x56, 0x26, 0x4, 0x8b } };
  9. #include <bfc/dispatch.h>
  10. // supports AddRef(), Release(), QueryInterface()
  11. class __declspec(novtable) ifc_devicecommandinfo : public Dispatchable
  12. {
  13. protected:
  14. ifc_devicecommandinfo() {}
  15. ~ifc_devicecommandinfo() {}
  16. public:
  17. const wchar_t *GetName();
  18. HRESULT GetState(DeviceCommandState *state);
  19. public:
  20. DISPATCH_CODES
  21. {
  22. API_GETNAME = 10,
  23. API_GETSTATE = 20,
  24. };
  25. };
  26. inline const wchar_t *ifc_devicetype::GetName()
  27. {
  28. return _call(API_GETNAME, (const wchar_t *)NULL);
  29. }
  30. inline HRESULT ifc_devicetype::GetIcon(wchar_t *buffer, size_t bufferSize, DeviceIconType preferredType)
  31. {
  32. return _call(API_GETICON, (HRESULT)E_NOTIMPL, buffer, bufferSize, preferredType);
  33. }
  34. inline HRESULT ifc_devicetype::GetDisplayName(wchar_t *buffer, size_t bufferSize)
  35. {
  36. return _call(API_GETDISPLAYNAME, (HRESULT)E_NOTIMPL, buffer, bufferSize);
  37. }
  38. #endif //_NULLSOFT_WINAMP_DEVICES_DEVICE_COMMAND_INFO_INTERFACE_HEADER