ifc_omserviceeventmngr.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef NULLSOFT_WINAMP_OMSERVICE_EVENTMANAGER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_OMSERVICE_EVENTMANAGER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/dispatch.h>
  7. // {2ED54062-1442-4dfb-B0AE-C43846BE4FCE}
  8. static const GUID IFC_OmServiceEventMngr =
  9. { 0x2ed54062, 0x1442, 0x4dfb, { 0xb0, 0xae, 0xc4, 0x38, 0x46, 0xbe, 0x4f, 0xce } };
  10. class ifc_omservice;
  11. class ifc_omserviceevent;
  12. class __declspec(novtable) ifc_omserviceeventmngr : public Dispatchable
  13. {
  14. protected:
  15. ifc_omserviceeventmngr() {}
  16. ~ifc_omserviceeventmngr() {}
  17. public:
  18. HRESULT RegisterHandler(ifc_omserviceevent *handler);
  19. HRESULT UnregisterHandler(ifc_omserviceevent *handler);
  20. HRESULT Signal_ServiceChange(unsigned int modifiedFlags);
  21. HRESULT Signal_CommandStateChange(const GUID *commandGroup, unsigned int commandId);
  22. public:
  23. DISPATCH_CODES
  24. {
  25. API_REGISTERHANDLER = 10,
  26. API_UNREGISTERHANDLER = 20,
  27. API_SIGNAL_SERVICECHANGE = 30,
  28. API_SIGNAL_COMMANDSTATECHANGE = 40,
  29. };
  30. };
  31. inline HRESULT ifc_omserviceeventmngr::RegisterHandler(ifc_omserviceevent *handler)
  32. {
  33. return _call(API_REGISTERHANDLER, (HRESULT)E_NOTIMPL, handler);
  34. }
  35. inline HRESULT ifc_omserviceeventmngr::UnregisterHandler(ifc_omserviceevent *handler)
  36. {
  37. return _call(API_UNREGISTERHANDLER, (HRESULT)E_NOTIMPL, handler);
  38. }
  39. inline HRESULT ifc_omserviceeventmngr::Signal_ServiceChange(unsigned int modifiedFlags)
  40. {
  41. return _call(API_SIGNAL_SERVICECHANGE, (HRESULT)E_NOTIMPL, modifiedFlags);
  42. }
  43. inline HRESULT ifc_omserviceeventmngr::Signal_CommandStateChange( const GUID *commandGroup, unsigned int commandId)
  44. {
  45. return _call(API_SIGNAL_COMMANDSTATECHANGE, (HRESULT)E_NOTIMPL, commandGroup, commandId);
  46. }
  47. #endif //NULLSOFT_WINAMP_OMSERVICE_EVENTMANAGER_INTERFACE_HEADER