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.

104 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxInboundRoutingExtension.h
  5. Abstract:
  6. Declaration of the CFaxInboundRoutingExtension class.
  7. Author:
  8. Iv Garber (IvG) Jul, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXINBOUNDROUTINGEXTENSION_H_
  12. #define __FAXINBOUNDROUTINGEXTENSION_H_
  13. #include "resource.h" // main symbols
  14. #include "FaxLocalPtr.h"
  15. //
  16. //================== FAX INBOUND ROUTING EXTENSION ==========================================
  17. // This is a READ-ONLY object. At its Init it gots all its data. It never uses FaxServer.
  18. //
  19. class ATL_NO_VTABLE CFaxInboundRoutingExtension :
  20. public CComObjectRootEx<CComSingleThreadModel>,
  21. public ISupportErrorInfo,
  22. public IDispatchImpl<IFaxInboundRoutingExtension, &IID_IFaxInboundRoutingExtension, &LIBID_FAXCOMEXLib>,
  23. public CFaxInitInner // for Debug purposes only
  24. {
  25. public:
  26. CFaxInboundRoutingExtension() : CFaxInitInner(_T("FAX INBOUND ROUTING EXTENSION")),
  27. m_psaMethods(NULL)
  28. {}
  29. ~CFaxInboundRoutingExtension()
  30. {
  31. HRESULT hr = S_OK;
  32. if (m_psaMethods)
  33. {
  34. hr = SafeArrayDestroy(m_psaMethods);
  35. if (FAILED(hr))
  36. {
  37. DBG_ENTER(_T("CFaxInboundRoutingExtension::Dtor"));
  38. CALL_FAIL(GENERAL_ERR, _T("SafeArrayDestroy(m_psaMethods)"), hr);
  39. }
  40. }
  41. }
  42. DECLARE_REGISTRY_RESOURCEID(IDR_FAXINBOUNDROUTINGEXTENSION)
  43. DECLARE_NOT_AGGREGATABLE(CFaxInboundRoutingExtension)
  44. DECLARE_PROTECT_FINAL_CONSTRUCT()
  45. BEGIN_COM_MAP(CFaxInboundRoutingExtension)
  46. COM_INTERFACE_ENTRY(IFaxInboundRoutingExtension)
  47. COM_INTERFACE_ENTRY(IDispatch)
  48. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  49. END_COM_MAP()
  50. // Interfaces
  51. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  52. STDMETHOD(get_Debug)(/*[out, retval]*/ VARIANT_BOOL *pbDebug);
  53. STDMETHOD(get_MajorBuild)(/*[out, retval]*/ long *plMajorBuild);
  54. STDMETHOD(get_MinorBuild)(/*[out, retval]*/ long *plMinorBuild);
  55. STDMETHOD(get_ImageName)(/*[out, retval]*/ BSTR *pbstrImageName);
  56. STDMETHOD(get_UniqueName)(/*[out, retval]*/ BSTR *pbstrUniqueName);
  57. STDMETHOD(get_MajorVersion)(/*[out, retval]*/ long *plMajorVersion);
  58. STDMETHOD(get_MinorVersion)(/*[out, retval]*/ long *plMinorVersion);
  59. STDMETHOD(get_InitErrorCode)(/*[out, retval]*/ long *plInitErrorCode);
  60. STDMETHOD(get_FriendlyName)(/*[out, retval]*/ BSTR *pbstrFriendlyName);
  61. STDMETHOD(get_Status)(/*[out, retval]*/ FAX_PROVIDER_STATUS_ENUM *pStatus);
  62. STDMETHOD(get_Methods)(/*[out, retval]*/ VARIANT *pvMethods);
  63. // Internal Use
  64. STDMETHOD(Init)(FAX_ROUTING_EXTENSION_INFO *pInfo, FAX_GLOBAL_ROUTING_INFO *pMethods, DWORD dwNum);
  65. private:
  66. DWORD m_dwLastError;
  67. DWORD m_dwMajorBuild;
  68. DWORD m_dwMinorBuild;
  69. DWORD m_dwMajorVersion;
  70. DWORD m_dwMinorVersion;
  71. CComBSTR m_bstrFriendlyName;
  72. CComBSTR m_bstrImageName;
  73. CComBSTR m_bstrUniqueName;
  74. VARIANT_BOOL m_bDebug;
  75. SAFEARRAY *m_psaMethods;
  76. FAX_PROVIDER_STATUS_ENUM m_Status;
  77. };
  78. #endif //__FAXINBOUNDROUTINGEXTENSION_H_