Source code of Windows XP (NT5)
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.

244 lines
5.3 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // profileprop.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the classes that make up the proxy profile property sheet.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 03/02/2000 Original version.
  16. // 04/19/2000 Marshall SDOs across apartments.
  17. //
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #ifndef PROFILEPROP_H
  20. #define PROFILEPROP_H
  21. #if _MSC_VER >= 1000
  22. #pragma once
  23. #endif
  24. #include "dlgcshlp.h"
  25. class ProxyProfileProperties;
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // CLASS
  29. //
  30. // ProfileProvPage
  31. //
  32. // DESCRIPTION
  33. //
  34. // Base class for the tabs that allow you to choose a RADIUS server group.
  35. //
  36. ///////////////////////////////////////////////////////////////////////////////
  37. class ProfileProvPage : public SnapInPropertyPage
  38. {
  39. public:
  40. ProfileProvPage(UINT nIDTemplate, SdoConnection& connection)
  41. : SnapInPropertyPage(nIDTemplate),
  42. cxn(connection),
  43. providerType(1),
  44. invalidGroup(CB_ERR)
  45. { }
  46. protected:
  47. DEFINE_ERROR_CAPTION(IDS_POLICY_E_CAPTION);
  48. virtual void getData();
  49. virtual void setData();
  50. SdoConnection& cxn;
  51. LONG providerType;
  52. int invalidGroup;
  53. CComBSTR providerName;
  54. CComboBox groupsCombo;
  55. };
  56. ///////////////////////////////////////////////////////////////////////////////
  57. //
  58. // CLASS
  59. //
  60. // ProfileAuthPage
  61. //
  62. // DESCRIPTION
  63. //
  64. // Implements the Authentication tab.
  65. //
  66. ///////////////////////////////////////////////////////////////////////////////
  67. class ProfileAuthPage : public ProfileProvPage
  68. {
  69. public:
  70. ProfileAuthPage(SdoConnection& connection, SdoProfile& p);
  71. protected:
  72. afx_msg void onProviderClick();
  73. DECLARE_MESSAGE_MAP()
  74. virtual void getData();
  75. virtual void setData();
  76. virtual void saveChanges();
  77. private:
  78. SdoProfile& profile;
  79. };
  80. ///////////////////////////////////////////////////////////////////////////////
  81. //
  82. // CLASS
  83. //
  84. // ProfileAcctPage
  85. //
  86. // DESCRIPTION
  87. //
  88. // Implements the Accounting tab.
  89. //
  90. ///////////////////////////////////////////////////////////////////////////////
  91. class ProfileAcctPage : public ProfileProvPage
  92. {
  93. public:
  94. ProfileAcctPage(SdoConnection& connection, SdoProfile& p);
  95. protected:
  96. afx_msg void onCheckRecord();
  97. DECLARE_MESSAGE_MAP()
  98. virtual void getData();
  99. virtual void setData();
  100. virtual void saveChanges();
  101. private:
  102. SdoProfile& profile;
  103. bool record;
  104. };
  105. ///////////////////////////////////////////////////////////////////////////////
  106. //
  107. // CLASS
  108. //
  109. // ProfileAttrPage
  110. //
  111. // DESCRIPTION
  112. //
  113. // Implements the attribute manipulation page.
  114. //
  115. ///////////////////////////////////////////////////////////////////////////////
  116. class ProfileAttrPage : public SnapInPropertyPage
  117. {
  118. public:
  119. ProfileAttrPage(SdoConnection& cxn, SdoProfile& p);
  120. ~ProfileAttrPage() throw ();
  121. protected:
  122. virtual BOOL OnInitDialog();
  123. afx_msg void onAdd();
  124. afx_msg void onEdit();
  125. afx_msg void onRemove();
  126. afx_msg void onMoveUp();
  127. afx_msg void onMoveDown();
  128. afx_msg void onRuleActivate(NMITEMACTIVATE* itemActivate, LRESULT* result);
  129. afx_msg void onRuleChanged(NMLISTVIEW* listView, LRESULT* result);
  130. DECLARE_MESSAGE_MAP()
  131. DEFINE_ERROR_CAPTION(IDS_POLICY_E_CAPTION);
  132. virtual void getData();
  133. virtual void setData();
  134. virtual void saveChanges();
  135. void swapItems(int item1, int item2);
  136. private:
  137. SdoProfile& profile;
  138. SdoDictionary::IdName* targets;
  139. ULONG numTargets;
  140. LONG targetId;
  141. CComVariant rules;
  142. CComboBox ruleTarget;
  143. CListCtrl ruleList;
  144. };
  145. ///////////////////////////////////////////////////////////////////////////////
  146. //
  147. // CLASS
  148. //
  149. // ProxyProfileProperties
  150. //
  151. // DESCRIPTION
  152. //
  153. // Implements the proxy profile property sheet.
  154. //
  155. ///////////////////////////////////////////////////////////////////////////////
  156. class ProxyProfileProperties : public CPropertySheet
  157. {
  158. public:
  159. ProxyProfileProperties(
  160. Sdo& profileSdo,
  161. SdoConnection& connection
  162. );
  163. ~ProxyProfileProperties();
  164. virtual INT_PTR DoModal();
  165. protected:
  166. virtual BOOL OnInitDialog();
  167. afx_msg LRESULT onChanged(WPARAM wParam, LPARAM lParam);
  168. afx_msg void onOkOrApply();
  169. DECLARE_MESSAGE_MAP()
  170. private:
  171. SdoProfile profile;
  172. SdoStream<SdoProfile> profileStream;
  173. ProfileAuthPage auth;
  174. ProfileAcctPage acct;
  175. ProfileAttrPage attr;
  176. HMODULE rasuser; // DLL exporting the advanced page.
  177. HPROPSHEETPAGE advanced; // The advanced property page.
  178. bool applied; // true if any changes have been applied.
  179. bool modified; // true if any pages have been modified.
  180. };
  181. ///////////////////////////////////////////////////////////////////////////////
  182. //
  183. // CLASS
  184. //
  185. // RuleEditor
  186. //
  187. // DESCRIPTION
  188. //
  189. // Implements the dialog for editing attribute manipulation rules.
  190. //
  191. ///////////////////////////////////////////////////////////////////////////////
  192. class RuleEditor : public CHelpDialog
  193. {
  194. public:
  195. RuleEditor(PCWSTR szFind = L"", PCWSTR szReplace = L"");
  196. PCWSTR getFindString() const throw ()
  197. { return find; }
  198. PCWSTR getReplaceString() const throw ()
  199. { return replace; }
  200. protected:
  201. virtual void DoDataExchange(CDataExchange* pDX);
  202. ::CString find;
  203. ::CString replace;
  204. };
  205. #endif // PROFILEPROP_H