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.

272 lines
6.0 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // groupwiz.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the classes that implement the new RADIUS server group wizard.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 03/07/2000 Original version.
  16. // 04/19/2000 Marshall SDOs across apartments.
  17. //
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #ifndef GROUPWIZ_H
  20. #define GROUPWIZ_H
  21. #if _MSC_VER >= 1000
  22. #pragma once
  23. #endif
  24. #include <grouppage.h>
  25. class NewGroupWizard;
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CLASS
  29. //
  30. // NewGroupStartPage
  31. //
  32. // DESCRIPTION
  33. //
  34. // Implements the Welcome page.
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////
  37. class NewGroupStartPage : public SnapInPropertyPage
  38. {
  39. public:
  40. NewGroupStartPage(NewGroupWizard& wizard);
  41. protected:
  42. virtual BOOL OnInitDialog();
  43. virtual BOOL OnSetActive();
  44. DEFINE_ERROR_CAPTION(IDS_GROUP_E_CAPTION);
  45. private:
  46. NewGroupWizard& parent;
  47. };
  48. ///////////////////////////////////////////////////////////////////////////////
  49. //
  50. // CLASS
  51. //
  52. // NewGroupNamePage
  53. //
  54. // DESCRIPTION
  55. //
  56. // Implements the page where the user enters the group name.
  57. //
  58. ///////////////////////////////////////////////////////////////////////////////
  59. class NewGroupNamePage : public SnapInPropertyPage
  60. {
  61. public:
  62. NewGroupNamePage(NewGroupWizard& wizard);
  63. PCWSTR getName() const throw ()
  64. { return name; }
  65. protected:
  66. virtual LRESULT OnWizardBack();
  67. virtual LRESULT OnWizardNext();
  68. afx_msg void onChangeName();
  69. DECLARE_MESSAGE_MAP()
  70. DEFINE_ERROR_CAPTION(IDS_GROUP_E_CAPTION);
  71. virtual void setData();
  72. void setButtons();
  73. private:
  74. NewGroupWizard& parent;
  75. CComBSTR name;
  76. };
  77. ///////////////////////////////////////////////////////////////////////////////
  78. //
  79. // CLASS
  80. //
  81. // NewGroupNovicePage
  82. //
  83. // DESCRIPTION
  84. //
  85. // Implements the page where the user enters the primary and backup server.
  86. //
  87. ///////////////////////////////////////////////////////////////////////////////
  88. class NewGroupNovicePage : public SnapInPropertyPage
  89. {
  90. public:
  91. NewGroupNovicePage(NewGroupWizard& wizard);
  92. PCWSTR getPrimaryServer() const throw ()
  93. { return primary; }
  94. PCWSTR getBackupServer() const throw ()
  95. { return hasBackup ? (PCWSTR)backup : NULL; }
  96. protected:
  97. virtual LRESULT OnWizardBack();
  98. virtual LRESULT OnWizardNext();
  99. afx_msg void onChangePrimary();
  100. afx_msg void onChangeHasBackup();
  101. afx_msg void onChangeBackup();
  102. afx_msg void onVerifyPrimary();
  103. afx_msg void onVerifyBackup();
  104. DECLARE_MESSAGE_MAP()
  105. DEFINE_ERROR_CAPTION(IDS_GROUP_E_CAPTION);
  106. virtual void setData();
  107. void setControlState();
  108. private:
  109. NewGroupWizard& parent;
  110. CComBSTR primary;
  111. bool hasBackup;
  112. CComBSTR backup;
  113. CComBSTR secret;
  114. CComBSTR confirm;
  115. };
  116. ///////////////////////////////////////////////////////////////////////////////
  117. //
  118. // CLASS
  119. //
  120. // NewGroupServersPage
  121. //
  122. // DESCRIPTION
  123. //
  124. // Implements the page displaying the list of servers in the group.
  125. //
  126. ///////////////////////////////////////////////////////////////////////////////
  127. class NewGroupServersPage : public SnapInPropertyPage
  128. {
  129. public:
  130. NewGroupServersPage(NewGroupWizard& wizard);
  131. protected:
  132. virtual BOOL OnInitDialog();
  133. virtual void OnSysColorChange();
  134. virtual LRESULT OnWizardBack();
  135. afx_msg void onAdd();
  136. afx_msg void onEdit();
  137. afx_msg void onRemove();
  138. afx_msg void onColumnClick(NMLISTVIEW* listView, LRESULT* result);
  139. afx_msg void onItemActivate(NMITEMACTIVATE* itemActivate, LRESULT* result);
  140. afx_msg void onServerChanged(NMLISTVIEW* listView, LRESULT* result);
  141. DECLARE_MESSAGE_MAP()
  142. DEFINE_ERROR_CAPTION(IDS_GROUP_E_CAPTION);
  143. virtual void getData();
  144. virtual void setData();
  145. void setButtons();
  146. private:
  147. NewGroupWizard& parent;
  148. ServerList servers;
  149. };
  150. ///////////////////////////////////////////////////////////////////////////////
  151. //
  152. // CLASS
  153. //
  154. // NewGroupFinishPage
  155. //
  156. // DESCRIPTION
  157. //
  158. // Implements the Completion page.
  159. //
  160. ///////////////////////////////////////////////////////////////////////////////
  161. class NewGroupFinishPage : public SnapInPropertyPage
  162. {
  163. public:
  164. NewGroupFinishPage(
  165. NewGroupWizard& wizard,
  166. bool promptForNewPolicy = false
  167. );
  168. bool createNewPolicy() const throw ()
  169. { return createPolicy; }
  170. protected:
  171. virtual BOOL OnInitDialog();
  172. virtual LRESULT OnWizardBack();
  173. DEFINE_ERROR_CAPTION(IDS_GROUP_E_CAPTION);
  174. virtual void setData();
  175. virtual void saveChanges();
  176. private:
  177. NewGroupWizard& parent;
  178. CStatic text;
  179. bool allowCreate;
  180. bool createPolicy;
  181. };
  182. ///////////////////////////////////////////////////////////////////////////////
  183. //
  184. // CLASS
  185. //
  186. // NewGroupWizard
  187. //
  188. // DESCRIPTION
  189. //
  190. // Implements the New RADIUS Server Group wizard.
  191. //
  192. ///////////////////////////////////////////////////////////////////////////////
  193. class NewGroupWizard : public CPropertySheetEx
  194. {
  195. public:
  196. NewGroupWizard(
  197. SdoConnection& connection,
  198. SnapInView* snapInView = NULL,
  199. bool promptForNewPolicy = false
  200. );
  201. virtual INT_PTR DoModal();
  202. bool createNewPolicy() const throw ()
  203. { return finish.createNewPolicy(); }
  204. CString getFinishText();
  205. //////////
  206. // Public properties used by the wizard pages.
  207. //////////
  208. Sdo group; // The group being created.
  209. LONG advanced; // Wizard mode.
  210. protected:
  211. virtual BOOL OnInitDialog();
  212. private:
  213. SdoConnection& cxn;
  214. SnapInView* view;
  215. SdoStream<Sdo> groupStream;
  216. NewGroupStartPage start;
  217. NewGroupNamePage name;
  218. NewGroupNovicePage novice;
  219. NewGroupServersPage servers;
  220. NewGroupFinishPage finish;
  221. };
  222. #endif // GROUPWIZ_H