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.

277 lines
6.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: pgpolicy.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if !defined(AFX_PGPOLICY_H__52F8CCA2_3092_11D2_9792_00C04FC31FD3__INCLUDED_)
  11. #define AFX_PGPOLICY_H__52F8CCA2_3092_11D2_9792_00C04FC31FD3__INCLUDED_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. // pgpolicy.h : header file
  16. //
  17. class CACSPolicyHandle;
  18. class CPgPolicyGeneral;
  19. class CACSPolicyPageManager : public CPageManager
  20. {
  21. public:
  22. void SetPolicyData(CACSPolicyElement* pPolicy, CACSPolicyHandle* pHandle);
  23. virtual ~CACSPolicyPageManager();
  24. virtual BOOL OnApply();
  25. virtual void OnCancel( )
  26. {
  27. m_pHandle->OnPropertyPageCancel();
  28. CPageManager::OnCancel();
  29. };
  30. virtual void OnOK( )
  31. {
  32. m_pHandle->OnPropertyPageOK();
  33. CPageManager::OnOK();
  34. // if this is a new created policy, need to change the name field in result pane.
  35. if(m_spPolicy->m_bUseName_NewPolicy)
  36. {
  37. m_spPolicy->m_bUseName_NewPolicy = FALSE;
  38. MMCNotify();
  39. }
  40. };
  41. void SetGeneralPage(CPgPolicyGeneral* pPage) { m_pGeneralPage = pPage;};
  42. void SetBranchFlag(UINT flag) { m_nBranchFlag = flag; };
  43. protected:
  44. CComPtr<CACSPolicyElement> m_spPolicy;
  45. CACSPolicyHandle* m_pHandle;
  46. CPgPolicyGeneral* m_pGeneralPage;
  47. UINT m_nBranchFlag; // glocal defined as 0x0001
  48. };
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CPgPolicyGeneral dialog
  51. class CPgPolicyGeneral : public CACSPage
  52. {
  53. DECLARE_DYNCREATE(CPgPolicyGeneral)
  54. // Construction
  55. public:
  56. CPgPolicyGeneral();
  57. CPgPolicyGeneral(CACSPolicyElement* pData);
  58. ~CPgPolicyGeneral();
  59. void EnableIdentityCtrls(int nChoice);
  60. // Dialog Data
  61. //{{AFX_DATA(CPgPolicyGeneral)
  62. enum { IDD = IDD_POLICY_GEN };
  63. CButton m_buttonUser;
  64. CButton m_buttonOU;
  65. CEdit m_editUser;
  66. CEdit m_editOU;
  67. CString m_strOU;
  68. CString m_strUser;
  69. int m_nIdentityChoice;
  70. //}}AFX_DATA
  71. BOOL IfAnyAuth() { return (m_nIdentityChoice == 0);};
  72. BOOL IfAnyUnauth() { return (m_nIdentityChoice == 1);};
  73. // Overrides
  74. // ClassWizard generate virtual function overrides
  75. //{{AFX_VIRTUAL(CPgPolicyGeneral)
  76. public:
  77. virtual BOOL OnKillActive( );
  78. virtual BOOL OnApply();
  79. protected:
  80. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  81. //}}AFX_VIRTUAL
  82. // Implementation
  83. protected:
  84. void DataInit();
  85. // Generated message map functions
  86. //{{AFX_MSG(CPgPolicyGeneral)
  87. afx_msg void OnBrowseOU();
  88. afx_msg void OnBrowseUser();
  89. afx_msg void OnUnknownuser();
  90. afx_msg void OnDefaultuser();
  91. afx_msg void OnRadioOu();
  92. afx_msg void OnRadioUser();
  93. afx_msg void OnChangeEditOu();
  94. afx_msg void OnChangeEditUser();
  95. afx_msg void OnSelchangeServicelevel();
  96. afx_msg void OnSelchangeDirection();
  97. virtual BOOL OnInitDialog();
  98. //}}AFX_MSG
  99. DECLARE_MESSAGE_MAP()
  100. // data members
  101. CComPtr<CACSPolicyElement> m_spData;
  102. CStrBox<CComboBox>* m_pDirection;
  103. CStrBox<CComboBox>* m_pServiceType;
  104. CStrArray m_aDirections;
  105. CStrArray m_aServiceTypes;
  106. };
  107. /////////////////////////////////////////////////////////////////////////////
  108. // CPgPolicyFlow dialog
  109. class CPgPolicyFlow : public CACSPage
  110. {
  111. DECLARE_DYNCREATE(CPgPolicyFlow)
  112. // Construction
  113. public:
  114. CPgPolicyFlow();
  115. CPgPolicyFlow(CACSPolicyElement* pData);
  116. ~CPgPolicyFlow();
  117. // Dialog Data
  118. //{{AFX_DATA(CPgPolicyFlow)
  119. enum { IDD = IDD_POLICY_FLOW };
  120. CEdit m_editPeakRate;
  121. CEdit m_editDuration;
  122. CEdit m_editDataRate;
  123. UINT m_uDuration;
  124. UINT m_uPeakRate;
  125. int m_nDataRateChoice;
  126. int m_nDurationChoice;
  127. int m_nPeakRateChoice;
  128. UINT m_uDataRate;
  129. //}}AFX_DATA
  130. //
  131. UINT m_nBranchFlag; // glocal defined as 0x0001
  132. CPgPolicyGeneral* m_pGeneralPage;
  133. // Overrides
  134. // ClassWizard generate virtual function overrides
  135. //{{AFX_VIRTUAL(CPgPolicyFlow)
  136. public:
  137. virtual BOOL OnApply();
  138. virtual BOOL OnKillActive( );
  139. virtual BOOL OnSetActive( );
  140. protected:
  141. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  142. //}}AFX_VIRTUAL
  143. // Implementation
  144. protected:
  145. void DataInit();
  146. // Generated message map functions
  147. //{{AFX_MSG(CPgPolicyFlow)
  148. virtual BOOL OnInitDialog();
  149. afx_msg void OnPolicyFlowDatarateDef();
  150. afx_msg void OnChangePolicyFlowDatarateEditLimit();
  151. afx_msg void OnPolicyFlowDatarateRadioLimit();
  152. afx_msg void OnPolicyFlowDatarateRes();
  153. afx_msg void OnPolicyFlowDurationDef();
  154. afx_msg void OnChangePolicyFlowDurationEditLimit();
  155. afx_msg void OnPolicyFlowDurationRadioLimit();
  156. afx_msg void OnPolicyFlowDurationRes();
  157. afx_msg void OnPolicyFlowPeakdatarateDef();
  158. afx_msg void OnChangePolicyFlowPeakdatarateEditLimit();
  159. afx_msg void OnPolicyFlowPeakdatarateRadioLimit();
  160. afx_msg void OnPolicyFlowPeakdatarateRes();
  161. afx_msg void OnKillFocus(CWnd* pNewWnd);
  162. //}}AFX_MSG
  163. DECLARE_MESSAGE_MAP()
  164. // data members
  165. CComPtr<CACSPolicyElement> m_spData;
  166. CString m_strDataRateDefault;
  167. CString m_strPeakRateDefault;
  168. CString m_strDurationDefault;
  169. };
  170. /////////////////////////////////////////////////////////////////////////////
  171. // CPgPolicyAggregate dialog
  172. class CPgPolicyAggregate : public CACSPage
  173. {
  174. // Construction
  175. public:
  176. CPgPolicyAggregate(); // standard constructor
  177. CPgPolicyAggregate(CACSPolicyElement* pData);
  178. // Dialog Data
  179. //{{AFX_DATA(CPgPolicyAggregate)
  180. enum { IDD = IDD_POLICY_AGGR };
  181. CEdit m_editPeakRate;
  182. CEdit m_editFlows;
  183. CEdit m_editDataRate;
  184. int m_nDataRateChoice;
  185. int m_nFlowsChoice;
  186. int m_nPeakRateChoice;
  187. UINT m_uDataRate;
  188. UINT m_uFlows;
  189. UINT m_uPeakRate;
  190. //}}AFX_DATA
  191. //
  192. UINT m_nBranchFlag; // glocal defined as 0x0001
  193. CPgPolicyGeneral* m_pGeneralPage;
  194. // Overrides
  195. // ClassWizard generated virtual function overrides
  196. //{{AFX_VIRTUAL(CPgPolicyAggregate)
  197. public:
  198. virtual BOOL OnApply();
  199. virtual BOOL OnKillActive( );
  200. virtual BOOL OnSetActive( );
  201. protected:
  202. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  203. //}}AFX_VIRTUAL
  204. // Implementation
  205. protected:
  206. void DataInit();
  207. // Generated message map functions
  208. //{{AFX_MSG(CPgPolicyAggregate)
  209. virtual BOOL OnInitDialog();
  210. afx_msg void OnPolicyAggrDatarateDef();
  211. afx_msg void OnChangePolicyAggrDatarateEditLimit();
  212. afx_msg void OnPolicyAggrDatarateRadioLimit();
  213. afx_msg void OnPolicyAggrDatarateRes();
  214. afx_msg void OnPolicyAggrFlowsDef();
  215. afx_msg void OnChangePolicyAggrFlowsEditLimit();
  216. afx_msg void OnPolicyAggrFlowsRes();
  217. afx_msg void OnPolicyAggrPeakdatarateDef();
  218. afx_msg void OnChangePolicyAggrPeakdatarateEditLimit();
  219. afx_msg void OnPolicyAggrPeakdatarateRadioLimit();
  220. afx_msg void OnPolicyAggrPeakdatarateRes();
  221. afx_msg void OnPolicyAggrFlowsRadioLimit();
  222. //}}AFX_MSG
  223. DECLARE_MESSAGE_MAP()
  224. // data members
  225. CComPtr<CACSPolicyElement> m_spData;
  226. CString m_strDataRateDefault;
  227. CString m_strPeakRateDefault;
  228. CString m_strFlowsDefault;
  229. };
  230. //{{AFX_INSERT_LOCATION}}
  231. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  232. #endif // !defined(AFX_PGPOLICY_H__52F8CCA2_3092_11D2_9792_00C04FC31FD3__INCLUDED_)