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.

135 lines
4.6 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxDocument.h
  5. Abstract:
  6. Declaration of the CFaxDocument class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXDOCUMENT_H_
  12. #define __FAXDOCUMENT_H_
  13. #include "resource.h" // main symbols
  14. #include "FaxRecipients.h"
  15. #include "FaxServer.h"
  16. //
  17. //======================== FAX DOCUMENT ===========================================
  18. //
  19. class ATL_NO_VTABLE CFaxDocument :
  20. public CComObjectRootEx<CComSingleThreadModel>,
  21. public CComCoClass<CFaxDocument, &CLSID_FaxDocument>,
  22. public ISupportErrorInfo,
  23. public IDispatchImpl<IFaxDocument, &IID_IFaxDocument, &LIBID_FAXCOMEXLib>
  24. {
  25. public:
  26. CFaxDocument():
  27. m_Sender (this)
  28. {
  29. DBG_ENTER(_T("FAX DOCUMENT -- CREATE"));
  30. };
  31. ~CFaxDocument()
  32. {
  33. DBG_ENTER(_T("FAX DOCUMENT -- DESTROY"));
  34. };
  35. DECLARE_REGISTRY_RESOURCEID(IDR_FAXDOCUMENT)
  36. DECLARE_PROTECT_FINAL_CONSTRUCT()
  37. BEGIN_COM_MAP(CFaxDocument)
  38. COM_INTERFACE_ENTRY(IFaxDocument)
  39. COM_INTERFACE_ENTRY(IDispatch)
  40. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  41. END_COM_MAP()
  42. // Interfaces
  43. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  44. STDMETHOD(Submit)(/*[in]*/ BSTR bstrFaxServerName, /*[out, retval]*/ VARIANT *pvFaxOutgoingJobIDs);
  45. STDMETHOD(ConnectedSubmit)(/*[in]*/ IFaxServer *pFaxServer, /*[out, retval]*/ VARIANT *pvFaxOutgoingJobIDs);
  46. STDMETHOD(put_Body)(/*[in]*/ BSTR bstrBody);
  47. STDMETHOD(get_Body)(/*[out, retval]*/ BSTR *pbstrBody);
  48. STDMETHOD(put_Note)(/*[in]*/ BSTR bstrNote);
  49. STDMETHOD(get_Note)(/*[out, retval]*/ BSTR *pbstrNote);
  50. STDMETHOD(put_Subject)(/*[in]*/ BSTR bstrSubject);
  51. STDMETHOD(get_Subject)(/*[out, retval]*/ BSTR *pbstrSubject);
  52. STDMETHOD(put_CallHandle)(/*[in]*/ long lCallHandle);
  53. STDMETHOD(get_CallHandle)(/*[out, retval]*/ long *plCallHandle);
  54. STDMETHOD(put_CoverPage)(/*[in]*/ BSTR bstrCoverPage);
  55. STDMETHOD(get_CoverPage)(/*[out, retval]*/ BSTR *pbstrCoverPage);
  56. STDMETHOD(put_ScheduleTime)(/*[in]*/ DATE dateScheduleTime);
  57. STDMETHOD(get_ScheduleTime)(/*[out, retval]*/ DATE *pdateScheduleTime);
  58. STDMETHOD(put_DocumentName)(/*[in]*/ BSTR bstrDocumentName);
  59. STDMETHOD(get_DocumentName)(/*[out, retval]*/ BSTR *pbstrDocumentName);
  60. STDMETHOD(put_ReceiptAddress)(/*[in]*/ BSTR bstrReceiptAddress);
  61. STDMETHOD(get_ReceiptAddress)(/*[out, retval]*/ BSTR *pbstrReceiptAddress);
  62. STDMETHOD(put_Priority)(/*[in]*/ FAX_PRIORITY_TYPE_ENUM Priority);
  63. STDMETHOD(get_Priority)(/*[out, retval]*/ FAX_PRIORITY_TYPE_ENUM *pPriority);
  64. STDMETHOD(put_AttachFaxToReceipt)(/*[in]*/ VARIANT_BOOL bAttachFax);
  65. STDMETHOD(get_AttachFaxToReceipt)(/*[out, retval]*/ VARIANT_BOOL *pbAttachFax);
  66. STDMETHOD(putref_TapiConnection)(/*[in]*/ IDispatch* pTapiConnection);
  67. STDMETHOD(get_TapiConnection)(/*[out, retval]*/ IDispatch **ppTapiConnection);
  68. STDMETHOD(put_ReceiptType)(/*[in]*/ FAX_RECEIPT_TYPE_ENUM ReceiptType);
  69. STDMETHOD(get_ReceiptType)(/*[out, retval]*/ FAX_RECEIPT_TYPE_ENUM *pReceiptType);
  70. STDMETHOD(put_GroupBroadcastReceipts)(/*[in]*/ VARIANT_BOOL bUseGrouping);
  71. STDMETHOD(get_GroupBroadcastReceipts)(/*[out, retval]*/ VARIANT_BOOL *pbUseGrouping);
  72. STDMETHOD(put_ScheduleType)(/*[in]*/ FAX_SCHEDULE_TYPE_ENUM ScheduleType);
  73. STDMETHOD(get_ScheduleType)(/*[out, retval]*/ FAX_SCHEDULE_TYPE_ENUM *pScheduleType);
  74. STDMETHOD(put_CoverPageType)(/*[in]*/ FAX_COVERPAGE_TYPE_ENUM CoverPageType);
  75. STDMETHOD(get_CoverPageType)(/*[out, retval]*/ FAX_COVERPAGE_TYPE_ENUM *pCoverPageType);
  76. STDMETHOD(get_Recipients)(/*[out, retval]*/ IFaxRecipients **ppFaxRecipients);
  77. STDMETHOD(get_Sender)(/*[out, retval]*/ IFaxSender **ppFaxSender);
  78. HRESULT FinalConstruct();
  79. private:
  80. CComPtr<IFaxRecipients> m_Recipients;
  81. CComPtr<IDispatch> m_TapiConnection;
  82. FAX_SCHEDULE_TYPE_ENUM m_ScheduleType;
  83. FAX_RECEIPT_TYPE_ENUM m_ReceiptType;
  84. FAX_PRIORITY_TYPE_ENUM m_Priority;
  85. FAX_COVERPAGE_TYPE_ENUM m_CoverPageType;
  86. CComBSTR m_bstrBody;
  87. CComBSTR m_bstrCoverPage;
  88. CComBSTR m_bstrSubject;
  89. CComBSTR m_bstrNote;
  90. CComBSTR m_bstrDocName;
  91. CComBSTR m_bstrReceiptAddress;
  92. DATE m_ScheduleTime;
  93. long m_CallHandle;
  94. VARIANT_BOOL m_bUseGrouping;
  95. VARIANT_BOOL m_bAttachFax;
  96. CComContainedObject2<CFaxSender> m_Sender;
  97. };
  98. #endif //__FAXDOCUMENT_H_