Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: E V T O B J . H
  7. //
  8. // Contents: Declares the Eventing Manager object for the UPnP Device Host
  9. // API
  10. //
  11. // Notes:
  12. //
  13. // Author: danielwe 7 Aug 2000
  14. //
  15. //----------------------------------------------------------------------------
  16. #ifndef _EVTOBJ_H
  17. #define _EVTOBJ_H
  18. #pragma once
  19. #include "uhres.h"
  20. #include "hostp.h"
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CUPnPEventingManager
  23. class ATL_NO_VTABLE CUPnPEventingManager :
  24. public CComObjectRootEx<CComMultiThreadModel>,
  25. public CComCoClass<CUPnPEventingManager, &CLSID_UPnPEventingManager>,
  26. public IUPnPEventingManager,
  27. public IUPnPEventSink
  28. {
  29. private:
  30. LPWSTR m_szEsid;
  31. IUPnPEventSource * m_pues;
  32. IUPnPAutomationProxy * m_puap;
  33. public:
  34. DECLARE_PROTECT_FINAL_CONSTRUCT()
  35. DECLARE_REGISTRY_RESOURCEID(IDR_EVENTING_MANAGER)
  36. DECLARE_NOT_AGGREGATABLE(CUPnPEventingManager)
  37. BEGIN_COM_MAP(CUPnPEventingManager)
  38. COM_INTERFACE_ENTRY(IUPnPEventingManager)
  39. COM_INTERFACE_ENTRY(IUPnPEventSink)
  40. END_COM_MAP()
  41. CUPnPEventingManager(VOID)
  42. {
  43. m_szEsid = NULL;
  44. m_pues = NULL;
  45. m_puap = NULL;
  46. }
  47. // IUPnPEventingManager
  48. public:
  49. STDMETHOD(Initialize)(/* [in] */ LPCWSTR szUdn,
  50. /* [in] */ LPCWSTR szSid,
  51. /* [in] */ IUPnPAutomationProxy *puap,
  52. /* [in] */ IUnknown *punkSvc,
  53. /* [in] */ BOOL bRunning);
  54. STDMETHOD(AddSubscriber)(/* [in] */ DWORD cszUrl,
  55. /* [size_is][in] */ LPCWSTR *rgszCallbackUrl,
  56. /* [in] */ DWORD dwIpAddr,
  57. /* [in,out] */ DWORD *pcsecTimeout,
  58. /* [out] */ LPWSTR *pszSid);
  59. STDMETHOD(RenewSubscriber)(/* [in,out] */ DWORD *pcsecTimeout,
  60. /* [in] */ LPWSTR szSid);
  61. STDMETHOD(RemoveSubscriber)(/* [in] */ LPWSTR szSid);
  62. STDMETHOD(Shutdown)(VOID);
  63. // IUPnPEventSink
  64. public:
  65. STDMETHOD(OnStateChanged)(/* [in] */ DWORD cChanges,
  66. /* [size_is][in] */ DISPID rgdispidChanges[]);
  67. STDMETHOD(OnStateChangedSafe)(/* [in] */ VARIANT varsadispidChanges);
  68. // ATL methods
  69. HRESULT FinalConstruct() {return S_OK;}
  70. HRESULT FinalRelease();
  71. };
  72. HRESULT HrComposeEventBody(IUPnPAutomationProxy* puap, DWORD cVars, LPWSTR *rgszNames, LPWSTR *rgszTypes,
  73. VARIANT *rgvarValues, LPWSTR *pszBody);
  74. VOID RemoveDuplicateDispids(DWORD *pcChanges, DISPID *rgdispids);
  75. #endif //!_EVTOBJ_H