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.

347 lines
10 KiB

  1. #ifndef _schema_h_
  2. #define _schema_h_
  3. #include "globalconstants.h"
  4. //
  5. // Forward declarations
  6. //
  7. struct METABASE_KEYTYPE;
  8. struct METABASE_KEYTYPE_NODE;
  9. //
  10. // DataTypes
  11. //
  12. struct METABASE_KEYTYPE
  13. {
  14. //
  15. // Not populated automatically for static data
  16. //
  17. LPWSTR m_pszName;
  18. //
  19. // This is the list of keytypes that can contain this keytype
  20. // (the opposite of the container class list)
  21. //
  22. // Populated automatically even for static data
  23. //
  24. METABASE_KEYTYPE_NODE* m_pKtListInverseCCL;
  25. //
  26. // Not populated automatically for static data
  27. //
  28. LPCWSTR m_pszDisallowDeletionNode;
  29. };
  30. struct METABASE_KEYTYPE_NODE
  31. {
  32. const METABASE_KEYTYPE* m_pKt;
  33. METABASE_KEYTYPE_NODE* m_pKtNext;
  34. };
  35. struct WMI_METHOD_PARAM
  36. {
  37. LPWSTR pszParamName;
  38. CIMTYPE type;
  39. ULONG iInOut;
  40. };
  41. struct WMI_METHOD
  42. {
  43. LPWSTR pszMethodName;
  44. DWORD dwMDId;
  45. LPWSTR pszRetType;
  46. WMI_METHOD_PARAM** ppParams;
  47. LPWSTR pszDescription;
  48. };
  49. struct METABASE_PROPERTY
  50. {
  51. LPWSTR pszPropName;
  52. DWORD dwMDIdentifier;
  53. DWORD dwMDUserType;
  54. DWORD dwMDDataType;
  55. DWORD dwMDMask; // if this is set to all bits on, it means this is bool, but not part of a flag.
  56. DWORD dwMDAttributes;
  57. BOOL fReadOnly;
  58. // if DWORD_METADATA, pDefaultValue points to the above dwDefaultValue.
  59. // otherwise it points to memory in pool.
  60. LPVOID pDefaultValue;
  61. // used for DWORD_METADATA
  62. DWORD dwDefaultValue;
  63. };
  64. struct WMI_CLASS
  65. {
  66. LPWSTR pszClassName;
  67. LPWSTR pszMetabaseKey;
  68. LPWSTR pszKeyName;
  69. METABASE_PROPERTY** ppmbp;
  70. METABASE_KEYTYPE* pkt;
  71. WMI_METHOD** ppMethod;
  72. DWORD dwExtended;
  73. // This is only set for hardcoded wmi classes. Otherwise, the defaults
  74. // at the top of this file are used.
  75. LPWSTR pszParentClass;
  76. //
  77. // Whether we let users create instances of this class.
  78. // Some examples where this is false are IIsFtpService, IIsWebService, etc.
  79. //
  80. bool bCreateAllowed;
  81. // This pointer is only valid during initialization time.
  82. // It points to mbschema.bin
  83. LPWSTR pszDescription;
  84. };
  85. struct WMI_ASSOCIATION_TYPE
  86. {
  87. LPWSTR pszLeft;
  88. LPWSTR pszRight;
  89. LPWSTR pszParent;
  90. LPWSTR pszExtParent;
  91. };
  92. struct WMI_ASSOCIATION
  93. {
  94. LPWSTR pszAssociationName;
  95. WMI_CLASS* pcLeft;
  96. WMI_CLASS* pcRight;
  97. WMI_ASSOCIATION_TYPE *pType;
  98. DWORD fFlags;
  99. DWORD dwExtended;
  100. LPWSTR pszParentClass;
  101. };
  102. //
  103. // Hardcoded Data
  104. //
  105. struct METABASE_KEYTYPE_DATA
  106. {
  107. static METABASE_KEYTYPE s_IIsApplicationPool;
  108. static METABASE_KEYTYPE s_IIsApplicationPools;
  109. static METABASE_KEYTYPE s_IIsCertMapper;
  110. static METABASE_KEYTYPE s_IIsCompressionScheme;
  111. static METABASE_KEYTYPE s_IIsCompressionSchemes;
  112. static METABASE_KEYTYPE s_IIsComputer;
  113. static METABASE_KEYTYPE s_IIsCustomLogModule;
  114. static METABASE_KEYTYPE s_IIsFilter;
  115. static METABASE_KEYTYPE s_IIsFilters;
  116. static METABASE_KEYTYPE s_IIsFtpInfo;
  117. static METABASE_KEYTYPE s_IIsFtpServer;
  118. static METABASE_KEYTYPE s_IIsFtpService;
  119. static METABASE_KEYTYPE s_IIsFtpVirtualDir;
  120. static METABASE_KEYTYPE s_IIsImapInfo;
  121. static METABASE_KEYTYPE s_IIsImapService;
  122. static METABASE_KEYTYPE s_IIsLogModule;
  123. static METABASE_KEYTYPE s_IIsLogModules;
  124. static METABASE_KEYTYPE s_IIsMimeMap;
  125. static METABASE_KEYTYPE s_IIsNntpInfo;
  126. static METABASE_KEYTYPE s_IIsNntpService;
  127. static METABASE_KEYTYPE s_IIsObject;
  128. static METABASE_KEYTYPE s_IIsPop3Info;
  129. static METABASE_KEYTYPE s_IIsPop3Service;
  130. static METABASE_KEYTYPE s_IIsSmtpInfo;
  131. static METABASE_KEYTYPE s_IIsSmtpService;
  132. static METABASE_KEYTYPE s_IIsWebDirectory;
  133. static METABASE_KEYTYPE s_IIsWebFile;
  134. static METABASE_KEYTYPE s_IIsWebInfo;
  135. static METABASE_KEYTYPE s_IIsWebServer;
  136. static METABASE_KEYTYPE s_IIsWebService;
  137. static METABASE_KEYTYPE s_IIsWebVirtualDir;
  138. static METABASE_KEYTYPE s_TYPE_AdminACL;
  139. static METABASE_KEYTYPE s_TYPE_AdminACE;
  140. static METABASE_KEYTYPE s_TYPE_IPSecurity;
  141. static METABASE_KEYTYPE s_NO_TYPE;
  142. static METABASE_KEYTYPE* s_MetabaseKeyTypes[];
  143. };
  144. struct METABASE_PROPERTY_DATA
  145. {
  146. static METABASE_PROPERTY s_KeyType;
  147. static METABASE_PROPERTY s_ServerComment;
  148. static METABASE_PROPERTY s_ServerBindings;
  149. static METABASE_PROPERTY s_Path;
  150. static METABASE_PROPERTY s_AppRoot;
  151. static METABASE_PROPERTY* s_MetabaseProperties[];
  152. };
  153. struct WMI_METHOD_PARAM_DATA
  154. {
  155. static WMI_METHOD_PARAM s_Applications;
  156. static WMI_METHOD_PARAM s_AppMode;
  157. static WMI_METHOD_PARAM s_BackupDateTimeOut;
  158. static WMI_METHOD_PARAM s_BackupFlags;
  159. static WMI_METHOD_PARAM s_BackupLocation;
  160. static WMI_METHOD_PARAM s_BackupLocation_io;
  161. static WMI_METHOD_PARAM s_BackupVersion;
  162. static WMI_METHOD_PARAM s_BackupVersionOut;
  163. static WMI_METHOD_PARAM s_DestPath;
  164. static WMI_METHOD_PARAM s_EnumIndex;
  165. static WMI_METHOD_PARAM s_FileName;
  166. static WMI_METHOD_PARAM s_HistoryTime;
  167. static WMI_METHOD_PARAM s_IEnabled;
  168. static WMI_METHOD_PARAM s_IEnabled_o;
  169. static WMI_METHOD_PARAM s_IMethod;
  170. static WMI_METHOD_PARAM s_IndexIn;
  171. static WMI_METHOD_PARAM s_InProcFlag;
  172. static WMI_METHOD_PARAM s_AppPoolName;
  173. static WMI_METHOD_PARAM s_bCreate;
  174. static WMI_METHOD_PARAM s_MajorVersion;
  175. static WMI_METHOD_PARAM s_MajorVersion_o;
  176. static WMI_METHOD_PARAM s_MDFlags;
  177. static WMI_METHOD_PARAM s_MDHistoryLocation;
  178. static WMI_METHOD_PARAM s_MDHistoryLocation_io;
  179. static WMI_METHOD_PARAM s_MinorVersion;
  180. static WMI_METHOD_PARAM s_MinorVersion_o;
  181. static WMI_METHOD_PARAM s_NtAcct;
  182. static WMI_METHOD_PARAM s_NtAcct_o;
  183. static WMI_METHOD_PARAM s_NtPwd;
  184. static WMI_METHOD_PARAM s_NtPwd_o;
  185. static WMI_METHOD_PARAM s_Password;
  186. static WMI_METHOD_PARAM s_Passwd;
  187. static WMI_METHOD_PARAM s_PathOfRootVirtualDir;
  188. static WMI_METHOD_PARAM s_Recursive;
  189. static WMI_METHOD_PARAM s_ServerComment;
  190. static WMI_METHOD_PARAM s_ServerBindings;
  191. static WMI_METHOD_PARAM s_ServerId;
  192. static WMI_METHOD_PARAM s_ServerMode;
  193. static WMI_METHOD_PARAM s_SourcePath;
  194. static WMI_METHOD_PARAM s_strName;
  195. static WMI_METHOD_PARAM s_strName_o;
  196. static WMI_METHOD_PARAM s_vCert;
  197. static WMI_METHOD_PARAM s_vCert_o;
  198. static WMI_METHOD_PARAM s_vKey;
  199. static WMI_METHOD_PARAM* s_ServiceCreateNewServer[];
  200. static WMI_METHOD_PARAM* s_GetCurrentMode[];
  201. static WMI_METHOD_PARAM* s_AppCreate[];
  202. static WMI_METHOD_PARAM* s_AppCreate2[];
  203. static WMI_METHOD_PARAM* s_AppDelete[];
  204. static WMI_METHOD_PARAM* s_AppUnLoad[];
  205. static WMI_METHOD_PARAM* s_AppDisable[];
  206. static WMI_METHOD_PARAM* s_AppEnable[];
  207. static WMI_METHOD_PARAM* s_BackupWithPasswd[];
  208. static WMI_METHOD_PARAM* s_DeleteBackup[];
  209. static WMI_METHOD_PARAM* s_EnumBackups[];
  210. static WMI_METHOD_PARAM* s_RestoreWithPasswd[];
  211. static WMI_METHOD_PARAM* s_Export[];
  212. static WMI_METHOD_PARAM* s_Import[];
  213. static WMI_METHOD_PARAM* s_RestoreHistory[];
  214. static WMI_METHOD_PARAM* s_EnumHistory[];
  215. static WMI_METHOD_PARAM* s_CreateMapping[];
  216. static WMI_METHOD_PARAM* s_DeleteMapping[];
  217. static WMI_METHOD_PARAM* s_GetMapping[];
  218. static WMI_METHOD_PARAM* s_SetAcct[];
  219. static WMI_METHOD_PARAM* s_SetEnabled[];
  220. static WMI_METHOD_PARAM* s_SetName[];
  221. static WMI_METHOD_PARAM* s_SetPwd[];
  222. static WMI_METHOD_PARAM* s_EnumAppsInPool[];
  223. };
  224. struct WMI_METHOD_DATA
  225. {
  226. static WMI_METHOD s_ServiceCreateNewServer;
  227. static WMI_METHOD s_GetCurrentMode;
  228. static WMI_METHOD s_ServerStart;
  229. static WMI_METHOD s_ServerStop;
  230. static WMI_METHOD s_ServerContinue;
  231. static WMI_METHOD s_ServerPause;
  232. static WMI_METHOD s_AppCreate;
  233. static WMI_METHOD s_AppCreate2;
  234. static WMI_METHOD s_AppDelete;
  235. static WMI_METHOD s_AppUnLoad;
  236. static WMI_METHOD s_AppDisable;
  237. static WMI_METHOD s_AppEnable;
  238. static WMI_METHOD s_AppGetStatus;
  239. static WMI_METHOD s_AspAppRestart;
  240. static WMI_METHOD s_SaveData;
  241. static WMI_METHOD s_BackupWithPasswd;
  242. static WMI_METHOD s_DeleteBackup;
  243. static WMI_METHOD s_EnumBackups;
  244. static WMI_METHOD s_RestoreWithPasswd;
  245. static WMI_METHOD s_Export;
  246. static WMI_METHOD s_Import;
  247. static WMI_METHOD s_RestoreHistory;
  248. static WMI_METHOD s_EnumHistory;
  249. static WMI_METHOD s_CreateMapping;
  250. static WMI_METHOD s_DeleteMapping;
  251. static WMI_METHOD s_GetMapping;
  252. static WMI_METHOD s_SetAcct;
  253. static WMI_METHOD s_SetEnabled;
  254. static WMI_METHOD s_SetName;
  255. static WMI_METHOD s_SetPwd;
  256. static WMI_METHOD s_EnumAppsInPool;
  257. static WMI_METHOD s_RecycleAppPool;
  258. static WMI_METHOD s_Start;
  259. static WMI_METHOD s_Stop;
  260. static WMI_METHOD* s_WebServiceMethods[];
  261. static WMI_METHOD* s_ServiceMethods[];
  262. static WMI_METHOD* s_ServerMethods[];
  263. static WMI_METHOD* s_WebAppMethods[];
  264. static WMI_METHOD* s_ComputerMethods[];
  265. static WMI_METHOD* s_CertMapperMethods[];
  266. static WMI_METHOD* s_AppPoolMethods[];
  267. };
  268. struct WMI_CLASS_DATA
  269. {
  270. static WMI_CLASS s_Computer;
  271. static WMI_CLASS s_ComputerSetting;
  272. static WMI_CLASS s_FtpService;
  273. static WMI_CLASS s_FtpServer;
  274. static WMI_CLASS s_FtpVirtualDir;
  275. static WMI_CLASS s_WebService;
  276. static WMI_CLASS s_WebFilter;
  277. static WMI_CLASS s_WebServer;
  278. static WMI_CLASS s_WebCertMapper;
  279. static WMI_CLASS s_WebVirtualDir;
  280. static WMI_CLASS s_WebDirectory;
  281. static WMI_CLASS s_WebFile;
  282. static WMI_CLASS s_ApplicationPool;
  283. static WMI_CLASS s_AdminACL;
  284. static WMI_CLASS s_ACE;
  285. static WMI_CLASS s_IPSecurity;
  286. static WMI_CLASS* s_WmiClasses[];
  287. };
  288. struct WMI_ASSOCIATION_TYPE_DATA
  289. {
  290. static WMI_ASSOCIATION_TYPE s_ElementSetting;
  291. static WMI_ASSOCIATION_TYPE s_Component;
  292. static WMI_ASSOCIATION_TYPE s_AdminACL;
  293. static WMI_ASSOCIATION_TYPE s_IPSecurity;
  294. };
  295. struct WMI_ASSOCIATION_DATA
  296. {
  297. static WMI_ASSOCIATION s_AdminACLToACE;
  298. static WMI_ASSOCIATION* s_WmiAssociations[];
  299. };
  300. #endif