ifc_devicesupportedcommandstore.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #ifndef _NULLSOFT_WINAMP_DEVICES_DEVICE_SUPPORTED_COMMAND_STORE_INTERFACE_HEADER
  2. #define _NULLSOFT_WINAMP_DEVICES_DEVICE_SUPPORTED_COMMAND_STORE_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/platform/guid.h>
  7. // {098C1639-7E02-4f03-9F75-B871EC867E61}
  8. static const GUID IFC_DeviceSupportedCommandStore =
  9. { 0x98c1639, 0x7e02, 0x4f03, { 0x9f, 0x75, 0xb8, 0x71, 0xec, 0x86, 0x7e, 0x61 } };
  10. #include <bfc/dispatch.h>
  11. class ifc_devicesupportedcommand;
  12. // supports AddRef(), Release(), QueryInterface()
  13. class __declspec(novtable) ifc_devicesupportedcommandstore : public Dispatchable
  14. {
  15. protected:
  16. ifc_devicesupportedcommandstore() {}
  17. ~ifc_devicesupportedcommandstore() {}
  18. public:
  19. HRESULT Add(const char *name, DeviceCommandFlags flags);
  20. HRESULT Remove(const char *name);
  21. HRESULT RemoveAll();
  22. HRESULT GetFlags(const char *name, DeviceCommandFlags *flagsOut);
  23. HRESULT SetFlags(const char *name, DeviceCommandFlags mask, DeviceCommandFlags value);
  24. HRESULT Get(const char *name, ifc_devicesupportedcommand **command);
  25. HRESULT GetActive(ifc_devicesupportedcommand **command);
  26. HRESULT Enumerate(ifc_devicesupportedcommandenum **enumerator);
  27. HRESULT Clone(ifc_devicesupportedcommandstore **instance, BOOL fullCopy);
  28. public:
  29. DISPATCH_CODES
  30. {
  31. API_ADD = 10,
  32. API_REMOVE = 20,
  33. API_REMOVEALL = 30,
  34. API_GETFLAGS = 40,
  35. API_SETFLAGS = 50,
  36. API_GET = 60,
  37. API_GETACTIVE = 70,
  38. API_ENUMERATE = 80,
  39. API_CLONE = 90,
  40. };
  41. };
  42. inline HRESULT ifc_devicesupportedcommandstore::Add(const char *name, DeviceCommandFlags flags)
  43. {
  44. return _call(API_ADD, (HRESULT)E_NOTIMPL, name, flags);
  45. }
  46. inline HRESULT ifc_devicesupportedcommandstore::Remove(const char *name)
  47. {
  48. return _call(API_REMOVE, (HRESULT)E_NOTIMPL, name);
  49. }
  50. inline HRESULT ifc_devicesupportedcommandstore::RemoveAll()
  51. {
  52. return _call(API_REMOVEALL, (HRESULT)E_NOTIMPL);
  53. }
  54. inline HRESULT ifc_devicesupportedcommandstore::GetFlags(const char *name, DeviceCommandFlags *flagsOut)
  55. {
  56. return _call(API_GETFLAGS, (HRESULT)E_NOTIMPL, name, flagsOut);
  57. }
  58. inline HRESULT ifc_devicesupportedcommandstore::SetFlags(const char *name, DeviceCommandFlags mask, DeviceCommandFlags value)
  59. {
  60. return _call(API_SETFLAGS, (HRESULT)E_NOTIMPL, name, mask, value);
  61. }
  62. inline HRESULT ifc_devicesupportedcommandstore::Get(const char *name, ifc_devicesupportedcommand **command)
  63. {
  64. return _call(API_GET, (HRESULT)E_NOTIMPL, name, command);
  65. }
  66. inline HRESULT ifc_devicesupportedcommandstore::GetActive(ifc_devicesupportedcommand **command)
  67. {
  68. return _call(API_GETACTIVE, (HRESULT)E_NOTIMPL, command);
  69. }
  70. inline HRESULT ifc_devicesupportedcommandstore::Enumerate(ifc_devicesupportedcommandenum **enumerator)
  71. {
  72. return _call(API_ENUMERATE, (HRESULT)E_NOTIMPL, enumerator);
  73. }
  74. inline HRESULT ifc_devicesupportedcommandstore::Clone(ifc_devicesupportedcommandstore **instance, BOOL fullCopy)
  75. {
  76. return _call(API_CLONE, (HRESULT)E_NOTIMPL, instance, fullCopy);
  77. }
  78. #endif //_NULLSOFT_WINAMP_DEVICES_DEVICE_SUPPORTED_COMMAND_STORE_INTERFACE_HEADER