1
0

deviceManagerHandler.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _NULLSOFT_WINAMP_ML_DEVICES_DEVICE_MANAGER_HANDLER_HEADER
  2. #define _NULLSOFT_WINAMP_ML_DEVICES_DEVICE_MANAGER_HANDLER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include "../devices/api_devicemanager.h"
  8. //#include <ifc_devicemanagerevent.h>
  9. class DeviceManagerHandler: public ifc_devicemanagerevent
  10. {
  11. protected:
  12. DeviceManagerHandler();
  13. ~DeviceManagerHandler();
  14. public:
  15. static HRESULT CreateInstance(DeviceManagerHandler **instance);
  16. public:
  17. /* Dispatchable */
  18. size_t AddRef();
  19. size_t Release();
  20. int QueryInterface(GUID interface_guid, void **object);
  21. /* ifc_devicemanagerevent */
  22. void TypeAdded(api_devicemanager *manager, ifc_devicetype *type);
  23. void TypeRemoved(api_devicemanager *manager, ifc_devicetype *type);
  24. void ConnectionAdded(api_devicemanager *manager, ifc_deviceconnection *connection);
  25. void ConnectionRemoved(api_devicemanager *manager, ifc_deviceconnection *connection);
  26. void CommandAdded(api_devicemanager *manager, ifc_devicecommand *command);
  27. void CommandRemoved(api_devicemanager *manager, ifc_devicecommand *command);
  28. void DeviceAdded(api_devicemanager *manager, ifc_device *device);
  29. void DeviceRemoved(api_devicemanager *manager, ifc_device *device);
  30. void DiscoveryStarted(api_devicemanager *manager);
  31. void DiscoveryFinished(api_devicemanager *manager);
  32. public:
  33. HRESULT SetRelayWindow(HWND hwnd);
  34. HRESULT Advise(api_devicemanager *manager);
  35. HRESULT Unadvise(api_devicemanager *manager);
  36. protected:
  37. size_t ref;
  38. HWND relayWindow;
  39. protected:
  40. RECVS_DISPATCH;
  41. };
  42. #endif //_NULLSOFT_WINAMP_ML_DEVICES_DEVICE_MANAGER_HANDLER_HEADER