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.

145 lines
4.9 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : ppFaxServerReceipts.h //
  3. // //
  4. // DESCRIPTION : Fax Server Receipts prop page header file //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Jul 20 2000 yossg New design - all delivery receipts options //
  10. // //
  11. // Copyright (C) 2000 Microsoft Corporation All Rights Reserved //
  12. /////////////////////////////////////////////////////////////////////////////
  13. #ifndef _PP_FAXSERVER_RECEIPTS_H_
  14. #define _PP_FAXSERVER_RECEIPTS_H_
  15. class CFaxServerNode;
  16. class CFaxServer;
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CppFaxServerReceipts dialog
  19. #include <proppageex.h>
  20. class CppFaxServerReceipts : public CPropertyPageExImpl<CppFaxServerReceipts>
  21. {
  22. public:
  23. //
  24. // Constructor
  25. //
  26. CppFaxServerReceipts(
  27. LONG_PTR hNotificationHandle,
  28. CSnapInItem *pNode,
  29. BOOL bOwnsNotificationHandle,
  30. HINSTANCE hInst);
  31. //
  32. // Destructor
  33. //
  34. ~CppFaxServerReceipts();
  35. enum { IDD = IDD_FAXSERVER_RECEIPTS };
  36. BEGIN_MSG_MAP(CppFaxServerReceipts)
  37. MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
  38. COMMAND_HANDLER( IDC_SMTP_EDIT, EN_CHANGE, OnTextChanged )
  39. COMMAND_HANDLER( IDC_PORT_EDIT, EN_CHANGE, OnTextChanged )
  40. COMMAND_HANDLER( IDC_ADDRESS_EDIT, EN_CHANGE, OnTextChanged )
  41. COMMAND_HANDLER( IDC_RECEIPT_ENABLE_MSGBOX_CHECK, BN_CLICKED, OnMsgBoxDeliveryOptionChecked)
  42. COMMAND_HANDLER( IDC_RECEIPT_ENABLE_SMTP_CHECK, BN_CLICKED, OnDeliveryOptionChecked)
  43. COMMAND_HANDLER( IDC_SMTP_ROUTE_CHECK, BN_CLICKED, OnDeliveryOptionChecked)
  44. COMMAND_HANDLER( IDC_AUTHENTICATION_BUTTON, BN_CLICKED, OnAuthenticationButtonClicked)
  45. NOTIFY_HANDLER ( IDC_RECEIPTS_HELP_LINK, NM_CLICK, OnHelpLinkClicked)
  46. MESSAGE_HANDLER( WM_CONTEXTMENU, OnHelpRequest)
  47. MESSAGE_HANDLER( WM_HELP, OnHelpRequest)
  48. CHAIN_MSG_MAP(CSnapInPropertyPageImpl<CppFaxServerReceipts>)
  49. END_MSG_MAP()
  50. //
  51. // Dialog's Handlers and events.
  52. //
  53. HRESULT InitRPC( );
  54. LRESULT OnInitDialog( UINT uiMsg, WPARAM wParam, LPARAM lParam, BOOL& fHandled );
  55. BOOL OnApply();
  56. HRESULT SetProps(int *pCtrlFocus, UINT * puIds);
  57. HRESULT PreApply(int *pCtrlFocus, UINT * puIds);
  58. LRESULT OnHelpLinkClicked(int idCtrl, LPNMHDR pNMHDR, BOOL& bHandled);
  59. private:
  60. //
  61. // Control members
  62. //
  63. CEdit m_SmtpBox; // SMTP Server address
  64. CEdit m_PortBox; // SMTP port on the server
  65. CEdit m_AddressBox; // From e-mail address to send receipts
  66. BOOL m_fAllReadyToApply;
  67. BOOL m_fIsDialogInitiated;
  68. //
  69. // members for advance dialog
  70. //
  71. FAX_ENUM_SMTP_AUTH_OPTIONS m_enumSmtpAuthOption;
  72. CComBSTR m_bstrUserName;
  73. CComBSTR m_bstrPassword;
  74. //
  75. // Config Structure member
  76. //
  77. PFAX_RECEIPTS_CONFIG m_pFaxReceiptsConfig;
  78. //
  79. // Handles
  80. //
  81. CFaxServerNode * m_pParentNode;
  82. BOOL m_fIsDirty;
  83. BOOL m_fLastGoodIsSMTPRouteConfigured;
  84. //
  85. // Event methods
  86. //
  87. LRESULT OnDeliveryOptionChecked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  88. LRESULT OnMsgBoxDeliveryOptionChecked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  89. LRESULT OnAuthenticationButtonClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  90. LRESULT OnTextChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  91. LRESULT SetApplyButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  92. void EnableSmtpFields(BOOL state);
  93. BOOL IsValidData(BSTR bstrSmtpSever,
  94. BSTR bstrPort,
  95. /*[OUT]*/DWORD *pdwPort,
  96. BSTR bstrSenderAddress,
  97. /*[OUT]*/int *pCtrlFocus,
  98. UINT *pIds);
  99. BOOL AllReadyToApply(BOOL fSilent, int *pCtrlFocus = NULL, UINT *pIds = NULL);
  100. HRESULT IsUnderLocalUserAccount(OUT BOOL * pfIsUnderLocalUserAccount);
  101. LRESULT OpenBosAuthenticationDlg();
  102. BOOL IsMsSMTPRoutingMethodStillAssigned();
  103. //
  104. // Help
  105. //
  106. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  107. };
  108. #endif // _PP_FAXSERVER_RECEIPTS_H_