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.

665 lines
20 KiB

  1. //
  2. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  3. //
  4. // ***************************************************************************
  5. //
  6. // Original Author: Rajesh Rao
  7. //
  8. // $Author: rajeshr $
  9. // $Date: 6/11/98 4:43p $
  10. // $Workfile:adsiclas.h $
  11. //
  12. // $Modtime: 6/11/98 11:21a $
  13. // $Revision: 1 $
  14. // $Nokeywords: $
  15. //
  16. //
  17. // Description: Contains the declaration for the CADSIClass which encapsulates an ADSI class
  18. //
  19. //***************************************************************************
  20. #ifndef ADSI_CLASS_H
  21. #define ADSI_CLASS_H
  22. class CADSIClass : public CRefCountedObject
  23. {
  24. public:
  25. //***************************************************************************
  26. //
  27. // CADSIClass::CADSIClass
  28. //
  29. // Purpose : Constructor
  30. //
  31. // Parameters:
  32. // lpszWBEMClassName : The WBEM name of the Class being created. A copy of this is made
  33. // lpszADSIClassName : The ADSI name of the Class being created. A copy of this is made
  34. //***************************************************************************
  35. CADSIClass(LPCWSTR lpszWBEMClassName, LPCWSTR lpszADSIClassName);
  36. virtual ~CADSIClass();
  37. //***************************************************************************
  38. //
  39. // CADSIClass :: GetWBEMClassName
  40. //
  41. // Purpose : Returns the WBEM Class name of this Class
  42. //***************************************************************************
  43. LPCWSTR GetWBEMClassName();
  44. //***************************************************************************
  45. //
  46. // CADSIClass :: GetWBEMClassName
  47. //
  48. // Purpose : Sets the WBEM Class name of this Class
  49. //***************************************************************************
  50. void CADSIClass::SetWBEMClassName(LPCWSTR lpszName);
  51. //***************************************************************************
  52. //
  53. // CADSIClass :: GetADSIClassName
  54. //
  55. // Purpose : Returns the ADSI Class name of this Class
  56. //***************************************************************************
  57. LPCWSTR GetADSIClassName();
  58. //***************************************************************************
  59. //
  60. // CADSIClass :: SetADSIClassName
  61. //
  62. // Purpose : Sets the ADSI Class name of this Class
  63. //***************************************************************************
  64. void SetADSIClassName(LPCWSTR lpszName);
  65. //***************************************************************************
  66. //
  67. // CADSIClass :: GetCommonName
  68. //
  69. // Purpose : Returns the CommonName attribute name
  70. //
  71. // Parameters:
  72. // None
  73. //
  74. // Return Value:
  75. // The the CommonName attribute name
  76. //
  77. //***************************************************************************
  78. LPCWSTR GetCommonName();
  79. //***************************************************************************
  80. //
  81. // CADSIClass :: SetCommonName
  82. //
  83. // Purpose : Sets the CommonName attribute name for this class
  84. //
  85. // Parameters:
  86. // The CommonName attribute name for this class
  87. //
  88. // Return Value:
  89. // None
  90. //***************************************************************************
  91. void SetCommonName(LPCWSTR lpszCommonName);
  92. //***************************************************************************
  93. //
  94. // CADSIClass :: GetSuperClassLDAPName
  95. //
  96. // Purpose : Returns the SuperClassLDAPName name
  97. //
  98. // Parameters:
  99. // None
  100. //
  101. // Return Value:
  102. // The the SuperClassLDAPName name
  103. //
  104. //***************************************************************************
  105. LPCWSTR GetSuperClassLDAPName();
  106. //***************************************************************************
  107. //
  108. // CADSIClass :: SetSuperClassLDAPName
  109. //
  110. // Purpose : Sets the SuperClassLDAPName for this class
  111. //
  112. // Parameters:
  113. // The SuperClassLDAPName for this class
  114. //
  115. // Return Value:
  116. // None
  117. //***************************************************************************
  118. void SetSuperClassLDAPName(LPCWSTR lpszSuperClassLDAPName);
  119. //***************************************************************************
  120. //
  121. // CADSIClass :: GetGovernsID
  122. //
  123. // Purpose : Returns the GovernsID attribute name
  124. //
  125. // Parameters:
  126. // None
  127. //
  128. // Return Value:
  129. // The the GovernsID attribute name
  130. //
  131. //***************************************************************************
  132. LPCWSTR GetGovernsID();
  133. //***************************************************************************
  134. //
  135. // CADSIClass :: SetGovernsID
  136. //
  137. // Purpose : Sets the GovernsID attribute name for this class
  138. //
  139. // Parameters:
  140. // The GovernsID attribute name for this class
  141. //
  142. // Return Value:
  143. // None
  144. //***************************************************************************
  145. void SetGovernsID(LPCWSTR lpszGovernsID);
  146. //***************************************************************************
  147. //
  148. // CADSIClass :: GetSchemaIDGUID
  149. //
  150. // Purpose : Returns the SchemaIDGUID attribute name
  151. //
  152. // Parameters:
  153. // None
  154. //
  155. // Return Value:
  156. // The the SchemaIDGUID attribute name
  157. //
  158. //***************************************************************************
  159. const LPBYTE GetSchemaIDGUID(DWORD *pdwLength);
  160. //***************************************************************************
  161. //
  162. // CADSIClass :: SetSchemaIDGUID
  163. //
  164. // Purpose : Sets the SchemaIDGUID attribute name for this class
  165. //
  166. // Parameters:
  167. // The SchemaIDGUID attribute name for this class
  168. //
  169. // Return Value:
  170. // None
  171. //***************************************************************************
  172. void SetSchemaIDGUID(LPBYTE pOctets, DWORD dwLength);
  173. //***************************************************************************
  174. //
  175. // CADSIClass :: GetRDNAttribute
  176. //
  177. // Purpose : Returns the RDN attribute name
  178. //
  179. // Parameters:
  180. // None
  181. //
  182. // Return Value:
  183. // The the RDN attribute name
  184. //
  185. //***************************************************************************
  186. LPCWSTR GetRDNAttribute();
  187. //***************************************************************************
  188. //
  189. // CADSIClass :: SetRDNAttribute
  190. //
  191. // Purpose : Sets the RDN attribute name for this class
  192. //
  193. // Parameters:
  194. // The RDN attribute name for this class
  195. //
  196. // Return Value:
  197. // None
  198. //***************************************************************************
  199. void SetRDNAttribute(LPCWSTR lpszRDNName);
  200. //***************************************************************************
  201. //
  202. // CADSIClass :: GetDefaultSecurityDescriptor
  203. //
  204. // Purpose : Returns the DefaultSecurityDescriptor attribute name
  205. //
  206. // Parameters:
  207. // None
  208. //
  209. // Return Value:
  210. // The the DefaultSecurityDescriptor attribute name
  211. //
  212. //***************************************************************************
  213. LPCWSTR GetDefaultSecurityDescriptor();
  214. //***************************************************************************
  215. //
  216. // CADSIClass :: SetDefaultSecurityDescriptor
  217. //
  218. // Purpose : Sets the DefaultSecurityDescriptor attribute name for this class
  219. //
  220. // Parameters:
  221. // The DefaultSecurityDescriptor attribute name for this class
  222. //
  223. // Return Value:
  224. // None
  225. //***************************************************************************
  226. void SetDefaultSecurityDescriptor(LPCWSTR lpszDefaultSecurityDescriptor);
  227. //***************************************************************************
  228. //
  229. // CADSIClass :: GetObjectClassCategory
  230. //
  231. // Purpose : Returns the ObjectClassCategory attribute name
  232. //
  233. // Parameters:
  234. // None
  235. //
  236. // Return Value:
  237. // The the ObjectClassCategory attribute name
  238. //
  239. //***************************************************************************
  240. DWORD GetObjectClassCategory();
  241. //***************************************************************************
  242. //
  243. // CADSIClass :: SetObjectClassCategory
  244. //
  245. // Purpose : Sets the ObjectClassCategory attribute name for this class
  246. //
  247. // Parameters:
  248. // The ObjectClassCategory attribute name for this class
  249. //
  250. // Return Value:
  251. // None
  252. //***************************************************************************
  253. void SetObjectClassCategory(DWORD dwObjectClassCategory);
  254. //***************************************************************************
  255. //
  256. // CADSIClass :: GetNTSecurityDescriptor
  257. //
  258. // Purpose : Returns the SchemaIDGUID attribute name
  259. //
  260. // Parameters:
  261. // None
  262. //
  263. // Return Value:
  264. // The the SchemaIDGUID attribute name
  265. //
  266. //***************************************************************************
  267. const LPBYTE GetNTSecurityDescriptor(DWORD *pdwLength);
  268. //***************************************************************************
  269. //
  270. // CADSIClass :: SetNTSecurityDescriptor
  271. //
  272. // Purpose : Sets the SetNTSecurityDescriptor attribute name for this class
  273. //
  274. // Parameters:
  275. // The SetNTSecurityDescriptor attribute name for this class
  276. //
  277. // Return Value:
  278. // None
  279. //***************************************************************************
  280. void SetNTSecurityDescriptor(LPBYTE pOctets, DWORD dwLength);
  281. //***************************************************************************
  282. //
  283. // CADSIClass :: GetDefaultObjectCategory
  284. //
  285. // Purpose : Returns the DefaultObjectCategory attribute name
  286. //
  287. // Parameters:
  288. // None
  289. //
  290. // Return Value:
  291. // The the DefaultObjectCategory attribute name
  292. //
  293. //***************************************************************************
  294. LPCWSTR GetDefaultObjectCategory();
  295. //***************************************************************************
  296. //
  297. // CADSIClass :: SetDefaultObjectCategory
  298. //
  299. // Purpose : Sets the DefaultObjectCategory attribute name for this class
  300. //
  301. // Parameters:
  302. // The DefaultObjectCategory attribute name for this class
  303. //
  304. // Return Value:
  305. // None
  306. //***************************************************************************
  307. void SetDefaultObjectCategory(LPCWSTR lpszDefaultObjectCategory);
  308. //***************************************************************************
  309. //
  310. // CADSIClass :: GetSystemOnly
  311. //
  312. // Purpose : Returns the SystemOnly attribute name
  313. //
  314. // Parameters:
  315. // None
  316. //
  317. // Return Value:
  318. // The the SystemOnly attribute name
  319. //
  320. //***************************************************************************
  321. BOOLEAN GetSystemOnly();
  322. //***************************************************************************
  323. //
  324. // CADSIClass :: SetSystemOnly
  325. //
  326. // Purpose : Sets the SystemOnly attribute name for this class
  327. //
  328. // Parameters:
  329. // The SystemOnly attribute name for this class
  330. //
  331. // Return Value:
  332. // None
  333. //***************************************************************************
  334. void SetSystemOnly(BOOLEAN bSystemOnly);
  335. //***************************************************************************
  336. //
  337. // CADSIClass :: GetAuxiliaryClasses
  338. //
  339. // Purpose : Gets the list of auxiliary classes for this class
  340. //
  341. // Parameters:
  342. // pdwCount : The address where the number of elements in the returned array will be put
  343. //
  344. // Return Value:
  345. // An array of strings which are the names of the auxiliary of this class
  346. //***************************************************************************
  347. LPCWSTR *GetAuxiliaryClasses(DWORD *pdwCount);
  348. //***************************************************************************
  349. //
  350. // CADSIClass :: SetAuxiliaryClasses
  351. //
  352. // Purpose : Sets the list of auxiliary classes for this class
  353. //
  354. // Parameters:
  355. // pValues : The values of this property
  356. // dwNumValues : The number of values
  357. //
  358. // Return Value:
  359. // None
  360. //***************************************************************************
  361. void SetAuxiliaryClasses(PADSVALUE pValues, DWORD dwNumValues);
  362. //***************************************************************************
  363. //
  364. // CADSIClass :: GetSystemAuxiliaryClasses
  365. //
  366. // Purpose : Gets the list of System auxiliary classes for this class
  367. //
  368. // Parameters:
  369. // pdwCount : The address where the number of elements in the returned array will be put
  370. //
  371. // Return Value:
  372. // An array of strings which are the names of the System auxiliary of this class
  373. //***************************************************************************
  374. LPCWSTR *GetSystemAuxiliaryClasses(DWORD *pdwCount);
  375. //***************************************************************************
  376. //
  377. // CADSIClass :: SetSystemAuxiliaryClasses
  378. //
  379. // Purpose : Sets the list of System auxiliary classes for this class
  380. //
  381. // Parameters:
  382. // pValues : The values of this property
  383. // dwNumValues : The number of values
  384. //
  385. // Return Value:
  386. // None
  387. //***************************************************************************
  388. void SetSystemAuxiliaryClasses(PADSVALUE pValues, DWORD dwNumValues);
  389. //***************************************************************************
  390. //
  391. // CADSIClass :: GetPossibleSuperiors
  392. //
  393. // Purpose : Gets the list of possible superiors for this class
  394. //
  395. // Parameters:
  396. // pdwCount : The address where the number of elements in the returned array will be put
  397. //
  398. // Return Value:
  399. // An array of strings which are the names of the possible superiors of this class
  400. //***************************************************************************
  401. LPCWSTR *GetPossibleSuperiors(DWORD *pdwCount);
  402. //***************************************************************************
  403. //
  404. // CADSIClass :: SetPossibleSuperiors
  405. //
  406. // Purpose : Sets the list of possible superiors for this class
  407. //
  408. // Parameters:
  409. // pValues : The values of this property
  410. // dwNumValues : The number of values
  411. //
  412. // Return Value:
  413. // None
  414. //***************************************************************************
  415. void SetPossibleSuperiors(PADSVALUE pValues, DWORD dwNumValues);
  416. //***************************************************************************
  417. //
  418. // CADSIClass :: GetSystemPossibleSuperiors
  419. //
  420. // Purpose : Gets the list of System possible superiors for this class
  421. //
  422. // Parameters:
  423. // pdwCount : The address where the number of elements in the returned array will be put
  424. //
  425. // Return Value:
  426. // An array of strings which are the names of the System possible superiors of this class
  427. //***************************************************************************
  428. LPCWSTR *GetSystemPossibleSuperiors(DWORD *pdwCount);
  429. //***************************************************************************
  430. //
  431. // CADSIClass :: SetSystemPossibleSuperiors
  432. //
  433. // Purpose : Sets the list of System possible superiors for this class
  434. //
  435. // Parameters:
  436. // pValues : The values of this property
  437. // dwNumValues : The number of values
  438. //
  439. // Return Value:
  440. // None
  441. //***************************************************************************
  442. void SetSystemPossibleSuperiors(PADSVALUE pValues, DWORD dwNumValues);
  443. //***************************************************************************
  444. //
  445. // CADSIClass :: GetMayContains
  446. //
  447. // Purpose : Gets the list of May Contains for this class
  448. //
  449. // Parameters:
  450. // pdwCount : The address where the number of elements in the returned array will be put
  451. //
  452. // Return Value:
  453. // An array of strings which are the names of the May Contains of this class
  454. //***************************************************************************
  455. LPCWSTR *GetMayContains(DWORD *pdwCount);
  456. //***************************************************************************
  457. //
  458. // CADSIClass :: SetMayContains
  459. //
  460. // Purpose : Sets the list of MayContains for this class
  461. //
  462. // Parameters:
  463. // pValues : The values of this property
  464. // dwNumValues : The number of values
  465. //
  466. // Return Value:
  467. // None
  468. //***************************************************************************
  469. void SetMayContains(PADSVALUE pValues, DWORD dwNumValues);
  470. //***************************************************************************
  471. //
  472. // CADSIClass :: GetSystemMayContains
  473. //
  474. // Purpose : Gets the list of System MayC ontains for this class
  475. //
  476. // Parameters:
  477. // pdwCount : The address where the number of elements in the returned array will be put
  478. //
  479. // Return Value:
  480. // An array of strings which are the names of the System May Contains of this class
  481. //***************************************************************************
  482. LPCWSTR *GetSystemMayContains(DWORD *pdwCount);
  483. //***************************************************************************
  484. //
  485. // CADSIClass :: SetSystemMayContains
  486. //
  487. // Purpose : Sets the list of System May Contains for this class
  488. //
  489. // Parameters:
  490. // pValues : The values of this property
  491. // dwNumValues : The number of values
  492. //
  493. // Return Value:
  494. // None
  495. //***************************************************************************
  496. void SetSystemMayContains(PADSVALUE pValues, DWORD dwNumValues);
  497. //***************************************************************************
  498. //
  499. // CADSIClass :: GetMustContains
  500. //
  501. // Purpose : Gets the list of Must Contains for this class
  502. //
  503. // Parameters:
  504. // pdwCount : The address where the number of elements in the returned array will be put
  505. //
  506. // Return Value:
  507. // An array of strings which are the names of the Must Contains of this class
  508. //***************************************************************************
  509. LPCWSTR *GetMustContains(DWORD *pdwCount);
  510. //***************************************************************************
  511. //
  512. // CADSIClass :: SetMustContains
  513. //
  514. // Purpose : Sets the list of Must Contains for this class
  515. //
  516. // Parameters:
  517. // pValues : The values of this property
  518. // dwNumValues : The number of values
  519. //
  520. // Return Value:
  521. // None
  522. //***************************************************************************
  523. void SetMustContains(PADSVALUE pValues, DWORD dwNumValues);
  524. //***************************************************************************
  525. //
  526. // CADSIClass :: GetSystemMustContains
  527. //
  528. // Purpose : Gets the list of System Must Contains for this class
  529. //
  530. // Parameters:
  531. // pdwCount : The address where the number of elements in the returned array will be put
  532. //
  533. // Return Value:
  534. // An array of strings which are the names of the System Must Contains of this class
  535. //***************************************************************************
  536. LPCWSTR *GetSystemMustContains(DWORD *pdwCount);
  537. //***************************************************************************
  538. //
  539. // CADSIClass :: SetSystemMustContains
  540. //
  541. // Purpose : Sets the list of System Must Contains for this class
  542. //
  543. // Parameters:
  544. // pValues : The values of this property
  545. // dwNumValues : The number of values
  546. //
  547. // Return Value:
  548. // None
  549. //***************************************************************************
  550. void SetSystemMustContains(PADSVALUE pValues, DWORD dwNumValues);
  551. protected:
  552. // The WBEM name of this class
  553. LPWSTR m_lpszWBEMClassName;
  554. // The Common Name (cn) of this class
  555. LPWSTR m_lpszCommonName;
  556. // The LDAP Name of the super class
  557. LPWSTR m_lpszSuperClassLDAPName;
  558. // The GovernsID attribute
  559. LPWSTR m_lpszGovernsID;
  560. // The SchemaIDGUID attribute
  561. LPBYTE m_pSchemaIDGUIDOctets;
  562. DWORD m_dwSchemaIDGUIDLength;
  563. // The RDN Attribute for this class
  564. LPWSTR m_lpszRDNAttribute;
  565. // The Default Security Descriptor Attribute for this class
  566. LPWSTR m_lpszDefaultSecurityDescriptor;
  567. // The Object Class Category
  568. DWORD m_dwObjectClassCategory;
  569. // The NT Security Descriptor Attribute for this class
  570. LPBYTE m_pNTSecurityDescriptor;
  571. DWORD m_dwNTSecurityDescriptorLength;
  572. // The system-only attribute
  573. BOOLEAN m_bSystemOnly;
  574. // The Default Object Category
  575. LPWSTR m_lpszDefaultObjectCategory;
  576. // The list of auxiliary classes and its count
  577. LPWSTR *m_lppszAuxiliaryClasses;
  578. DWORD m_dwAuxiliaryClassesCount;
  579. // The list of System auxiliary classes and its count
  580. LPWSTR *m_lppszSystemAuxiliaryClasses;
  581. DWORD m_dwSystemAuxiliaryClassesCount;
  582. // The list of possible superiors and its count
  583. LPWSTR *m_lppszPossibleSuperiors;
  584. DWORD m_dwPossibleSuperiorsCount;
  585. // The list of System possible superiors and its count
  586. LPWSTR *m_lppszSystemPossibleSuperiors;
  587. DWORD m_dwSystemPossibleSuperiorsCount;
  588. // The list of may contains and its count
  589. LPWSTR *m_lppszMayContains;
  590. DWORD m_dwMayContainsCount;
  591. // The list of System may contains and its count
  592. LPWSTR *m_lppszSystemMayContains;
  593. DWORD m_dwSystemMayContainsCount;
  594. // The list of must contains and its count
  595. LPWSTR *m_lppszMustContains;
  596. DWORD m_dwMustContainsCount;
  597. // The list of System must contains and its count
  598. LPWSTR *m_lppszSystemMustContains;
  599. DWORD m_dwSystemMustContainsCount;
  600. };
  601. #endif /* ADSI_CLASS_H */