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.

454 lines
11 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. websvcext_sheet.h
  5. Abstract:
  6. Property Sheet
  7. Author:
  8. Sergei Antonov (sergeia)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef _WEBSVCEXT_SHEET_H
  14. #define _WEBSVCEXT_SHEET_H
  15. class CWebServiceExtensionProps : public CMetaProperties
  16. {
  17. public:
  18. CWebServiceExtensionProps(CMetaInterface * pInterface, LPCTSTR meta_path, CRestrictionUIEntry * pRestrictionUIEntry, CWebServiceExtension * pWebServiceExtension);
  19. virtual ~CWebServiceExtensionProps();
  20. virtual HRESULT WriteDirtyProps();
  21. HRESULT UpdateMMC(DWORD dwUpdateFlag);
  22. protected:
  23. virtual void ParseFields();
  24. public:
  25. MP_CString m_strExtensionName;
  26. MP_CString m_strExtensionUsedBy;
  27. MP_int m_iExtensionUsedByCount;
  28. public:
  29. CRestrictionList m_MyRestrictionList;
  30. public:
  31. CRestrictionUIEntry * m_pRestrictionUIEntry;
  32. CWebServiceExtension * m_pWebServiceExtension;
  33. CMetaInterface * m_pInterface;
  34. };
  35. class CWebServiceExtensionSheet : public CInetPropertySheet
  36. {
  37. DECLARE_DYNAMIC(CWebServiceExtensionSheet)
  38. public:
  39. CWebServiceExtensionSheet(
  40. CComAuthInfo * pComAuthInfo,
  41. LPCTSTR lpszMetaPath,
  42. CWnd * pParentWnd = NULL,
  43. LPARAM lParam = 0L,
  44. LPARAM lParamParent = 0L,
  45. LPARAM lParam2 = 0L,
  46. UINT iSelectPage = 0
  47. );
  48. virtual ~CWebServiceExtensionSheet();
  49. public:
  50. // The following methods have predefined names to be compatible with
  51. // BEGIN_META_INST_READ and other macros.
  52. HRESULT QueryInstanceResult() const
  53. {
  54. return m_pprops ? m_pprops->QueryResult() : S_OK;
  55. }
  56. CWebServiceExtensionProps & GetInstanceProperties() { return *m_pprops; }
  57. virtual HRESULT LoadConfigurationParameters();
  58. virtual void FreeConfigurationParameters();
  59. //{{AFX_MSG(CWebServiceExtensionSheet)
  60. //}}AFX_MSG
  61. DECLARE_MESSAGE_MAP()
  62. public:
  63. CRestrictionUIEntry * m_pRestrictionUIEntry;
  64. CWebServiceExtension * m_pWebServiceExtension;
  65. private:
  66. CWebServiceExtensionProps * m_pprops;
  67. };
  68. class CWebServiceExtensionGeneral : public CInetPropertyPage
  69. {
  70. DECLARE_DYNCREATE(CWebServiceExtensionGeneral)
  71. public:
  72. CWebServiceExtensionGeneral(CWebServiceExtensionSheet * pSheet = NULL,int iImageIndex = 0,CRestrictionUIEntry * pRestrictionUIEntry = NULL);
  73. virtual ~CWebServiceExtensionGeneral();
  74. //
  75. // Dialog Data
  76. //
  77. protected:
  78. //{{AFX_DATA(CWebServiceExtensionGeneral)
  79. enum { IDD = IDD_WEBSVCEXT_GENERAL };
  80. CEdit m_ExtensionName;
  81. CEdit m_ExtensionUsedBy;
  82. //}}AFX_DATA
  83. //{{AFX_MSG(CWebServiceExtensionGeneral)
  84. virtual BOOL OnInitDialog();
  85. afx_msg void OnItemChanged();
  86. virtual BOOL OnSetActive();
  87. afx_msg void OnHelp();
  88. afx_msg BOOL OnHelpInfo(HELPINFO * pHelpInfo);
  89. afx_msg void OnDestroy();
  90. //}}AFX_MSG
  91. DECLARE_MESSAGE_MAP()
  92. //
  93. // Overrides
  94. //
  95. protected:
  96. //{{AFX_VIRTUAL(CWebServiceExtensionGeneral)
  97. virtual void DoDataExchange(CDataExchange * pDX);
  98. //}}AFX_VIRTUAL
  99. virtual HRESULT FetchLoadedValues();
  100. virtual HRESULT SaveInfo();
  101. void SetControlsState();
  102. CString m_strExtensionName;
  103. CString m_strExtensionUsedBy;
  104. int m_iExtensionUsedByCount;
  105. HBITMAP m_hGeneralImage;
  106. CRestrictionUIEntry * m_pRestrictionUIEntry;
  107. };
  108. class CWebServiceExtensionRequiredFiles : public CInetPropertyPage
  109. {
  110. DECLARE_DYNCREATE(CWebServiceExtensionRequiredFiles)
  111. public:
  112. CWebServiceExtensionRequiredFiles(CWebServiceExtensionSheet * pSheet = NULL, CComAuthInfo * pComAuthInfo = NULL, CRestrictionUIEntry * pRestrictionUIEntry = NULL);
  113. virtual ~CWebServiceExtensionRequiredFiles();
  114. //
  115. // Dialog Data
  116. //
  117. protected:
  118. //{{AFX_DATA(CWebServiceExtensionRequiredFiles)
  119. enum { IDD = IDD_WEBSVCEXT_REQUIREDFILES };
  120. CButton m_bnt_Add;
  121. CButton m_bnt_Remove;
  122. CButton m_bnt_Enable;
  123. CButton m_bnt_Disable;
  124. CRestrictionListBox m_list_Files;
  125. //}}AFX_DATA
  126. //{{AFX_MSG(CWebServiceExtensionRequiredFiles)
  127. virtual BOOL OnInitDialog();
  128. afx_msg void OnDoButtonAdd();
  129. afx_msg void OnDoButtonRemove();
  130. afx_msg void OnDoButtonEnable();
  131. afx_msg void OnDoButtonDisable();
  132. afx_msg void OnClickListFiles(NMHDR * pNMHDR, LRESULT * pResult);
  133. afx_msg void OnDblclkListFiles(NMHDR * pNMHDR, LRESULT * pResult);
  134. afx_msg void OnKeydownListFiles(NMHDR* pNMHDR, LRESULT* pResult);
  135. afx_msg void OnSelChangedListFiles(NMHDR* pNMHDR, LRESULT* pResult);
  136. afx_msg void OnHelp();
  137. afx_msg BOOL OnHelpInfo(HELPINFO * pHelpInfo);
  138. //}}AFX_MSG
  139. DECLARE_MESSAGE_MAP()
  140. //
  141. // Overrides
  142. //
  143. protected:
  144. //{{AFX_VIRTUAL(CAppPoolPerf)
  145. virtual void DoDataExchange(CDataExchange * pDX);
  146. //}}AFX_VIRTUAL
  147. virtual HRESULT FetchLoadedValues();
  148. virtual HRESULT SaveInfo();
  149. void SetControlState();
  150. void FillListBox(CRestrictionEntry * pSelection = NULL);
  151. CComAuthInfo * m_pComAuthInfo;
  152. CMetaInterface * m_pInterface;
  153. CRestrictionList m_MyRestrictionList;
  154. CRestrictionUIEntry * m_pRestrictionUIEntry;
  155. };
  156. //
  157. // CFileDlg dialog
  158. //
  159. class CFileDlg : public CDialog
  160. {
  161. //
  162. // Construction
  163. //
  164. public:
  165. CFileDlg(
  166. IN BOOL fLocal,
  167. IN CMetaInterface * pInterface,
  168. IN CRestrictionList * pMyRestrictionList,
  169. IN LPCTSTR strGroupID,
  170. IN CWnd * pParent = NULL
  171. );
  172. //
  173. // Dialog Data
  174. //
  175. protected:
  176. //{{AFX_DATA(CFileDlg)
  177. enum { IDD = IDD_ADD_FILE };
  178. CEdit m_edit_FileName;
  179. CButton m_button_Browse;
  180. CButton m_button_Ok;
  181. //}}AFX_DATA
  182. //
  183. // Overrides
  184. //
  185. protected:
  186. //{{AFX_VIRTUAL(CFileDlg)
  187. protected:
  188. virtual void DoDataExchange(CDataExchange * pDX);
  189. //}}AFX_VIRTUAL
  190. //
  191. // Access
  192. //
  193. public:
  194. CString m_strFileName;
  195. CString m_strGroupID;
  196. BOOL m_bValidateFlag;
  197. CRestrictionList * m_pRestrictionList;
  198. //
  199. // Implementation
  200. //
  201. protected:
  202. //{{AFX_MSG(CFileDlg)
  203. afx_msg void OnButtonBrowse();
  204. afx_msg void OnFilenameChanged();
  205. virtual void OnOK();
  206. virtual BOOL OnInitDialog();
  207. //}}AFX_MSG
  208. afx_msg void OnItemChanged();
  209. void MySetControlStates();
  210. BOOL FilePathEntryExists(LPCTSTR lpName,CString * strUser);
  211. DECLARE_MESSAGE_MAP()
  212. private:
  213. CMetaInterface * m_pInterface;
  214. BOOL m_fLocal;
  215. };
  216. //
  217. // CWebSvcExtAddNewDlg dialog
  218. //
  219. class CWebSvcExtAddNewDlg : public CDialog
  220. {
  221. //
  222. // Construction
  223. //
  224. public:
  225. CWebSvcExtAddNewDlg(
  226. IN BOOL fLocal,
  227. CMetaInterface * pInterface,
  228. IN CWnd * pParent = NULL
  229. );
  230. ~CWebSvcExtAddNewDlg();
  231. //
  232. // Dialog Data
  233. //
  234. protected:
  235. //{{AFX_DATA(CWebSvcExtAddNewDlg)
  236. enum { IDD = IDD_WEBSVCEXT_ADDNEW };
  237. CEdit m_edit_FileName;
  238. CButton m_bnt_Add;
  239. CButton m_bnt_Remove;
  240. CButton m_chk_Allow;
  241. CButton m_button_Ok;
  242. CButton m_button_Help;
  243. CRestrictionListBox m_list_Files;
  244. //}}AFX_DATA
  245. //
  246. // Overrides
  247. //
  248. protected:
  249. //{{AFX_VIRTUAL(CWebSvcExtAddNewDlg)
  250. protected:
  251. virtual void DoDataExchange(CDataExchange * pDX);
  252. //}}AFX_VIRTUAL
  253. //
  254. // Access
  255. //
  256. public:
  257. BOOL m_fAllow;
  258. CString m_strGroupName;
  259. CMetaInterface * m_pInterface;
  260. CRestrictionList m_MyRestrictionList;
  261. //
  262. // Implementation
  263. //
  264. protected:
  265. //{{AFX_MSG(CWebSvcExtAddNewDlg)
  266. virtual void OnOK();
  267. virtual BOOL OnInitDialog();
  268. afx_msg void OnFilenameChanged();
  269. afx_msg void OnDoButtonAdd();
  270. afx_msg void OnDoButtonRemove();
  271. afx_msg void OnDoCheckAllow();
  272. afx_msg void OnClickListFiles(NMHDR * pNMHDR, LRESULT * pResult);
  273. afx_msg void OnKeydownListFiles(NMHDR* pNMHDR, LRESULT* pResult);
  274. afx_msg void OnSelChangedListFiles(NMHDR* pNMHDR, LRESULT* pResult);
  275. afx_msg void OnHelp();
  276. afx_msg BOOL OnHelpInfo(HELPINFO * pHelpInfo);
  277. //}}AFX_MSG
  278. afx_msg void OnItemChanged();
  279. void MySetControlStates();
  280. void FillListBox(CRestrictionEntry * pSelection = NULL);
  281. BOOL FilePathEntryExists(LPCTSTR lpName);
  282. DECLARE_MESSAGE_MAP()
  283. private:
  284. BOOL m_fIsLocal;
  285. };
  286. //
  287. // CWebSvcExtAddNewDlg dialog
  288. //
  289. class CWebSvcExtAddNewForAppDlg : public CDialog
  290. {
  291. //
  292. // Construction
  293. //
  294. public:
  295. CWebSvcExtAddNewForAppDlg(
  296. IN BOOL fLocal,
  297. IN CMetaInterface * pInterface,
  298. IN CWnd * pParent = NULL
  299. );
  300. //
  301. // Dialog Data
  302. //
  303. protected:
  304. //{{AFX_DATA(CWebSvcExtAddNewForAppDlg)
  305. enum { IDD = IDD_WEBSVCEXT_ADDBYAPP};
  306. CButton m_button_Ok;
  307. CButton m_button_Help;
  308. CComboBox m_combo_Applications;
  309. int m_nComboSelection;
  310. CMetaInterface * m_pInterface;
  311. CEdit m_Dependencies;
  312. //}}AFX_DATA
  313. //
  314. // Overrides
  315. //
  316. protected:
  317. //{{AFX_VIRTUAL(CWebSvcExtAddNewForAppDlg)
  318. protected:
  319. virtual void DoDataExchange(CDataExchange * pDX);
  320. //}}AFX_VIRTUAL
  321. //
  322. // Access
  323. //
  324. public:
  325. CApplicationDependEntry * m_pMySelectedApplication;
  326. //
  327. // Implementation
  328. //
  329. protected:
  330. //{{AFX_MSG(CWebSvcExtAddNewForAppDlg)
  331. virtual void OnOK();
  332. virtual BOOL OnInitDialog();
  333. virtual void OnSelchangeComboApplications();
  334. afx_msg void OnHelp();
  335. afx_msg BOOL OnHelpInfo(HELPINFO * pHelpInfo);
  336. //}}AFX_MSG
  337. afx_msg void OnItemChanged();
  338. void MySetControlStates();
  339. DECLARE_MESSAGE_MAP()
  340. private:
  341. CApplicationDependList m_MyApplicationDependList;
  342. CMyMapStringToString m_GroupIDtoGroupFriendList;
  343. BOOL m_fLocal;
  344. };
  345. class CDepedentAppsDlg : public CDialog
  346. {
  347. public:
  348. //
  349. // Constructor
  350. //
  351. CDepedentAppsDlg(CStringListEx * pstrlstDependApps,LPCTSTR strExtensionName,CWnd * pParent = NULL);
  352. //
  353. // Dialog Data
  354. //
  355. protected:
  356. //{{AFX_DATA(CDepedentAppsDlg)
  357. enum { IDD = IDD_CONFIRM_DEPENDENT_APPS };
  358. CButton m_button_Help;
  359. CListBox m_dependent_apps_list;
  360. //}}AFX_DATA
  361. //
  362. // Overrides
  363. //
  364. protected:
  365. //{{AFX_VIRTUAL(CDepedentAppsDlg)
  366. protected:
  367. virtual void DoDataExchange(CDataExchange * pDX);
  368. //}}AFX_VIRTUAL
  369. //
  370. // Implementation
  371. //
  372. protected:
  373. //{{AFX_MSG(CDepedentAppsDlg)
  374. virtual BOOL OnInitDialog();
  375. virtual void OnOK();
  376. afx_msg void OnHelp();
  377. afx_msg BOOL OnHelpInfo(HELPINFO * pHelpInfo);
  378. //}}AFX_MSG
  379. DECLARE_MESSAGE_MAP()
  380. protected:
  381. CString m_strExtensionName;
  382. CStringListEx * m_pstrlstDependentAppList;
  383. };
  384. BOOL StartAddNewDialog(CWnd * pParent,CMetaInterface * pInterface,BOOL bIsLocal,CRestrictionUIEntry **pReturnedNewEntry);
  385. BOOL StartAddNewByAppDialog(CWnd * pParent,CMetaInterface * pInterface,BOOL bIsLocal);
  386. #endif //_WEBSVCEXT_SHEET_H