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.

450 lines
13 KiB

  1. /*******************************************************************************
  2. *
  3. * domainpg.h
  4. *
  5. * - declarations for the Domain info pages
  6. * - the Domain info pages are all CFormView derivatives
  7. * based on dialog templates
  8. *
  9. * copyright notice: Copyright 1997, Citrix Systems Inc.
  10. * Copyright (c) 1998 - 1999 Microsoft Corporation
  11. *
  12. * $Author: donm $ Don Messerli
  13. *
  14. * $Log: N:\nt\private\utils\citrix\winutils\tsadmin\VCS\domainpg.h $
  15. *
  16. * Rev 1.1 19 Jan 1998 16:47:40 donm
  17. * new ui behavior for domains and servers
  18. *
  19. * Rev 1.0 03 Nov 1997 15:07:28 donm
  20. * Initial revision.
  21. *
  22. *
  23. *******************************************************************************/
  24. #ifndef _DOMAINPAGES_H
  25. #define _DOMAINPAGES_H
  26. #include "Resource.h"
  27. #ifndef __AFXEXT_H__
  28. #include <afxext.h>
  29. #endif
  30. #include "winadmin.h"
  31. //////////////////////////
  32. // CLASS: CDomainServersPage
  33. //
  34. class CDomainServersPage : public CAdminPage
  35. {
  36. friend class CDomainView;
  37. protected:
  38. CDomainServersPage(); // protected constructor used by dynamic creation
  39. DECLARE_DYNCREATE(CDomainServersPage)
  40. // Form Data
  41. public:
  42. //{{AFX_DATA(CDomainServersPage)
  43. enum { IDD = IDD_ALL_SERVER_SERVERS };
  44. CListCtrl m_ServerList;
  45. //}}AFX_DATA
  46. // Attributes
  47. public:
  48. protected:
  49. CImageList m_ImageList; // image list associated with the tree control
  50. int m_idxServer; // index of Server image
  51. int m_idxCurrentServer; // index of Current Server image
  52. int m_idxNotSign; // index of Not Sign overlay (for non-sane servers)
  53. int m_idxQuestion; // index of Question Mark overlay (for non-opened servers)
  54. private:
  55. CDomain *m_pDomain;
  56. int m_CurrentSortColumn;
  57. BOOL m_bSortAscending;
  58. CCriticalSection m_ListControlCriticalSection;
  59. // Operations
  60. public:
  61. protected:
  62. void AddServer(CServer *pServer);
  63. void RemoveServer(CServer *pServer);
  64. void UpdateServer(CServer *pServer);
  65. private:
  66. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  67. void BuildImageList(); // builds the image list;
  68. void DisplayServers();
  69. virtual void Reset(void *);
  70. BOOL AddServerToList(CServer *pServer);
  71. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  72. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  73. // Overrides
  74. // ClassWizard generated virtual function overrides
  75. //{{AFX_VIRTUAL(CDomainServersPage)
  76. public:
  77. virtual void OnInitialUpdate();
  78. protected:
  79. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  80. //}}AFX_VIRTUAL
  81. // Implementation
  82. protected:
  83. virtual ~CDomainServersPage();
  84. #ifdef _DEBUG
  85. virtual void AssertValid() const;
  86. virtual void Dump(CDumpContext& dc) const;
  87. #endif
  88. // Generated message map functions
  89. //{{AFX_MSG(CDomainServersPage)
  90. afx_msg void OnSize(UINT nType, int cx, int cy);
  91. afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  92. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  93. afx_msg void OnServerItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  94. afx_msg void OnSetfocusServerList(NMHDR* pNMHDR, LRESULT* pResult);
  95. afx_msg void OnKillfocusServerList(NMHDR* pNMHDR, LRESULT* pResult);
  96. //}}AFX_MSG
  97. DECLARE_MESSAGE_MAP()
  98. }; // end class CDomainServersPage
  99. //////////////////////////
  100. // CLASS: CDomainUsersPage
  101. //
  102. class CDomainUsersPage : public CAdminPage
  103. {
  104. friend class CDomainView;
  105. protected:
  106. CDomainUsersPage(); // protected constructor used by dynamic creation
  107. DECLARE_DYNCREATE(CDomainUsersPage)
  108. // Form Data
  109. public:
  110. //{{AFX_DATA(CDomainUsersPage)
  111. enum { IDD = IDD_ALL_SERVER_USERS };
  112. CListCtrl m_UserList;
  113. //}}AFX_DATA
  114. // Attributes
  115. public:
  116. protected:
  117. CImageList m_ImageList; // image list associated with the tree control
  118. int m_idxUser; // index of User image
  119. int m_idxCurrentUser; // index of Current User image
  120. private:
  121. CDomain *m_pDomain;
  122. int m_CurrentSortColumn;
  123. BOOL m_bSortAscending;
  124. CCriticalSection m_ListControlCriticalSection;
  125. // Operations
  126. public:
  127. virtual void ClearSelections();
  128. protected:
  129. void AddServer(CServer *pServer);
  130. void RemoveServer(CServer *pServer);
  131. void UpdateServer(CServer *pServer);
  132. void UpdateWinStations(CServer *pServer);
  133. private:
  134. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  135. void BuildImageList(); // builds the image list;
  136. void DisplayUsers();
  137. virtual void Reset(void *);
  138. BOOL AddServerToList(CServer *pServer);
  139. int AddUserToList(CWinStation *pWinStation);
  140. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  141. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  142. // Overrides
  143. // ClassWizard generated virtual function overrides
  144. //{{AFX_VIRTUAL(CDomainUsersPage)
  145. public:
  146. virtual void OnInitialUpdate();
  147. protected:
  148. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  149. //}}AFX_VIRTUAL
  150. // Implementation
  151. protected:
  152. virtual ~CDomainUsersPage();
  153. #ifdef _DEBUG
  154. virtual void AssertValid() const;
  155. virtual void Dump(CDumpContext& dc) const;
  156. #endif
  157. // Generated message map functions
  158. //{{AFX_MSG(CDomainUsersPage)
  159. afx_msg void OnSize(UINT nType, int cx, int cy);
  160. afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  161. afx_msg void OnUserItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  162. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  163. afx_msg void OnSetfocusUserList(NMHDR* pNMHDR, LRESULT* pResult);
  164. afx_msg void OnKillfocusUserList(NMHDR* pNMHDR, LRESULT* pResult);
  165. //}}AFX_MSG
  166. DECLARE_MESSAGE_MAP()
  167. }; // end class CDomainUsersPage
  168. //////////////////////////
  169. // CLASS: CDomainWinStationsPage
  170. //
  171. class CDomainWinStationsPage : public CAdminPage
  172. {
  173. friend class CDomainView;
  174. protected:
  175. CDomainWinStationsPage(); // protected constructor used by dynamic creation
  176. DECLARE_DYNCREATE(CDomainWinStationsPage)
  177. // Form Data
  178. public:
  179. //{{AFX_DATA(CDomainWinStationsPage)
  180. enum { IDD = IDD_ALL_SERVER_WINSTATIONS };
  181. CListCtrl m_StationList;
  182. //}}AFX_DATA
  183. // Attributes
  184. public:
  185. protected:
  186. CImageList m_ImageList; // image list associated with the tree control
  187. int m_idxBlank; // index of Blank image
  188. int m_idxCitrix; // index of Citrix image
  189. int m_idxServer; // index of Server image
  190. int m_idxConsole; // index of Console image
  191. int m_idxNet; // index of Net image
  192. int m_idxAsync; // index of Async image
  193. int m_idxCurrentConsole;// index of Current Console image
  194. int m_idxCurrentNet; // index of Current Net image
  195. int m_idxCurrentAsync; // index of Current Async image
  196. int m_idxDirectAsync; // index of Direct Async image
  197. int m_idxCurrentDirectAsync; // index of Current Direct Async image
  198. private:
  199. CDomain *m_pDomain;
  200. int m_CurrentSortColumn;
  201. BOOL m_bSortAscending;
  202. CCriticalSection m_ListControlCriticalSection;
  203. // Operations
  204. public:
  205. virtual void ClearSelections();
  206. protected:
  207. void AddServer(CServer *pServer);
  208. void RemoveServer(CServer *pServer);
  209. void UpdateServer(CServer *pServer);
  210. void UpdateWinStations(CServer *pServer);
  211. private:
  212. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  213. void BuildImageList(); // builds the image list;
  214. void DisplayStations();
  215. virtual void Reset(void *);
  216. BOOL AddServerToList(CServer *pServer);
  217. int AddWinStationToList(CWinStation *pWinStation);
  218. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  219. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  220. // Overrides
  221. // ClassWizard generated virtual function overrides
  222. //{{AFX_VIRTUAL(CDomainWinStationsPage)
  223. public:
  224. virtual void OnInitialUpdate();
  225. protected:
  226. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  227. //}}AFX_VIRTUAL
  228. // Implementation
  229. protected:
  230. virtual ~CDomainWinStationsPage();
  231. #ifdef _DEBUG
  232. virtual void AssertValid() const;
  233. virtual void Dump(CDumpContext& dc) const;
  234. #endif
  235. // Generated message map functions
  236. //{{AFX_MSG(CDomainWinStationsPage)
  237. afx_msg void OnSize(UINT nType, int cx, int cy);
  238. afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  239. afx_msg void OnWinStationItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  240. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  241. afx_msg void OnSetfocusWinstationList(NMHDR* pNMHDR, LRESULT* pResult);
  242. afx_msg void OnKillfocusWinstationList(NMHDR* pNMHDR, LRESULT* pResult);
  243. //}}AFX_MSG
  244. DECLARE_MESSAGE_MAP()
  245. }; // end class CDomainWinStationsPage
  246. ////////////////////////////
  247. // CLASS: CDomainProcessesPage
  248. //
  249. class CDomainProcessesPage : public CAdminPage
  250. {
  251. friend class CDomainView;
  252. protected:
  253. CDomainProcessesPage(); // protected constructor used by dynamic creation
  254. DECLARE_DYNCREATE(CDomainProcessesPage)
  255. // Form Data
  256. public:
  257. //{{AFX_DATA(CDomainProcessesPage)
  258. enum { IDD = IDD_ALL_SERVER_PROCESSES };
  259. CListCtrl m_ProcessList;
  260. // NOTE: the ClassWizard will add data members here
  261. //}}AFX_DATA
  262. // Attributes
  263. public:
  264. private:
  265. CDomain *m_pDomain;
  266. int m_CurrentSortColumn;
  267. BOOL m_bSortAscending;
  268. CCriticalSection m_ListControlCriticalSection;
  269. // Operations
  270. public:
  271. protected:
  272. void AddServer(CServer *pServer);
  273. void RemoveServer(CServer *pServer);
  274. void UpdateServer(CServer *pServer);
  275. void UpdateProcesses(CServer *pServer);
  276. void RemoveProcess(CProcess *pProcess);
  277. private:
  278. virtual void Reset(void *);
  279. void DisplayProcesses();
  280. BOOL AddServerToList(CServer *pServer);
  281. int AddProcessToList(CProcess *pProcess);
  282. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  283. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  284. // Overrides
  285. // ClassWizard generated virtual function overrides
  286. //{{AFX_VIRTUAL(CDomainProcessesPage)
  287. public:
  288. virtual void OnInitialUpdate();
  289. protected:
  290. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  291. //}}AFX_VIRTUAL
  292. // Implementation
  293. protected:
  294. virtual ~CDomainProcessesPage();
  295. #ifdef _DEBUG
  296. virtual void AssertValid() const;
  297. virtual void Dump(CDumpContext& dc) const;
  298. #endif
  299. // Generated message map functions
  300. //{{AFX_MSG(CDomainProcessesPage)
  301. afx_msg void OnSize(UINT nType, int cx, int cy);
  302. afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  303. afx_msg void OnProcessItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  304. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  305. afx_msg void OnSetfocusProcessList(NMHDR* pNMHDR, LRESULT* pResult);
  306. afx_msg void OnKillfocusProcessList(NMHDR* pNMHDR, LRESULT* pResult);
  307. //}}AFX_MSG
  308. DECLARE_MESSAGE_MAP()
  309. }; // end class CDomainProcessesPage
  310. //////////////////////////
  311. // CLASS: CDomainLicensesPage
  312. //
  313. class CDomainLicensesPage : public CAdminPage
  314. {
  315. friend class CDomainView;
  316. protected:
  317. CDomainLicensesPage(); // protected constructor used by dynamic creation
  318. DECLARE_DYNCREATE(CDomainLicensesPage)
  319. // Form Data
  320. public:
  321. //{{AFX_DATA(CDomainLicencesPage)
  322. enum { IDD = IDD_DOMAIN_LICENSES };
  323. CListCtrl m_LicenseList;
  324. //}}AFX_DATA
  325. // Attributes
  326. public:
  327. protected:
  328. CImageList m_ImageList; // image list associated with the tree control
  329. int m_idxBase; // index of Base image
  330. int m_idxBump; // index of Bump image
  331. int m_idxEnabler; // index of Enabler image
  332. int m_idxUnknown; // index of Unknown image
  333. private:
  334. CDomain *m_pDomain;
  335. int m_CurrentSortColumn;
  336. BOOL m_bSortAscending;
  337. // Operations
  338. public:
  339. protected:
  340. void AddServer(CServer *pServer);
  341. void RemoveServer(CServer *pServer);
  342. void UpdateServer(CServer *pServer);
  343. private:
  344. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  345. void BuildImageList(); // builds the image list;
  346. void DisplayLicenses();
  347. virtual void Reset(void*);
  348. BOOL AddServerToList(CServer *pServer);
  349. // Overrides
  350. // ClassWizard generated virtual function overrides
  351. //{{AFX_VIRTUAL(CDomainLicensesPage)
  352. public:
  353. virtual void OnInitialUpdate();
  354. protected:
  355. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  356. //}}AFX_VIRTUAL
  357. // Implementation
  358. protected:
  359. virtual ~CDomainLicensesPage();
  360. #ifdef _DEBUG
  361. virtual void AssertValid() const;
  362. virtual void Dump(CDumpContext& dc) const;
  363. #endif
  364. // Generated message map functions
  365. //{{AFX_MSG(CDomainLicensesPage)
  366. afx_msg void OnSize(UINT nType, int cx, int cy);
  367. afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  368. afx_msg void OnSetfocusLicenseList(NMHDR* pNMHDR, LRESULT* pResult);
  369. afx_msg void OnKillfocusLicenseList(NMHDR* pNMHDR, LRESULT* pResult);
  370. //}}AFX_MSG
  371. DECLARE_MESSAGE_MAP()
  372. }; // end class CDomainLicensesPage
  373. #endif // _DOMAINPAGES_H