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.

271 lines
6.8 KiB

  1. // schemavw.h : header file
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. // CSchemaView form view
  5. #ifndef __AFXEXT_H__
  6. #include <afxext.h>
  7. #endif
  8. #include "cacls.h"
  9. class CSchemaView : public CFormView
  10. {
  11. protected:
  12. CSchemaView(); // protected constructor used by dynamic creation
  13. DECLARE_DYNCREATE(CSchemaView)
  14. // Form Data
  15. public:
  16. //{{AFX_DATA(CSchemaView)
  17. enum { IDD = IDD_SCHEMA };
  18. CStatic m_ClassOID;
  19. CStatic m_Abstract;
  20. CStatic m_MultiValued;
  21. CStatic m_DsNames;
  22. CStatic m_PropOID;
  23. CStatic m_Mandatory;
  24. CStatic m_Containment;
  25. CStatic m_ItemOleDsPath;
  26. CStatic m_PropertyMinRange;
  27. CStatic m_PropertyMaxRange;
  28. CStatic m_PropertyType;
  29. CStatic m_PrimaryInterface;
  30. CStatic m_HelpFileContext;
  31. CStatic m_DerivedFrom;
  32. CStatic m_HelpFileName;
  33. CStatic m_CLSID;
  34. CStatic m_Container;
  35. CStatic m_ClassType;
  36. CEdit m_PropValue;
  37. CComboBox m_PropList;
  38. //CTabCtrl m_Schema;
  39. //}}AFX_DATA
  40. // Attributes
  41. public:
  42. CMainDoc* GetDocument()
  43. {
  44. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  45. return (CMainDoc*) m_pDocument;
  46. }
  47. // Operations
  48. public:
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(CSchemaView)
  52. public:
  53. virtual void OnInitialUpdate();
  54. protected:
  55. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  56. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  57. //}}AFX_VIRTUAL
  58. // Implementation
  59. protected:
  60. virtual ~CSchemaView ( );
  61. HRESULT PutPropertyValue ( );
  62. void ResetObjectView ( );
  63. void DisplayPropertiesList( );
  64. void DisplayCurrentPropertyText( );
  65. ADSTYPE ConvertToADsType ( CString strText );
  66. #ifdef _DEBUG
  67. virtual void AssertValid() const;
  68. virtual void Dump(CDumpContext& dc) const;
  69. #endif
  70. // Generated message map functions
  71. //{{AFX_MSG(CSchemaView)
  72. afx_msg void OnSelchangeProplist();
  73. afx_msg void OnReload();
  74. afx_msg void OnApply();
  75. afx_msg void OnSetfocusPropvalue();
  76. afx_msg void OnMethod1();
  77. afx_msg void OnMethod2();
  78. afx_msg void OnMethod3();
  79. afx_msg void OnMethod4();
  80. afx_msg void OnMethod5();
  81. afx_msg void OnMethod6();
  82. afx_msg void OnMethod7();
  83. afx_msg void OnMethod8();
  84. afx_msg void OnAppend();
  85. afx_msg void OnDelete();
  86. afx_msg void OnChange();
  87. afx_msg void OnClear();
  88. afx_msg void OnGetProperty();
  89. afx_msg void OnPutProperty();
  90. afx_msg void OnACEChange();
  91. afx_msg void OnACEPropertyChange();
  92. afx_msg void OnACLChange();
  93. afx_msg void OnSDPropertyChange();
  94. afx_msg void OnAddACE();
  95. afx_msg void OnCopyACE();
  96. afx_msg void OnPasteACE();
  97. afx_msg void OnRemoveACE();
  98. //}}AFX_MSG
  99. DECLARE_MESSAGE_MAP()
  100. // Other members
  101. protected:
  102. void FillACLControls( void );
  103. IDispatch* m_pDescriptor;
  104. ACLTYPE GetCurrentACL( void );
  105. int GetCurrentACE( void );
  106. int GetCurrentSDProperty( void );
  107. int GetCurrentACEProperty( void );
  108. void DisplayACL ( COleDsObject* pObject, CString strAttrName );
  109. void HideControls ( BOOL bNormal );
  110. void ShowControls ( BOOL bNormal );
  111. void PutACEPropertyValue ( void );
  112. void PutSDPropertyValue ( void );
  113. void DisplaySDPropertyValue ( void );
  114. void DisplayACEPropertyValue ( void );
  115. void DisplaySDPropertiesList ( int nSelect = 0 );
  116. void DisplayACEPropertiesList ( int nSelect = 0 );
  117. void DisplayACLNames ( int nSelect = 0 );
  118. void DisplayACENames ( int nSelect = 0 );
  119. protected:
  120. void MoveSecurityWindows( void );
  121. ACLTYPE GetSelectedACL( void );
  122. BOOL m_bACLDisplayed;
  123. int m_nProperty;
  124. BOOL m_bStatus;
  125. BOOL m_bDirty;
  126. BOOL m_bInitialized;
  127. int m_arrNormalControls[ 64 ];
  128. int m_arrSecurityControls[ 64 ];
  129. CADsSecurityDescriptor* pSecurityDescriptor;
  130. int m_nLastSD;
  131. int m_nLastSDValue;
  132. int m_nLastACE;
  133. int m_nLastACEValue;
  134. ACLTYPE m_nLastACL;
  135. };
  136. /////////////////////////////////////////////////////////////////////////////
  137. /////////////////////////////////////////////////////////////////////////////
  138. // CSetMandatoryProperties dialog
  139. class CSetMandatoryProperties : public CDialog
  140. {
  141. // Construction
  142. public:
  143. CSetMandatoryProperties(CWnd* pParent = NULL); // standard constructor
  144. // Dialog Data
  145. //{{AFX_DATA(CSetMandatoryProperties)
  146. enum { IDD = IDD_SETPROPERTIES };
  147. CStatic m_Containment;
  148. CStatic m_ItemOleDsPath;
  149. CStatic m_PropertyOptional;
  150. CStatic m_PropertyNormal;
  151. CStatic m_PropertyMinRange;
  152. CStatic m_PropertyMaxRange;
  153. CStatic m_PropertyType;
  154. CStatic m_PrimaryInterface;
  155. CStatic m_HelpFileContext;
  156. CStatic m_DerivedFrom;
  157. CStatic m_HelpFileName;
  158. CStatic m_CLSID;
  159. CStatic m_Container;
  160. CStatic m_ClassType;
  161. CEdit m_PropValue;
  162. CComboBox m_PropList;
  163. CTabCtrl m_Schema;
  164. // NOTE: the ClassWizard will add data members here
  165. //}}AFX_DATA
  166. // Overrides
  167. // ClassWizard generated virtual function overrides
  168. //{{AFX_VIRTUAL(CSetMandatoryProperties)
  169. protected:
  170. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  171. //}}AFX_VIRTUAL
  172. public:
  173. void SetOleDsObject( COleDsObject* );
  174. // Implementation
  175. protected:
  176. // Generated message map functions
  177. //{{AFX_MSG(CSetMandatoryProperties)
  178. afx_msg void OnSelchangeProperties(NMHDR* pNMHDR, LRESULT* pResult);
  179. afx_msg void OnSelchangeProplist();
  180. afx_msg void OnOK();
  181. afx_msg void OnSetfocusPropvalue();
  182. virtual BOOL OnInitDialog();
  183. //}}AFX_MSG
  184. DECLARE_MESSAGE_MAP()
  185. protected:
  186. HRESULT PutPropertyValue( );
  187. protected:
  188. COleDsObject* m_pObject;
  189. int m_nFuncSet;
  190. int m_nProperty;
  191. BOOL m_bStatus;
  192. BOOL m_bDirty;
  193. BOOL m_bInitialized;
  194. };
  195. /////////////////////////////////////////////////////////////////////////////
  196. // CPropertyDialog dialog
  197. class CPropertyDialog : public CDialog
  198. {
  199. // Construction
  200. public:
  201. CPropertyDialog(CWnd* pParent = NULL); // standard constructor
  202. // Dialog Data
  203. //{{AFX_DATA(CPropertyDialog)
  204. enum { IDD = IDD_ADDPROPERTY };
  205. CString m_PropertyName;
  206. CString m_PropertyType;
  207. CString m_PropertyValue;
  208. //}}AFX_DATA
  209. void SaveLRUList ( int idCBox, TCHAR* szSection, int nMax = 100 );
  210. void GetLRUList ( int idCBox, TCHAR* szSection );
  211. public:
  212. BOOL m_bMultiValued;
  213. // Overrides
  214. // ClassWizard generated virtual function overrides
  215. //{{AFX_VIRTUAL(CPropertyDialog)
  216. protected:
  217. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  218. //}}AFX_VIRTUAL
  219. // Implementation
  220. protected:
  221. // Generated message map functions
  222. //{{AFX_MSG(CPropertyDialog)
  223. virtual BOOL OnInitDialog();
  224. virtual void OnOK();
  225. //}}AFX_MSG
  226. DECLARE_MESSAGE_MAP()
  227. };