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.

386 lines
12 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. CIMTYPE typeRetVal;
  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_ApplicationDependencies;
  150. static METABASE_PROPERTY s_WebSvcExtRestrictionList;
  151. static METABASE_PROPERTY s_Path;
  152. static METABASE_PROPERTY s_AppRoot;
  153. static METABASE_PROPERTY* s_MetabaseProperties[];
  154. };
  155. struct WMI_METHOD_PARAM_DATA
  156. {
  157. static WMI_METHOD_PARAM s_Description;
  158. static WMI_METHOD_PARAM s_bEnable;
  159. static WMI_METHOD_PARAM s_bCanDelete;
  160. static WMI_METHOD_PARAM s_Extension;
  161. static WMI_METHOD_PARAM s_Extensions;
  162. static WMI_METHOD_PARAM s_ExtensionFile;
  163. static WMI_METHOD_PARAM s_ExtensionFiles;
  164. static WMI_METHOD_PARAM s_Application;
  165. static WMI_METHOD_PARAM s_Applications;
  166. static WMI_METHOD_PARAM s_AppMode;
  167. static WMI_METHOD_PARAM s_BackupDateTimeOut;
  168. static WMI_METHOD_PARAM s_BackupFlags;
  169. static WMI_METHOD_PARAM s_BackupLocation;
  170. static WMI_METHOD_PARAM s_BackupLocation_io;
  171. static WMI_METHOD_PARAM s_BackupVersion;
  172. static WMI_METHOD_PARAM s_BackupVersionOut;
  173. static WMI_METHOD_PARAM s_DestPath;
  174. static WMI_METHOD_PARAM s_GroupID;
  175. static WMI_METHOD_PARAM s_EnumIndex;
  176. static WMI_METHOD_PARAM s_FileName;
  177. static WMI_METHOD_PARAM s_HistoryTime;
  178. static WMI_METHOD_PARAM s_IEnabled;
  179. static WMI_METHOD_PARAM s_IEnabled_o;
  180. static WMI_METHOD_PARAM s_IMethod;
  181. static WMI_METHOD_PARAM s_IndexIn;
  182. static WMI_METHOD_PARAM s_InProcFlag;
  183. static WMI_METHOD_PARAM s_AppPoolName;
  184. static WMI_METHOD_PARAM s_bCreate;
  185. static WMI_METHOD_PARAM s_MajorVersion;
  186. static WMI_METHOD_PARAM s_MajorVersion_o;
  187. static WMI_METHOD_PARAM s_MDFlags;
  188. static WMI_METHOD_PARAM s_MDHistoryLocation;
  189. static WMI_METHOD_PARAM s_MDHistoryLocation_io;
  190. static WMI_METHOD_PARAM s_MinorVersion;
  191. static WMI_METHOD_PARAM s_MinorVersion_o;
  192. static WMI_METHOD_PARAM s_NtAcct;
  193. static WMI_METHOD_PARAM s_NtAcct_o;
  194. static WMI_METHOD_PARAM s_NtPwd;
  195. static WMI_METHOD_PARAM s_NtPwd_o;
  196. static WMI_METHOD_PARAM s_Password;
  197. static WMI_METHOD_PARAM s_Passwd;
  198. static WMI_METHOD_PARAM s_PathOfRootVirtualDir;
  199. static WMI_METHOD_PARAM s_Recursive;
  200. static WMI_METHOD_PARAM s_ServerComment;
  201. static WMI_METHOD_PARAM s_ServerBindings;
  202. static WMI_METHOD_PARAM s_ServerId;
  203. static WMI_METHOD_PARAM s_SourcePath;
  204. static WMI_METHOD_PARAM s_strName;
  205. static WMI_METHOD_PARAM s_strName_o;
  206. static WMI_METHOD_PARAM s_vCert;
  207. static WMI_METHOD_PARAM s_vCert_o;
  208. static WMI_METHOD_PARAM s_vKey;
  209. static WMI_METHOD_PARAM* s_ServiceCreateNewServer[];
  210. static WMI_METHOD_PARAM* s_ServiceEnableApplication[];
  211. static WMI_METHOD_PARAM* s_ServiceRemoveApplication[];
  212. static WMI_METHOD_PARAM* s_ServiceQueryGroupIDStatus[];
  213. static WMI_METHOD_PARAM* s_ServiceListApplications[];
  214. static WMI_METHOD_PARAM* s_ServiceAddDependency[];
  215. static WMI_METHOD_PARAM* s_ServiceRemoveDependency[];
  216. static WMI_METHOD_PARAM* s_ServiceEnableWebServiceExtension[];
  217. static WMI_METHOD_PARAM* s_ServiceDisableWebServiceExtension[];
  218. static WMI_METHOD_PARAM* s_ServiceListWebServiceExtensions[];
  219. static WMI_METHOD_PARAM* s_ServiceEnableExtensionFile[];
  220. static WMI_METHOD_PARAM* s_ServiceDisableExtensionFile[];
  221. static WMI_METHOD_PARAM* s_ServiceAddExtensionFile[];
  222. static WMI_METHOD_PARAM* s_ServiceDeleteExtensionFile[];
  223. static WMI_METHOD_PARAM* s_ServiceListExtensionFiles[];
  224. static WMI_METHOD_PARAM* s_AppCreate[];
  225. static WMI_METHOD_PARAM* s_AppCreate2[];
  226. static WMI_METHOD_PARAM* s_AppCreate3[];
  227. static WMI_METHOD_PARAM* s_AppDelete[];
  228. static WMI_METHOD_PARAM* s_AppUnLoad[];
  229. static WMI_METHOD_PARAM* s_AppDisable[];
  230. static WMI_METHOD_PARAM* s_AppEnable[];
  231. static WMI_METHOD_PARAM* s_BackupWithPasswd[];
  232. static WMI_METHOD_PARAM* s_DeleteBackup[];
  233. static WMI_METHOD_PARAM* s_EnumBackups[];
  234. static WMI_METHOD_PARAM* s_RestoreWithPasswd[];
  235. static WMI_METHOD_PARAM* s_Export[];
  236. static WMI_METHOD_PARAM* s_Import[];
  237. static WMI_METHOD_PARAM* s_RestoreHistory[];
  238. static WMI_METHOD_PARAM* s_EnumHistory[];
  239. static WMI_METHOD_PARAM* s_CreateMapping[];
  240. static WMI_METHOD_PARAM* s_DeleteMapping[];
  241. static WMI_METHOD_PARAM* s_GetMapping[];
  242. static WMI_METHOD_PARAM* s_SetAcct[];
  243. static WMI_METHOD_PARAM* s_SetEnabled[];
  244. static WMI_METHOD_PARAM* s_SetName[];
  245. static WMI_METHOD_PARAM* s_SetPwd[];
  246. static WMI_METHOD_PARAM* s_EnumAppsInPool[];
  247. };
  248. struct WMI_METHOD_DATA
  249. {
  250. static WMI_METHOD s_ServiceEnableApplication;
  251. static WMI_METHOD s_ServiceRemoveApplication;
  252. static WMI_METHOD s_ServiceListApplications;
  253. static WMI_METHOD s_ServiceQueryGroupIDStatus;
  254. static WMI_METHOD s_ServiceAddDependency;
  255. static WMI_METHOD s_ServiceRemoveDependency;
  256. static WMI_METHOD s_ServiceEnableWebServiceExtension;
  257. static WMI_METHOD s_ServiceDisableWebServiceExtension;
  258. static WMI_METHOD s_ServiceListWebServiceExtensions;
  259. static WMI_METHOD s_ServiceEnableExtensionFile;
  260. static WMI_METHOD s_ServiceDisableExtensionFile;
  261. static WMI_METHOD s_ServiceAddExtensionFile;
  262. static WMI_METHOD s_ServiceDeleteExtensionFile;
  263. static WMI_METHOD s_ServiceListExtensionFiles;
  264. static WMI_METHOD s_ServiceCreateNewServer;
  265. static WMI_METHOD s_GetCurrentMode;
  266. static WMI_METHOD s_ServerStart;
  267. static WMI_METHOD s_ServerStop;
  268. static WMI_METHOD s_ServerContinue;
  269. static WMI_METHOD s_ServerPause;
  270. static WMI_METHOD s_AppCreate;
  271. static WMI_METHOD s_AppCreate2;
  272. static WMI_METHOD s_AppCreate3;
  273. static WMI_METHOD s_AppDelete;
  274. static WMI_METHOD s_AppUnLoad;
  275. static WMI_METHOD s_AppDisable;
  276. static WMI_METHOD s_AppEnable;
  277. static WMI_METHOD s_AppGetStatus;
  278. static WMI_METHOD s_AspAppRestart;
  279. static WMI_METHOD s_SaveData;
  280. static WMI_METHOD s_BackupWithPasswd;
  281. static WMI_METHOD s_DeleteBackup;
  282. static WMI_METHOD s_EnumBackups;
  283. static WMI_METHOD s_RestoreWithPasswd;
  284. static WMI_METHOD s_Export;
  285. static WMI_METHOD s_Import;
  286. static WMI_METHOD s_RestoreHistory;
  287. static WMI_METHOD s_EnumHistory;
  288. static WMI_METHOD s_CreateMapping;
  289. static WMI_METHOD s_DeleteMapping;
  290. static WMI_METHOD s_GetMapping;
  291. static WMI_METHOD s_SetAcct;
  292. static WMI_METHOD s_SetEnabled;
  293. static WMI_METHOD s_SetName;
  294. static WMI_METHOD s_SetPwd;
  295. static WMI_METHOD s_EnumAppsInPool;
  296. static WMI_METHOD s_RecycleAppPool;
  297. static WMI_METHOD s_Start;
  298. static WMI_METHOD s_Stop;
  299. static WMI_METHOD* s_WebServiceMethods[];
  300. static WMI_METHOD* s_ServiceMethods[];
  301. static WMI_METHOD* s_ServerMethods[];
  302. static WMI_METHOD* s_WebAppMethods[];
  303. static WMI_METHOD* s_ComputerMethods[];
  304. static WMI_METHOD* s_CertMapperMethods[];
  305. static WMI_METHOD* s_AppPoolMethods[];
  306. };
  307. struct WMI_CLASS_DATA
  308. {
  309. static WMI_CLASS s_Computer;
  310. static WMI_CLASS s_ComputerSetting;
  311. static WMI_CLASS s_FtpService;
  312. static WMI_CLASS s_FtpServer;
  313. static WMI_CLASS s_FtpVirtualDir;
  314. static WMI_CLASS s_WebService;
  315. static WMI_CLASS s_WebFilter;
  316. static WMI_CLASS s_WebServer;
  317. static WMI_CLASS s_WebCertMapper;
  318. static WMI_CLASS s_WebVirtualDir;
  319. static WMI_CLASS s_WebDirectory;
  320. static WMI_CLASS s_WebFile;
  321. static WMI_CLASS s_ApplicationPool;
  322. static WMI_CLASS s_AdminACL;
  323. static WMI_CLASS s_ACE;
  324. static WMI_CLASS s_IPSecurity;
  325. static WMI_CLASS* s_WmiClasses[];
  326. };
  327. struct WMI_ASSOCIATION_TYPE_DATA
  328. {
  329. static WMI_ASSOCIATION_TYPE s_ElementSetting;
  330. static WMI_ASSOCIATION_TYPE s_Component;
  331. static WMI_ASSOCIATION_TYPE s_AdminACL;
  332. static WMI_ASSOCIATION_TYPE s_IPSecurity;
  333. };
  334. struct WMI_ASSOCIATION_DATA
  335. {
  336. static WMI_ASSOCIATION s_AdminACLToACE;
  337. static WMI_ASSOCIATION* s_WmiAssociations[];
  338. };
  339. #endif