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.

741 lines
14 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. STDCLASS.CPP
  5. Abstract:
  6. Class definitions for standard system classes.
  7. History:
  8. raymcc 18-Jul-96 Created.
  9. --*/
  10. #ifndef _STDCLASS_H_
  11. #define _STDCLASS_H_
  12. #include <WbemUtil.h>
  13. #include <FastAll.h>
  14. #include <Sync.h>
  15. #include <statsync.h>
  16. class Registry;
  17. class CSystemClass : public CWbemClass
  18. {
  19. public:
  20. CSystemClass(){}
  21. void Init();
  22. };
  23. class CGenericClass : public CWbemClass
  24. {
  25. public:
  26. CGenericClass(){}
  27. void Init();
  28. };
  29. class CNotifyStatusClass : public CWbemClass
  30. {
  31. public:
  32. CNotifyStatusClass(){}
  33. void Init();
  34. };
  35. class CNamespaceClass : public CWbemClass
  36. {
  37. public:
  38. CNamespaceClass(){}
  39. void Init();
  40. };
  41. class CThisNamespaceClass : public CWbemClass
  42. {
  43. public:
  44. CThisNamespaceClass(){}
  45. void Init();
  46. };
  47. class CNamespace: public CWbemInstance
  48. {
  49. private:
  50. static CNamespaceClass* mstatic_pClass;
  51. static CStaticCritSec mstatic_cs;
  52. class __CleanUp
  53. {
  54. public:
  55. __CleanUp() {}
  56. ~__CleanUp() { delete CNamespace::mstatic_pClass; }
  57. };
  58. static __CleanUp cleanup;
  59. friend __CleanUp;
  60. public:
  61. void Init(LPWSTR pName);
  62. };
  63. class CThisNamespaceInstance : public CWbemInstance
  64. {
  65. public:
  66. CThisNamespaceInstance(){}
  67. void Init(CThisNamespaceClass* pClass);
  68. };
  69. class CProviderClass : public CWbemClass
  70. {
  71. public:
  72. CProviderClass(){}
  73. void Init();
  74. };
  75. class CWin32ProviderClass : public CWbemClass
  76. {
  77. public:
  78. CWin32ProviderClass(){}
  79. void Init();
  80. };
  81. class CProviderRegistrationClass : public CWbemClass
  82. {
  83. public:
  84. CProviderRegistrationClass(){}
  85. void Init();
  86. };
  87. class CObjectProviderRegistrationClass : public CWbemClass
  88. {
  89. public:
  90. CObjectProviderRegistrationClass(){}
  91. void Init();
  92. };
  93. class CClassProviderRegistrationClass : public CWbemClass
  94. {
  95. public:
  96. CClassProviderRegistrationClass(){}
  97. void Init();
  98. };
  99. class CInstanceProviderRegistrationClass : public CWbemClass
  100. {
  101. public:
  102. CInstanceProviderRegistrationClass(){}
  103. void Init();
  104. };
  105. class CPropertyProviderRegistrationClass : public CWbemClass
  106. {
  107. public:
  108. CPropertyProviderRegistrationClass(){}
  109. void Init();
  110. };
  111. class CMethodProviderRegistrationClass : public CWbemClass
  112. {
  113. public:
  114. CMethodProviderRegistrationClass(){}
  115. void Init();
  116. };
  117. class CEventProviderRegistrationClass : public CWbemClass
  118. {
  119. public:
  120. CEventProviderRegistrationClass(){}
  121. void Init();
  122. };
  123. class CEventConsumerProviderRegistrationClass : public CWbemClass
  124. {
  125. public:
  126. CEventConsumerProviderRegistrationClass(){}
  127. void Init();
  128. };
  129. class CCIMOMIdentificationClass : public CWbemClass
  130. {
  131. public:
  132. CCIMOMIdentificationClass(){}
  133. void Init();
  134. private:
  135. void SetPropFromReg(Registry * pReg, TCHAR * pcRegName, WCHAR * pwcPropName);
  136. };
  137. // __AdapStatus
  138. class CAdapStatusClass : public CWbemClass
  139. {
  140. public:
  141. CAdapStatusClass(){};
  142. void Init();
  143. };
  144. class CAdapStatusInstance : public CWbemInstance
  145. {
  146. public:
  147. CAdapStatusInstance(){}
  148. void Init(CAdapStatusClass * pClass);
  149. };
  150. //__CIMOMIdentification
  151. class CIdentificationClass : public CWbemClass
  152. {
  153. public:
  154. CIdentificationClass(){};
  155. void Init();
  156. };
  157. class CIdentificationInstance : public CWbemInstance
  158. {
  159. public:
  160. CIdentificationInstance(){}
  161. void Init(CIdentificationClass * pClass);
  162. };
  163. class CCacheControlClass : public CWbemClass
  164. {
  165. public:
  166. CCacheControlClass(){}
  167. void Init();
  168. };
  169. class CSpecificCacheControlClass : public CWbemClass
  170. {
  171. public:
  172. CSpecificCacheControlClass(){}
  173. void Init(LPCWSTR wszClassName);
  174. };
  175. class CCacheControlInstance : public CWbemInstance
  176. {
  177. public:
  178. CCacheControlInstance(){}
  179. void Init(CSpecificCacheControlClass* pClass, DWORD dwSeconds);
  180. };
  181. class CActiveNamespacesClass : public CWbemClass
  182. {
  183. public:
  184. CActiveNamespacesClass(){}
  185. void Init();
  186. };
  187. //*****************************************************************************
  188. class CIndicationRelatedClass : public CWbemClass
  189. {
  190. public:
  191. CIndicationRelatedClass(){}
  192. void Init();
  193. };
  194. class CEventClass : public CWbemClass
  195. {
  196. public:
  197. CEventClass(){}
  198. void Init();
  199. };
  200. class CParametersClass : public CWbemClass
  201. {
  202. public:
  203. CParametersClass(){}
  204. void Init();
  205. };
  206. class CEmptyEventClass : public CWbemClass
  207. {
  208. public:
  209. CEmptyEventClass(){}
  210. void Init(LPWSTR wszName);
  211. };
  212. class CGenericDataEventClass : public CWbemClass
  213. {
  214. public:
  215. CGenericDataEventClass() {}
  216. void Init(LPWSTR wszCimType, LPWSTR wszPropName);
  217. };
  218. class CDataEventClass : public CWbemClass
  219. {
  220. public:
  221. enum {include_new = 1, include_old = 2,
  222. type_create = include_new,
  223. type_delete = include_old,
  224. type_change = include_new | include_old
  225. };
  226. CDataEventClass(){}
  227. void Init(CWbemClass& Parent,
  228. LPWSTR wszCimType, LPWSTR wszPropName, int nFlags);
  229. };
  230. class CNamespaceEventClass : public CDataEventClass
  231. {
  232. public:
  233. CNamespaceEventClass(){}
  234. void Init(CWbemClass& Parent, int nFlags)
  235. {
  236. CDataEventClass::Init(Parent, L"object:__Namespace", L"Namespace",
  237. nFlags);
  238. }
  239. };
  240. class CClassEventClass : public CDataEventClass
  241. {
  242. public:
  243. CClassEventClass(){}
  244. void Init(CWbemClass& Parent, int nFlags)
  245. {
  246. CDataEventClass::Init(Parent, L"object", L"Class", nFlags);
  247. }
  248. };
  249. class CInstanceEventClass : public CDataEventClass
  250. {
  251. public:
  252. CInstanceEventClass(){}
  253. void Init(CWbemClass& Parent, int nFlags)
  254. {
  255. CDataEventClass::Init(Parent, L"object", L"Instance", nFlags);
  256. }
  257. };
  258. class CMethodEventClass : public CWbemClass
  259. {
  260. public:
  261. void Init();
  262. };
  263. class CTimerEventClass : public CWbemClass
  264. {
  265. public:
  266. CTimerEventClass(){}
  267. void Init();
  268. };
  269. class CAggregateEventClass : public CWbemClass
  270. {
  271. public:
  272. CAggregateEventClass(){}
  273. void Init();
  274. };
  275. class CSystemEventClass : public CWbemClass
  276. {
  277. public:
  278. void Init();
  279. };
  280. class CEventDroppedEventClass : public CWbemClass
  281. {
  282. public:
  283. void Init();
  284. };
  285. class CQueueOverflowEventClass : public CWbemClass
  286. {
  287. public:
  288. void Init();
  289. };
  290. class CConsumerFailureEventClass : public CWbemClass
  291. {
  292. public:
  293. void Init();
  294. };
  295. class CQoSFailureEventClass : public CWbemClass
  296. {
  297. public:
  298. void Init();
  299. };
  300. class CMonitorEventClass : public CWbemClass
  301. {
  302. public:
  303. void Init(CWbemClass& Parent, LPCWSTR wszClassName);
  304. };
  305. class CMonitorDataEventClass : public CWbemClass
  306. {
  307. public:
  308. void Init(CWbemClass& Parent, LPCWSTR wszClassName);
  309. };
  310. //*****************************************************************************
  311. class CEventConsumerClass : public CWbemClass
  312. {
  313. public:
  314. CEventConsumerClass(){}
  315. void Init();
  316. };
  317. //*****************************************************************************
  318. class CConditionalInstructionClass : public CWbemClass
  319. {
  320. public:
  321. void Init();
  322. };
  323. //*****************************************************************************
  324. class CEventMonitorClass : public CWbemClass
  325. {
  326. public:
  327. void Init();
  328. };
  329. //*****************************************************************************
  330. class CEventFilterClass : public CWbemClass
  331. {
  332. public:
  333. CEventFilterClass(){}
  334. void Init();
  335. };
  336. //*****************************************************************************
  337. class CFilterConsumerBindingClass : public CWbemClass
  338. {
  339. public:
  340. CFilterConsumerBindingClass(){}
  341. void Init();
  342. };
  343. //*****************************************************************************
  344. class CEventGeneratorClass : public CWbemClass
  345. {
  346. public:
  347. CEventGeneratorClass(){}
  348. void Init();
  349. };
  350. class CTimerInstructionClass : public CWbemClass
  351. {
  352. public:
  353. CTimerInstructionClass(){}
  354. void Init();
  355. };
  356. class CAbsoluteTimerInstructionClass : public CWbemClass
  357. {
  358. public:
  359. CAbsoluteTimerInstructionClass(){}
  360. void Init();
  361. };
  362. class CIntervalTimerInstructionClass : public CWbemClass
  363. {
  364. public:
  365. CIntervalTimerInstructionClass(){}
  366. void Init();
  367. };
  368. class CTimerNextFiringClass : public CWbemClass
  369. {
  370. public:
  371. CTimerNextFiringClass(){}
  372. void Init();
  373. };
  374. //*****************************************************************************
  375. class CSecurityBaseClass : public CWbemClass
  376. {
  377. public:
  378. CSecurityBaseClass(){}
  379. void Init();
  380. };
  381. class CSubjectClass : public CWbemClass
  382. {
  383. public:
  384. CSubjectClass(){}
  385. void Init();
  386. };
  387. class CUserClass : public CWbemClass
  388. {
  389. public:
  390. CUserClass(){}
  391. void Init();
  392. };
  393. class CNTLMUserClass : public CWbemClass
  394. {
  395. public:
  396. CNTLMUserClass(){}
  397. void Init();
  398. };
  399. class CNTLM9XUserClass : public CWbemClass
  400. {
  401. public:
  402. CNTLM9XUserClass(){}
  403. void Init();
  404. };
  405. class CGroupClass : public CWbemClass
  406. {
  407. public:
  408. CGroupClass(){}
  409. void Init();
  410. };
  411. class CNtlmGroupClass : public CGroupClass
  412. {
  413. public:
  414. CNtlmGroupClass(){}
  415. void Init();
  416. };
  417. class CSystemConfigClass : public CWbemClass
  418. {
  419. public:
  420. CSystemConfigClass(){}
  421. void Init();
  422. void AddStaticQual(LPWSTR pMethodName);
  423. };
  424. class CSystemConfigInstance : public CWbemInstance
  425. {
  426. public:
  427. CSystemConfigInstance(){}
  428. void Init(CSystemConfigClass* pClass);
  429. };
  430. //*****************************************************************************
  431. class CErrorObjectClass : public CWbemClass
  432. {
  433. public:
  434. CErrorObjectClass(){}
  435. void Init();
  436. };
  437. class CErrorObject
  438. {
  439. protected:
  440. static CErrorObjectClass* mstatic_pClass;
  441. static CStaticCritSec mstatic_cs;
  442. class __CleanUp
  443. {
  444. public:
  445. __CleanUp() {}
  446. ~__CleanUp() { delete CErrorObject::mstatic_pClass; }
  447. };
  448. static __CleanUp cleanup;
  449. friend __CleanUp;
  450. CWbemInstance* m_pObject;
  451. public:
  452. CErrorObject(ADDREF IWbemClassObject* pObject = NULL);
  453. ~CErrorObject();
  454. BOOL SetStatusCode(SCODE sRes);
  455. BOOL SetOperation(COPY LPWSTR wszOperation);
  456. BOOL SetParamInformation(COPY LPWSTR wszExtraInfo);
  457. BOOL SetProviderName(COPY LPWSTR wszName);
  458. BOOL MarkAsInternal();
  459. BOOL ContainsStatusCode();
  460. BOOL ContainsOperationInfo();
  461. RELEASE_ME IWbemClassObject* GetObject();
  462. };
  463. //*****************************************************************************
  464. /*
  465. class CNamespaceMapClass : public CWbemClass
  466. {
  467. public:
  468. CNamespaceMapClass(){}
  469. void Init();
  470. };
  471. */
  472. /* The following system classes are removed for Whistler; may be reintroduced
  473. for Blackcomb.
  474. class CClassInstanceSecurity: public CWbemClass
  475. {
  476. public:
  477. CClassInstanceSecurity(){};
  478. void Init();
  479. };
  480. class CClassSecurity: public CWbemClass
  481. {
  482. public:
  483. CClassSecurity(){};
  484. void Init();
  485. };
  486. //*****************************************************************************
  487. class CClassVectorClass : public CWbemClass
  488. {
  489. public:
  490. CClassVectorClass(){}
  491. void Init();
  492. };
  493. class CUncommittedEventClass : public CWbemClass
  494. {
  495. public:
  496. CUncommittedEventClass() {};
  497. void Init();
  498. };
  499. class CTransactionClass : public CWbemClass
  500. {
  501. public:
  502. CTransactionClass() {};
  503. void Init();
  504. };
  505. //*****************************************************************************
  506. class CComTaxonomyClass : public CWbemClass
  507. {
  508. public:
  509. CComTaxonomyClass(){}
  510. void Init();
  511. };
  512. //*****************************************************************************
  513. class CComInterfaceSetClass : public CWbemClass
  514. {
  515. public:
  516. CComInterfaceSetClass(){}
  517. void Init();
  518. };
  519. //*****************************************************************************
  520. class CComDispatchElementClass : public CWbemClass
  521. {
  522. public:
  523. CComDispatchElementClass(){}
  524. void Init();
  525. };
  526. //*****************************************************************************
  527. class CComDispatchInfoClass : public CWbemClass
  528. {
  529. public:
  530. CComDispatchInfoClass(){}
  531. void Init();
  532. };
  533. //*****************************************************************************
  534. class CComBindingClass : public CWbemClass
  535. {
  536. public:
  537. CComBindingClass(){}
  538. void Init();
  539. };
  540. //*****************************************************************************
  541. class CComInterfaceSetBindingClass : public CWbemClass
  542. {
  543. public:
  544. CComInterfaceSetBindingClass(){}
  545. void Init();
  546. };
  547. //*****************************************************************************
  548. class CComDispatchElementBindingClass : public CWbemClass
  549. {
  550. public:
  551. CComDispatchElementBindingClass(){}
  552. void Init();
  553. };
  554. */
  555. //****************************************************************************
  556. class CArbitratorConfiguration : public CWbemClass
  557. {
  558. public:
  559. CArbitratorConfiguration() {};
  560. void Init();
  561. };
  562. class CArbitratorConfigurationInstance : public CWbemInstance
  563. {
  564. public:
  565. CArbitratorConfigurationInstance(){}
  566. void Init(CArbitratorConfiguration* pClass);
  567. };
  568. class CClasses : public CWbemClass
  569. {
  570. public:
  571. CClasses() {};
  572. void Init();
  573. };
  574. /******************************************************************************
  575. *
  576. * Name:
  577. *
  578. *
  579. * Description:
  580. *
  581. *
  582. *****************************************************************************/
  583. class CProviderHostQuotaConfiguration : public CWbemClass
  584. {
  585. public:
  586. CProviderHostQuotaConfiguration() {};
  587. void Init();
  588. };
  589. class CProviderHostQuotaConfigurationInstance : public CWbemInstance
  590. {
  591. public:
  592. CProviderHostQuotaConfigurationInstance(){}
  593. void Init(CProviderHostQuotaConfiguration* pClass);
  594. };
  595. #endif
  596.