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.

219 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1994-2001 Microsoft Corporation
  3. Module Name :
  4. connects.h
  5. Abstract:
  6. "Connect to a single server" dialog definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. --*/
  14. #ifndef __CONNECTS_H__
  15. #define __CONNECTS_H__
  16. class CIISMachine;
  17. #define EXTGUID TCHAR
  18. //
  19. // CLoginDlg dialog
  20. //
  21. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  22. //
  23. // Different ways to display this dialog
  24. //
  25. enum
  26. {
  27. LDLG_ACCESS_DENIED, // Access denied
  28. LDLG_ENTER_PASS, // Enter password
  29. LDLG_IMPERSONATION, // Change impersonation
  30. };
  31. class CLoginDlg : public CDialog
  32. /*++
  33. Class Description:
  34. Log-in dialog. Brought up either to enter the password, or to provide
  35. both username and password
  36. Public Interface:
  37. --*/
  38. {
  39. //
  40. // Construction
  41. //
  42. public:
  43. CLoginDlg(
  44. IN int nType, // See LDLG_ definitions above
  45. IN CIISMachine * pMachine,
  46. IN CWnd * pParent = NULL
  47. );
  48. //
  49. // Access
  50. //
  51. public:
  52. BOOL UserNameChanged() const;
  53. //
  54. // Dialog Data
  55. //
  56. protected:
  57. //{{AFX_DATA(CLoginDlg)
  58. enum { IDD = IDD_LOGIN };
  59. CString m_strUserName;
  60. CStrPassword m_strPassword;
  61. CEdit m_edit_UserName;
  62. CEdit m_edit_Password;
  63. CStatic m_static_Prompt;
  64. CButton m_button_Ok;
  65. //}}AFX_DATA
  66. //
  67. // Overrides
  68. //
  69. protected:
  70. //{{AFX_VIRTUAL(CLoginDlg)
  71. protected:
  72. virtual void DoDataExchange(CDataExchange * pDX);
  73. //}}AFX_VIRTUAL
  74. //
  75. // Implementation
  76. //
  77. protected:
  78. //{{AFX_MSG(CLoginDlg)
  79. virtual BOOL OnInitDialog();
  80. virtual void OnOK();
  81. //}}AFX_MSG
  82. DECLARE_MESSAGE_MAP()
  83. void SetControlStates();
  84. private:
  85. int m_nType;
  86. CIISMachine * m_pMachine;
  87. CString m_strOriginalUserName;
  88. };
  89. class ConnectServerDlg : public CDialog
  90. {
  91. /*++
  92. Class Description:
  93. Connect to a server dialog. Also used to ask for the cluster controller
  94. or for a server to add to the cluster.
  95. Public Interface:
  96. ConnectServerDlg : Constructor
  97. GetMachine : Get the created machine object (may or may not have a created
  98. interface)
  99. --*/
  100. //
  101. // Construction
  102. //
  103. public:
  104. ConnectServerDlg(
  105. IN IConsoleNameSpace * pConsoleNameSpace,
  106. IN IConsole * pConsole,
  107. IN CWnd * pParent = NULL
  108. );
  109. //
  110. // Access Functions
  111. //
  112. public:
  113. CIISMachine * GetMachine() { return m_pMachine; }
  114. //
  115. // Dialog Data
  116. //
  117. protected:
  118. //{{AFX_DATA(ConnectServerDlg)
  119. enum { IDD = IDD_CONNECT_SERVER };
  120. BOOL m_fImpersonate;
  121. CString m_strServerName;
  122. CString m_strUserName;
  123. CStrPassword m_strPassword;
  124. CEdit m_edit_UserName;
  125. CEdit m_edit_Password;
  126. CEdit m_edit_ServerName;
  127. CStatic m_static_UserName;
  128. CStatic m_static_Password;
  129. CButton m_button_Ok;
  130. //}}AFX_DATA
  131. //
  132. // Overrides
  133. //
  134. protected:
  135. //{{AFX_VIRTUAL(ConnectServerDlg)
  136. protected:
  137. virtual void DoDataExchange(CDataExchange * pDX);
  138. //}}AFX_VIRTUAL
  139. //
  140. // Implementation
  141. //
  142. protected:
  143. //{{AFX_MSG(ConnectServerDlg)
  144. virtual BOOL OnInitDialog();
  145. virtual void OnOK();
  146. afx_msg void OnCheckConnectAs();
  147. afx_msg void OnButtonBrowse();
  148. afx_msg void OnButtonHelp();
  149. //}}AFX_MSG
  150. DECLARE_MESSAGE_MAP()
  151. void SetControlStates();
  152. private:
  153. CIISMachine * m_pMachine;
  154. IConsoleNameSpace * m_pConsoleNameSpace;
  155. IConsole * m_pConsole;
  156. };
  157. //
  158. // Inline Expansion
  159. //
  160. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  161. inline BOOL CLoginDlg::UserNameChanged() const
  162. {
  163. //
  164. // TRUE if the user name is not the original user name
  165. //
  166. return m_strOriginalUserName.CompareNoCase(m_strUserName);
  167. }
  168. #endif // __CONNECTS_H__