Leaked source code of windows server 2003
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.

53 lines
1.6 KiB

  1. #pragma once
  2. #include "InternetGatewayDevice.h"
  3. #include "dispimpl2.h"
  4. #include "resource.h" // main symbols
  5. #include "upnphost.h"
  6. #include "netconp.h"
  7. #include "netcon.h"
  8. #include "ras.h"
  9. class ATL_NO_VTABLE CWANPOTSLinkConfigService :
  10. public CComObjectRootEx<CComMultiThreadModel>,
  11. public IDelegatingDispImpl<IWANPOTSLinkConfigService>,
  12. public IUPnPEventSource
  13. {
  14. public:
  15. DECLARE_REGISTRY_RESOURCEID(IDR_SAMPLE_DEVICE)
  16. DECLARE_PROTECT_FINAL_CONSTRUCT()
  17. BEGIN_COM_MAP(CWANPOTSLinkConfigService)
  18. COM_INTERFACE_ENTRY(IWANPOTSLinkConfigService)
  19. COM_INTERFACE_ENTRY(IDispatch)
  20. COM_INTERFACE_ENTRY(IUPnPEventSource)
  21. END_COM_MAP()
  22. CWANPOTSLinkConfigService();
  23. HRESULT Initialize(INetConnection* pNetConnection);
  24. HRESULT FinalRelease(void);
  25. // IUPnPEventSource methods
  26. STDMETHODIMP Advise(IUPnPEventSink *pesSubscriber);
  27. STDMETHODIMP Unadvise(IUPnPEventSink *pesSubscriber);
  28. // IWANPOTSLinkConfigService
  29. STDMETHODIMP get_ISPPhoneNumber(BSTR* pISPPhoneNumber);
  30. STDMETHODIMP get_ISPInfo(BSTR *pISPInfo);
  31. STDMETHODIMP get_LinkType(BSTR *pLinkType);
  32. STDMETHODIMP get_NumberOfRetries(ULONG *pNumberOfRetries);
  33. STDMETHODIMP get_DelayBetweenRetries(ULONG *pDelayBetweenRetries);
  34. STDMETHODIMP GetISPInfo(BSTR* pISPPhoneNumber, BSTR *pISPInfo, BSTR *pLinkType);
  35. STDMETHODIMP GetCallRetryInfo(ULONG* pNumberOfRetries, ULONG *pDelayBetweenRetries);
  36. private:
  37. HRESULT GetRasEntry(RASENTRY** ppRasEntry);
  38. IUPnPEventSink* m_pEventSink;
  39. INetRasConnection* m_pNetRasConnection;
  40. };