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.

307 lines
9.8 KiB

  1. /******************************************************************
  2. Copyright (C) 2000 Microsoft Corp.
  3. Terminal.H -- WMI provider class definition
  4. Generated by Microsoft WBEM Code Generation Engine
  5. Description:
  6. *******************************************************************/
  7. // Property set identification
  8. //============================
  9. #ifndef _TerminalWinstation_H_
  10. #define _TerminalWinstation_H_
  11. #include "resource.h"
  12. #include <winsta.h>
  13. #include <regapi.h>
  14. #include <utilsub.h>
  15. #include <allproc.h>
  16. #include "trace.h"
  17. #define PROVIDER_NAME_Win32_WIN32_TERMINALSERVICESETTING_Prov L"Win32_TerminalServiceSetting"
  18. #define PROVIDER_NAME_Win32_WIN32_TSPROVIDER_Prov L"Win32_TSProvider"
  19. #define PROVIDER_NAME_Win32_WIN32_TERMINALSERVICE_Prov L"Win32_TerminalService"
  20. #define PROVIDER_NAME_Win32_WIN32_TSSESSIONDIRECTORY_Prov L"Win32_TSSessionDirectory"
  21. #define SIZE_OF_BUFFER( x ) sizeof( x ) / sizeof( TCHAR )
  22. extern BOOL g_bInitialized;
  23. // See ExecQuery for details of the usage of these #defines
  24. #define BIT_MODE 0x00000001
  25. #define BIT_LICENSING 0x00000002
  26. #define BIT_ACTIVEDESKTOP 0x00000004
  27. #define BIT_USERPERM 0x00000008
  28. #define BIT_DELETETEMPDIRS 0x00000010
  29. #define BIT_PERSESSIONTEMPDIR 0x00000020
  30. #define BIT_LOGONS 0x00000040
  31. #define BIT_TOTALSESSIONS 0x00000080
  32. #define BIT_DISCONNECTEDSESSIONS 0x00000100
  33. #define BIT_ESTIMATEDSESSIONCAPACITY 0x00000200
  34. #define BIT_RESOURCECONSTRAINT 0x00000400
  35. #define BIT_RAWSESSIONCAPACITY 0x00000800
  36. #define BIT_SESSIONDIRECTORY 0x00001000
  37. #define BIT_CLUSTERNAME 0x00002000
  38. #define BIT_HELP 0x00004000
  39. #define BIT_ADDITIONALPARAMS 0x00008000
  40. #define BIT_SESSIONDIRECTORYACTIVE 0x00010000
  41. #define BIT_ALLOWTSCONNECTIONS 0x00020000
  42. #define BIT_SINGLESESSION 0x00040000
  43. #define BIT_PROFILEPATH 0x00080000
  44. #define BIT_HOMEDIRECTORY 0x00100000
  45. #define BIT_SESSIONDIRECTORYEXPOSESERVERIP 0x00200000
  46. #define BIT_DIRECTCONNECTLICENSESERVERS 0x00400000
  47. #define BIT_SERVERNAME 0x00800000
  48. #define BIT_ALL_PROPERTIES 0xffffffff
  49. #define SESSDIR_LENGTH 64
  50. #define OPAQUESETTINGS_LENGTH 256
  51. // Property name externs -- defined in Terminal.cpp
  52. //=================================================
  53. //=--------------------------
  54. class CStackClass
  55. {
  56. public:
  57. // Constructor/destructor
  58. //=======================
  59. CStackClass();
  60. virtual ~CStackClass();
  61. IClassFactory *m_pCfg;
  62. ICfgComp *m_pCfgComp;
  63. protected:
  64. // Reading Functions
  65. //============================
  66. // Writing Functions
  67. //============================
  68. // TO DO: Declare any additional functions and accessor
  69. // functions for private data used by this class
  70. //===========================================================
  71. private:
  72. // All data members for CTerminalWinstation should be included here.
  73. } ;
  74. //=----------
  75. class CWin32_TerminalService : public Provider
  76. {
  77. public:
  78. // Constructor/destructor
  79. //=======================
  80. CWin32_TerminalService( LPCWSTR lpwszName, LPCWSTR lpwszNameSpace );
  81. virtual ~CWin32_TerminalService();
  82. protected:
  83. // Reading Functions
  84. //============================
  85. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  86. virtual HRESULT GetObject(CInstance *pInstance, long lFlags, CFrameworkQuery &Query);
  87. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  88. // Writing Functions
  89. //============================
  90. // TO DO: Declare any additional functions and accessor
  91. // functions for private data used by this class
  92. //===========================================================
  93. HRESULT LoadPropertyValues( CInstance *pInstance, DWORD dwRequiredProperties, WINSTATIONLOADINDICATORDATA LIData);
  94. private:
  95. // All data members for CTerminalWinstation should be included here.
  96. TCHAR m_szTotalSessions[ 64 ];
  97. TCHAR m_szDisconnectedSessions[ 64 ];
  98. TCHAR m_szEstimatedSessionCapacity[ 64 ];
  99. TCHAR m_szResourceConstraint[ 64 ];
  100. TCHAR m_szRawSessionCapacity[ 64 ];
  101. TCHAR m_szName[ 64 ];
  102. TCHAR m_szCaption[ 64 ];
  103. } ;
  104. //=---------
  105. class CWin32_TerminalServiceSetting : public Provider
  106. {
  107. public:
  108. // Constructor/destructor
  109. //=======================
  110. CWin32_TerminalServiceSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  111. virtual ~CWin32_TerminalServiceSetting();
  112. protected:
  113. // Reading Functions
  114. //============================
  115. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  116. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  117. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  118. // Writing Functions
  119. //============================
  120. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  121. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  122. // Other Functions
  123. virtual HRESULT ExecMethod(const CInstance& Instance,
  124. const BSTR bstrMethodName,
  125. CInstance *pInParams,
  126. CInstance *pOutParams,
  127. long lFlags = 0L );
  128. HRESULT LoadPropertyValues( CInstance *pInstance, DWORD dwRequiredProperties);
  129. // TO DO: Declare any additional functions and accessor
  130. // functions for private data used by this class
  131. //===========================================================
  132. private:
  133. // All data members for CTerminalWinstation should be included here.
  134. // BOOL m_bInitialized;
  135. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  136. ISettingsComp *m_pSettings;
  137. POLICY_TS_MACHINE m_gpPolicy;
  138. TCHAR m_szServerName[ 64 ];
  139. TCHAR m_szMode[ 64 ];
  140. TCHAR m_szLicensingName[ 64 ];
  141. TCHAR m_szLicensingDescription[ 512 ];
  142. TCHAR m_szActiveDesktop[ 64 ];
  143. TCHAR m_szUserPerm[ 64 ];
  144. TCHAR m_szDeleteTempFolders[ 64 ];
  145. TCHAR m_szUseTempFolders[ 64 ];
  146. TCHAR m_szLogons[ 64 ];
  147. TCHAR m_szHelp[ 64 ];
  148. TCHAR m_szPropertyName[ 64 ];
  149. TCHAR m_szValue[ 64 ];
  150. TCHAR m_szChangeMode[ 64 ];
  151. TCHAR m_szSetPolicyPropertyName[ 64 ];
  152. TCHAR m_szLicensingType[ 64 ];
  153. TCHAR m_szAllowTSConnections[ 64 ];
  154. TCHAR m_szSetAllowTSConnections[ 64 ];
  155. TCHAR m_szSingleSession[ 64 ];
  156. TCHAR m_szSetSingleSession[ 64 ];
  157. TCHAR m_szProfilePath[ 64 ];
  158. TCHAR m_szHomeDirectory[ 64 ];
  159. TCHAR m_szSetProfilePath[ 64 ];
  160. TCHAR m_szSetHomeDirectory[ 64 ];
  161. TCHAR m_szAddDirectConnectLicenseServer[ 64 ];
  162. TCHAR m_szDeleteDirectConnectLicenseServer[ 64 ];
  163. TCHAR m_szLicenseServerName[ 64 ];
  164. TCHAR m_szDirectConnectLicenseServers[ 64 ];
  165. } ;
  166. //=---------
  167. class CWin32_TSSessionDirectory : public Provider
  168. {
  169. public:
  170. // Constructor/destructor
  171. //=======================
  172. CWin32_TSSessionDirectory(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  173. virtual ~CWin32_TSSessionDirectory();
  174. protected:
  175. // Reading Functions
  176. //============================
  177. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  178. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  179. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  180. // Writing Functions
  181. //============================
  182. // virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  183. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  184. // Other Functions
  185. virtual HRESULT ExecMethod(const CInstance& Instance,
  186. const BSTR bstrMethodName,
  187. CInstance *pInParams,
  188. CInstance *pOutParams,
  189. long lFlags = 0L );
  190. HRESULT LoadPropertyValues( CInstance *pInstance, DWORD dwRequiredProperties);
  191. // TO DO: Declare any additional functions and accessor
  192. // functions for private data used by this class
  193. //===========================================================
  194. private:
  195. // All data members for CTerminalWinstation should be included here.
  196. // BOOL m_bInitialized;
  197. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  198. // ADOConnection *m_pConnection;
  199. POLICY_TS_MACHINE m_gpPolicy;
  200. TCHAR m_szMode[ 64 ];
  201. TCHAR m_szSessionDirectoryActive[ 64 ];
  202. TCHAR m_szSessionDirectoryLocation[ 64 ];
  203. TCHAR m_szSessionDirectoryClusterName[ 64 ];
  204. TCHAR m_szSessionDirectoryExposeServerIP[ 64 ];
  205. // TCHAR m_szSessionDirectoryAdditionalParams[ 64 ];
  206. TCHAR m_szSetSessionDirectoryProperty[ 64 ];
  207. TCHAR m_szSetSessionDirectoryActive[ 64 ];
  208. TCHAR m_szSetSessionDirectoryExposeServerIP[ 64 ];
  209. TCHAR m_szPropertyName[ 64 ];
  210. TCHAR m_szValue[ 64 ];
  211. } ;
  212. //-----------------------Changed--------------------------
  213. // struct to hold instance information
  214. #endif