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.

456 lines
13 KiB

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