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.

108 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxDevice.h
  5. Abstract:
  6. Declaration of the CFaxDevice class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXDEVICE_H_
  12. #define __FAXDEVICE_H_
  13. #include "resource.h" // main symbols
  14. #include "FaxLocalPtr.h"
  15. //
  16. //================= FAX DEVICE =================================================
  17. // Fax Device Object is created by Fax Devices Collection.
  18. // Fax Devices Collection makes AddRef() on each Device Object.
  19. // Each Device Object makes AddRef() on the Fax Server.
  20. // This is done because Fax Device Object needs the Handle to the Fax Server
  21. // to perform Refresh() etc.
  22. //
  23. class ATL_NO_VTABLE CFaxDevice :
  24. public CComObjectRootEx<CComSingleThreadModel>,
  25. public ISupportErrorInfo,
  26. public IDispatchImpl<IFaxDevice, &IID_IFaxDevice, &LIBID_FAXCOMEXLib>,
  27. public CFaxInitInnerAddRef
  28. {
  29. public:
  30. CFaxDevice() : CFaxInitInnerAddRef(_T("FAX DEVICE"))
  31. {
  32. }
  33. DECLARE_REGISTRY_RESOURCEID(IDR_FAXDEVICE)
  34. DECLARE_NOT_AGGREGATABLE(CFaxDevice)
  35. DECLARE_PROTECT_FINAL_CONSTRUCT()
  36. BEGIN_COM_MAP(CFaxDevice)
  37. COM_INTERFACE_ENTRY(IFaxDevice)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  40. END_COM_MAP()
  41. // Interfaces
  42. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  43. STDMETHOD(Save)();
  44. STDMETHOD(Refresh)();
  45. STDMETHOD(AnswerCall)();
  46. STDMETHOD(put_CSID)(/*[in]*/ BSTR bstrCSID);
  47. STDMETHOD(put_TSID)(/*[in]*/ BSTR bstrTSID);
  48. STDMETHOD(get_Id)(/*[out, retval]*/ long *plId);
  49. STDMETHOD(get_CSID)(/*[out, retval]*/ BSTR *pbstrCSID);
  50. STDMETHOD(get_TSID)(/*[out, retval]*/ BSTR *pbstrTSID);
  51. STDMETHOD(put_Description)(/*[in]*/ BSTR bstrDescription);
  52. STDMETHOD(put_SendEnabled)(/*[in]*/ VARIANT_BOOL bSendEnabled);
  53. STDMETHOD(get_DeviceName)(/*[out, retval]*/ BSTR *pbstrDeviceName);
  54. STDMETHOD(put_RingsBeforeAnswer)(/*[in]*/ long lRingsBeforeAnswer);
  55. STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pbstrDescription);
  56. STDMETHOD(get_ProviderUniqueName)(/*[out, retval]*/ BSTR *pbstrProviderUniqueName);
  57. STDMETHOD(get_SendingNow)(/*[out, retval]*/ VARIANT_BOOL *pbSendingNow);
  58. STDMETHOD(get_PoweredOff)(/*[out, retval]*/ VARIANT_BOOL *pbPoweredOff);
  59. STDMETHOD(get_RingingNow)(/*[out, retval]*/ VARIANT_BOOL *pbRingingNow);
  60. STDMETHOD(get_SendEnabled)(/*[out, retval]*/ VARIANT_BOOL *pbSendEnabled);
  61. STDMETHOD(get_ReceivingNow)(/*[out, retval]*/ VARIANT_BOOL *pbReceivingNow);
  62. STDMETHOD(put_ReceiveMode)(/*[in]*/ FAX_DEVICE_RECEIVE_MODE_ENUM ReceiveMode);
  63. STDMETHOD(get_RingsBeforeAnswer)(/*[out, retval]*/ long *plRingsBeforeAnswer);
  64. STDMETHOD(get_ReceiveMode)(/*[out, retval]*/ FAX_DEVICE_RECEIVE_MODE_ENUM *pReceiveMode);
  65. STDMETHOD(get_UsedRoutingMethods)(/*[out, retval]*/ VARIANT *pvUsedRoutingMethods);
  66. STDMETHOD(UseRoutingMethod)(/*[in]*/ BSTR bstrMethodGUID, /*[in]*/ VARIANT_BOOL bUse);
  67. STDMETHOD(SetExtensionProperty)(/*[in]*/ BSTR bstrGUID, /*[in]*/ VARIANT vProperty);
  68. STDMETHOD(GetExtensionProperty)(/*[in]*/ BSTR bstrGUID, /*[out, retval]*/ VARIANT *pvProperty);
  69. // Internal Use
  70. STDMETHOD(Init)(FAX_PORT_INFO_EX *pInfo, IFaxServerInner *pServer);
  71. private:
  72. long m_lID;
  73. long m_lRings;
  74. BOOL m_bSendEnabled;
  75. FAX_ENUM_DEVICE_RECEIVE_MODE m_ReceiveMode;
  76. DWORD m_dwStatus;
  77. CComBSTR m_bstrTSID;
  78. CComBSTR m_bstrCSID;
  79. CComBSTR m_bstrDescr;
  80. CComBSTR m_bstrDeviceName;
  81. CComBSTR m_bstrProviderUniqueName;
  82. };
  83. #endif //__FAXDEVICE_H_