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.

88 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxOutboundRoutingRule.h
  5. Abstract:
  6. Declaration of the CFaxOutboundRoutingRule class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXOUTBOUNDROUTINGRULE_H_
  12. #define __FAXOUTBOUNDROUTINGRULE_H_
  13. #include "resource.h" // main symbols
  14. #include "FaxCommon.h"
  15. //
  16. //======================== FAX OUTBOUND ROUTING RULE =================================
  17. // FaxOutboundRoutingRule Object is created by FaxOutboundRoutingRuleS Collection.
  18. // At Init, the Collection passes the Ptr to the Fax Server Object.
  19. // Rule Object needs this Ptr to perform Save and Refresh.
  20. // So, Rule Object makes AddRef() on the Fax Server Object, to prevent its death.
  21. // To do this, Rule Object inherits from the CFaxInitInnerAddRef class.
  22. //
  23. class ATL_NO_VTABLE CFaxOutboundRoutingRule :
  24. public CComObjectRootEx<CComSingleThreadModel>,
  25. public ISupportErrorInfo,
  26. public IDispatchImpl<IFaxOutboundRoutingRule, &IID_IFaxOutboundRoutingRule, &LIBID_FAXCOMEXLib>,
  27. public CFaxInitInnerAddRef
  28. {
  29. public:
  30. CFaxOutboundRoutingRule() : CFaxInitInnerAddRef(_T("FAX OUTBOUND ROUTING RULE"))
  31. {
  32. }
  33. DECLARE_REGISTRY_RESOURCEID(IDR_FAXOUTBOUNDROUTINGRULE)
  34. DECLARE_NOT_AGGREGATABLE(CFaxOutboundRoutingRule)
  35. DECLARE_PROTECT_FINAL_CONSTRUCT()
  36. BEGIN_COM_MAP(CFaxOutboundRoutingRule)
  37. COM_INTERFACE_ENTRY(IFaxOutboundRoutingRule)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  40. END_COM_MAP()
  41. // Interfaces
  42. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  43. STDMETHOD(get_CountryCode)(/*[out, retval]*/ long *plCountryCode);
  44. STDMETHOD(get_AreaCode)(/*[out, retval]*/ long *plAreaCode);
  45. STDMETHOD(get_Status)(/*[out, retval]*/ FAX_RULE_STATUS_ENUM *pStatus);
  46. STDMETHOD(get_UseDevice)(/*[out, retval]*/ VARIANT_BOOL *pbUseDevice);
  47. STDMETHOD(put_UseDevice)(/*[in]*/ VARIANT_BOOL bUseDevice);
  48. STDMETHOD(get_DeviceId)(/*[out, retval]*/ long *plDeviceId);
  49. STDMETHOD(put_DeviceId)(/*[in]*/ long DeviceId);
  50. STDMETHOD(get_GroupName)(/*[out, retval]*/ BSTR *pbstrGroupName);
  51. STDMETHOD(put_GroupName)(/*[in]*/ BSTR bstrGroupName);
  52. STDMETHOD(Save)();
  53. STDMETHOD(Refresh)();
  54. // Internal Use
  55. STDMETHOD(Init)(FAX_OUTBOUND_ROUTING_RULE *pInfo, IFaxServerInner *pServer);
  56. private:
  57. DWORD m_dwAreaCode;
  58. DWORD m_dwCountryCode;
  59. DWORD m_dwDeviceId;
  60. BOOL m_bUseDevice;
  61. CComBSTR m_bstrGroupName;
  62. FAX_RULE_STATUS_ENUM m_Status;
  63. };
  64. #endif //__FAXOUTBOUNDROUTINGRULE_H_