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.

264 lines
6.9 KiB

  1. /*******************************************************************************
  2. *
  3. * apppgs.h
  4. *
  5. * - declarations for the Application info pages
  6. * - the application 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\apppgs.h $
  15. *
  16. * Rev 1.2 16 Feb 1998 16:00:02 donm
  17. * modifications to support pICAsso extension
  18. *
  19. * Rev 1.1 03 Nov 1997 15:20:26 donm
  20. * added descending sort
  21. *
  22. * Rev 1.0 16 Oct 1997 13:40:52 donm
  23. * Initial revision.
  24. *
  25. *******************************************************************************/
  26. #ifndef _APPLICATIONPAGES_H
  27. #define _APPLICATIONPAGES_H
  28. #include "Resource.h"
  29. #ifndef __AFXEXT_H__
  30. #include <afxext.h>
  31. #endif
  32. #include "winadmin.h"
  33. //////////////////////////
  34. // CLASS: CApplicationServersPage
  35. //
  36. class CApplicationServersPage : public CAdminPage
  37. {
  38. friend class CApplicationView;
  39. protected:
  40. CApplicationServersPage(); // protected constructor used by dynamic creation
  41. DECLARE_DYNCREATE(CApplicationServersPage)
  42. // Form Data
  43. public:
  44. //{{AFX_DATA(CApplicationServersPage)
  45. enum { IDD = IDD_APPLICATION_SERVERS };
  46. CListCtrl m_ServerList;
  47. //}}AFX_DATA
  48. // Attributes
  49. public:
  50. protected:
  51. CImageList m_imageList; // image list associated with the tree control
  52. int m_idxServer; // index of Server image
  53. int m_idxCurrentServer; // index of Current Server image
  54. private:
  55. CPublishedApp *m_pApplication; // pointer to current Application's info
  56. int m_CurrentSortColumn;
  57. BOOL m_bSortAscending;
  58. CCriticalSection m_ListControlCriticalSection;
  59. // Operations
  60. public:
  61. private:
  62. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  63. void BuildImageList(); // builds the image list;
  64. void DisplayServers();
  65. void Reset(void *pApplication);
  66. void UpdateServer(CServer *pServer);
  67. void AddServer(CAppServer *pAppServer);
  68. void RemoveServer(CAppServer *pAppServer);
  69. int AddServerToList(CAppServer *pAppServer);
  70. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  71. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  72. // Overrides
  73. // ClassWizard generated virtual function overrides
  74. //{{AFX_VIRTUAL(CApplicationServersPage)
  75. public:
  76. virtual void OnInitialUpdate();
  77. protected:
  78. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  79. //}}AFX_VIRTUAL
  80. // Implementation
  81. protected:
  82. virtual ~CApplicationServersPage();
  83. #ifdef _DEBUG
  84. virtual void AssertValid() const;
  85. virtual void Dump(CDumpContext& dc) const;
  86. #endif
  87. // Generated message map functions
  88. //{{AFX_MSG(CApplicationServersPage)
  89. afx_msg void OnSize(UINT nType, int cx, int cy);
  90. afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
  91. afx_msg void OnSetfocusServerList(NMHDR* pNMHDR, LRESULT* pResult);
  92. afx_msg void OnCommandHelp(void);
  93. //}}AFX_MSG
  94. DECLARE_MESSAGE_MAP()
  95. }; // end class CApplicationServersPage
  96. //////////////////////////
  97. // CLASS: CApplicationUsersPage
  98. //
  99. class CApplicationUsersPage : public CAdminPage
  100. {
  101. friend class CApplicationView;
  102. protected:
  103. CApplicationUsersPage(); // protected constructor used by dynamic creation
  104. DECLARE_DYNCREATE(CApplicationUsersPage)
  105. // Form Data
  106. public:
  107. //{{AFX_DATA(CApplicationUsersPage)
  108. enum { IDD = IDD_APPLICATION_USERS };
  109. CListCtrl m_UserList;
  110. //}}AFX_DATA
  111. // Attributes
  112. public:
  113. protected:
  114. CImageList m_imageList; // image list associated with the tree control
  115. int m_idxUser; // index of User image
  116. int m_idxCurrentUser; // index of Current User image
  117. private:
  118. CPublishedApp *m_pApplication; // pointer to current Application's info
  119. int m_CurrentSortColumn;
  120. BOOL m_bSortAscending;
  121. CCriticalSection m_ListControlCriticalSection;
  122. // Operations
  123. public:
  124. protected:
  125. void UpdateWinStations(CServer *pServer);
  126. private:
  127. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  128. void BuildImageList(); // builds the image list;
  129. void DisplayUsers();
  130. void Reset(void *pApplication);
  131. int AddUserToList(CWinStation *pWinStation);
  132. void PopulateUserColumns(int item, CWinStation *pWinStation, BOOL newitem);
  133. void LockListControl() { m_ListControlCriticalSection.Lock(); }
  134. void UnlockListControl() { m_ListControlCriticalSection.Unlock(); }
  135. // Overrides
  136. // ClassWizard generated virtual function overrides
  137. //{{AFX_VIRTUAL(CApplicationUsersPage)
  138. public:
  139. virtual void OnInitialUpdate();
  140. protected:
  141. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  142. //}}AFX_VIRTUAL
  143. // Implementation
  144. protected:
  145. virtual ~CApplicationUsersPage();
  146. #ifdef _DEBUG
  147. virtual void AssertValid() const;
  148. virtual void Dump(CDumpContext& dc) const;
  149. #endif
  150. // Generated message map functions
  151. //{{AFX_MSG(CApplicationUsersPage)
  152. afx_msg void OnSize(UINT nType, int cx, int cy);
  153. afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
  154. afx_msg void OnSetfocusUserList(NMHDR* pNMHDR, LRESULT* pResult);
  155. afx_msg void OnCommandHelp(void);
  156. //}}AFX_MSG
  157. DECLARE_MESSAGE_MAP()
  158. }; // end class CApplicationUsersPage
  159. //////////////////////////
  160. // CLASS: CApplicationInfoPage
  161. //
  162. const int LOCAL_GROUP_IMAGE = 0;
  163. const int GLOBAL_GROUP_IMAGE = 1;
  164. const int USER_IMAGE = 2;
  165. class CApplicationInfoPage : public CAdminPage
  166. {
  167. friend class CApplicationView;
  168. protected:
  169. CApplicationInfoPage(); // protected constructor used by dynamic creation
  170. DECLARE_DYNCREATE(CApplicationInfoPage)
  171. // Form Data
  172. public:
  173. //{{AFX_DATA(CApplicationInfoPage)
  174. enum { IDD = IDD_APPLICATION_INFO };
  175. CListCtrl m_SecurityList;
  176. //}}AFX_DATA
  177. // Attributes
  178. public:
  179. protected:
  180. CImageList m_imageList; // image list associated with the tree control
  181. private:
  182. CPublishedApp *m_pApplication; // pointer to current Application's info
  183. int m_CurrentSortColumn;
  184. BOOL m_bSortAscending;
  185. // Operations
  186. public:
  187. private:
  188. int AddIconToImageList(int); // adds an icon's image to the image list and returns the image's index
  189. void BuildImageList(); // builds the image list;
  190. void Display();
  191. void Reset(void *pApplication);
  192. // Overrides
  193. // ClassWizard generated virtual function overrides
  194. //{{AFX_VIRTUAL(CApplicationInfoPage)
  195. public:
  196. virtual void OnInitialUpdate();
  197. protected:
  198. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  199. //}}AFX_VIRTUAL
  200. // Implementation
  201. protected:
  202. virtual ~CApplicationInfoPage();
  203. #ifdef _DEBUG
  204. virtual void AssertValid() const;
  205. virtual void Dump(CDumpContext& dc) const;
  206. #endif
  207. // Generated message map functions
  208. //{{AFX_MSG(CApplicationInfoPage)
  209. afx_msg void OnSize(UINT nType, int cx, int cy);
  210. afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
  211. afx_msg void OnSetfocusSecurityList(NMHDR* pNMHDR, LRESULT* pResult);
  212. afx_msg void OnCommandHelp(void);
  213. //}}AFX_MSG
  214. DECLARE_MESSAGE_MAP()
  215. }; // end class CApplicationInfoPage
  216. #endif // _APPLICATIONPAGES_H