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.

694 lines
16 KiB

  1. // msclus.idl : IDL source for msclus.dll
  2. // ~~~~~~~~~~
  3. //
  4. // History
  5. // ?? Mar 1997 - Original creation.
  6. // 12 May 1997 - Changed the collections to use Add/Remove/Create/Delete
  7. // 14 May 1997 - Changed interface names per code review
  8. //
  9. //
  10. // This file will be processed by the MIDL tool to
  11. // produce the type library (msclus.tlb) and marshalling code.
  12. // UUIDS for MSCLUS
  13. // e9d74360-e986-11d0-a1cf-00a024ab73e5 -- interface IClusterApplication;
  14. // e9d74361-e986-11d0-a1cf-00a024ab73e5 -- interface Clusters
  15. // e9d74362-e986-11d0-a1cf-00a024ab73e5 -- interface ICluster
  16. // e9d74363-e986-11d0-a1cf-00a024ab73e5 -- interface ClusNode
  17. // e9d74364-e986-11d0-a1cf-00a024ab73e5 -- interface ClusNodes
  18. // e9d74365-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResGroup
  19. // e9d74366-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResGroups
  20. // e9d74367-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResource
  21. // e9d74368-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResources
  22. // e9d74369-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResType
  23. // e9d7436a-e986-11d0-a1cf-00a024ab73e5 -- interface ClusResTypes
  24. // e9d7436b-e986-11d0-a1cf-00a024ab73e5 -- interface ClusProperty
  25. // e9d7436c-e986-11d0-a1cf-00a024ab73e5 -- interface ClusProperties
  26. // e9d7436d-e986-11d0-a1cf-00a024ab73e5 -- interface IClusterDomain
  27. // e9d7436e-e986-11d0-a1cf-00a024ab73e5 -- interface Domains
  28. // e9d7436f-e986-11d0-a1cf-00a024ab73e5
  29. // e9d74370-e986-11d0-a1cf-00a024ab73e5 -- library MSClusterLib
  30. // e9d74371-e986-11d0-a1cf-00a024ab73e5 -- coclass Application
  31. // e9d74372-e986-11d0-a1cf-00a024ab73e5 -- coclass Cluster
  32. // e9d74373-e986-11d0-a1cf-00a024ab73e5 -- coclass ClusterDomain
  33. // e9d74374-e986-11d0-a1cf-00a024ab73e5
  34. // e9d74375-e986-11d0-a1cf-00a024ab73e5
  35. // e9d74376-e986-11d0-a1cf-00a024ab73e5
  36. // e9d74377-e986-11d0-a1cf-00a024ab73e5
  37. // e9d74378-e986-11d0-a1cf-00a024ab73e5
  38. // e9d74379-e986-11d0-a1cf-00a024ab73e5
  39. // e9d7437a-e986-11d0-a1cf-00a024ab73e5
  40. // e9d7437b-e986-11d0-a1cf-00a024ab73e5
  41. // e9d7437c-e986-11d0-a1cf-00a024ab73e5
  42. // e9d7437d-e986-11d0-a1cf-00a024ab73e5
  43. // e9d7437e-e986-11d0-a1cf-00a024ab73e5
  44. // e9d7437f-e986-11d0-a1cf-00a024ab73e5
  45. import "oaidl.idl";
  46. cpp_quote("#ifndef _CLUSTER_API_TYPES_")
  47. #include "clusapi.h"
  48. cpp_quote("#define _CLUSTER_API_TYPES_")
  49. cpp_quote("#endif // _CLUSTER_API_TYPES_")
  50. ///////////////////////////////////////
  51. // definitions
  52. interface IClusterApplication;
  53. interface IClusterDomain;
  54. interface ICluster;
  55. interface Domains;
  56. interface Clusters;
  57. //old interface ClusterNode;
  58. interface ClusNode;
  59. //old interface ClusterNodes;
  60. interface ClusNodes;
  61. //old interface ResourceGroup;
  62. interface ClusResGroup;
  63. //old interface ResourceGroups;
  64. interface ClusResGroups;
  65. //old interface Resource;
  66. interface ClusResource;
  67. //old interface Resources;
  68. interface ClusResources;
  69. //old interface ResourceType;
  70. interface ClusResType;
  71. //old interface ResourceTypes;
  72. interface ClusResTypes;
  73. //old interface ClusterProperty;
  74. interface ClusProperty;
  75. //old interface ClusterProperties;
  76. interface ClusProperties;
  77. //
  78. ///////////////////////////////////////
  79. /////////////////////////////////////////////////
  80. // Application
  81. [
  82. object,
  83. uuid(e9d74360-e986-11d0-a1cf-00a024ab73e5),
  84. dual,
  85. helpstring("Application Interface"),
  86. hidden,
  87. pointer_default(unique)
  88. ]
  89. interface IClusterApplication : IDispatch
  90. {
  91. [propget]
  92. HRESULT Domains( [out, retval] Domains ** ppDomains );
  93. HRESULT OpenCluster( [in] BSTR bstrClusterName, [out, retval] ICluster ** pCluster );
  94. };
  95. /////////////////////////////////////////////////
  96. // Domains
  97. [
  98. object,
  99. uuid(e9d7436e-e986-11d0-a1cf-00a024ab73e5),
  100. dual,
  101. helpstring("Domains collection"),
  102. pointer_default(unique)
  103. ]
  104. interface Domains : IDispatch
  105. {
  106. [propget]
  107. HRESULT Count( [out, retval] long * pnCount );
  108. [propget, id(DISPID_VALUE)]
  109. HRESULT Item( [in] VARIANT varIndex, [out, retval] IClusterDomain ** ppClusterDomain );
  110. HRESULT AddItem( [in] IClusterDomain * pClusterDomain );
  111. };
  112. /////////////////////////////////////////////////
  113. // ClusterDomain
  114. [
  115. object,
  116. uuid(e9d7436d-e986-11d0-a1cf-00a024ab73e5),
  117. dual,
  118. helpstring("ClusterDomain Interface"),
  119. hidden,
  120. pointer_default(unique)
  121. ]
  122. interface IClusterDomain : IDispatch
  123. {
  124. /////////////////////////////////
  125. // ClusterDomain
  126. [propget]
  127. HRESULT DomainName( [out, retval] BSTR * pbstrDomainName );
  128. [propget]
  129. HRESULT Clusters( [out, retval] Clusters ** ppClusters );
  130. };
  131. /////////////////////////////////////////////////
  132. // Clusters
  133. [
  134. object,
  135. uuid(e9d74361-e986-11d0-a1cf-00a024ab73e5),
  136. dual,
  137. helpstring("Clusters collection"),
  138. pointer_default(unique)
  139. ]
  140. interface Clusters : IDispatch
  141. {
  142. [propget]
  143. HRESULT DomainName( [out, retval] BSTR * pbstrDomainName );
  144. [propget]
  145. HRESULT Count( [out, retval] long * pnCount );
  146. [propget, id(DISPID_VALUE), helpstring("Index by integer")]
  147. HRESULT Item( [in] LONG nIndex, [out, retval] BSTR * bstrClusterName );
  148. };
  149. /////////////////////////////////////////////////
  150. // Cluster
  151. [
  152. object,
  153. uuid(e9d74362-e986-11d0-a1cf-00a024ab73e5),
  154. dual,
  155. helpstring("Cluster Interface"),
  156. hidden,
  157. pointer_default(unique)
  158. ]
  159. interface ICluster : IDispatch
  160. {
  161. /////////////////////////////////
  162. // Cluster
  163. [propget, hidden]
  164. HRESULT Handle( [out, retval] LONG * phandle );
  165. HRESULT Open( [in] BSTR bstrClusterName );
  166. HRESULT Close();
  167. [propput]
  168. HRESULT Name( [in] BSTR bstrClusterName );
  169. [propget]
  170. HRESULT Name( [out, retval] BSTR * pbstrClusterName );
  171. HRESULT GetVersion(
  172. [out] BSTR * pbstrClusterName,
  173. [out] SHORT * MajorVersion,
  174. [out] SHORT * MinorVersion,
  175. [out] SHORT * BuildNumber,
  176. [out] BSTR * pbstrVendorId,
  177. [out] BSTR * pbstrCSDVersion );
  178. /////////////////////////////////
  179. // Quorum Resource
  180. [propput]
  181. HRESULT QuorumResource( [in] ClusResource * pClusterResource );
  182. [propget]
  183. HRESULT QuorumResource( [out, retval] ClusResource ** pClusterResource );
  184. /////////////////////////////////
  185. // Cluster Nodes
  186. [propget]
  187. HRESULT Nodes( [out, retval] ClusNodes ** ppClusterNodes );
  188. /////////////////////////////////
  189. // Cluster Resource Groups
  190. [propget]
  191. HRESULT ResourceGroups( [out, retval] ClusResGroups ** ppClusterResourceGroups );
  192. /////////////////////////////////
  193. // Cluster Resources
  194. [propget]
  195. HRESULT Resources( [out, retval] ClusResources ** ppClusterResources );
  196. /////////////////////////////////
  197. // Cluster Resource Types
  198. [propget]
  199. HRESULT ResourceTypes( [out, retval] ClusResTypes ** ppResourceTypes );
  200. };
  201. /////////////////////////////////////////////////
  202. // ClusNode
  203. [
  204. object,
  205. uuid(e9d74363-e986-11d0-a1cf-00a024ab73e5),
  206. dual,
  207. helpstring("Cluster Node Interface"),
  208. pointer_default(unique)
  209. ]
  210. interface ClusNode : IDispatch
  211. {
  212. [propget, hidden]
  213. HRESULT Handle( [out, retval] LONG * phandle );
  214. [propget]
  215. HRESULT Name( [out, retval] BSTR * pbstrNodeName );
  216. [propget]
  217. HRESULT NodeID( [out, retval] BSTR * pbstrNodeID );
  218. [propget]
  219. HRESULT State( [out,retval] LONG * dwState );
  220. HRESULT Pause();
  221. HRESULT Resume();
  222. HRESULT Evict();
  223. [propget]
  224. HRESULT ResourceGroups( [out, retval] ClusResGroups ** ppResourceGroups );
  225. [propget]
  226. HRESULT CommonProperties( [out, retval] ClusProperties ** ppProperties );
  227. [propget]
  228. HRESULT PrivateProperties( [out, retval] ClusProperties ** ppProperties );
  229. [propget]
  230. HRESULT CommonROProperties( [out, retval] ClusProperties ** ppProperties );
  231. [propget]
  232. HRESULT PrivateROProperties( [out, retval] ClusProperties ** ppProperties );
  233. };
  234. /////////////////////////////////////////////////
  235. // ClusNodes
  236. [
  237. object,
  238. uuid(e9d74364-e986-11d0-a1cf-00a024ab73e5),
  239. dual,
  240. helpstring("Cluster Nodes Interface"),
  241. pointer_default(unique)
  242. ]
  243. interface ClusNodes : IDispatch
  244. {
  245. [propget]
  246. HRESULT Count( [out, retval] long * pnCount );
  247. [propget, id(DISPID_VALUE), helpstring("Index by name or integer")]
  248. HRESULT Item( [in] VARIANT varIndex, [out, retval] ClusNode ** ppClusterNode );
  249. [propget, restricted, id(DISPID_NEWENUM)]
  250. HRESULT _NewEnum( [out, retval] IUnknown ** ppEnum );
  251. };
  252. /////////////////////////////////////////////////
  253. // ClusResGroup
  254. [
  255. object,
  256. uuid(e9d74365-e986-11d0-a1cf-00a024ab73e5),
  257. dual,
  258. helpstring("Cluster Resource Group Interface"),
  259. pointer_default(unique)
  260. ]
  261. interface ClusResGroup : IDispatch
  262. {
  263. [propget, hidden]
  264. HRESULT Handle( [out, retval] LONG * phandle );
  265. [propput]
  266. HRESULT Name( [in] BSTR bstrGroupName );
  267. [propget]
  268. HRESULT Name( [out, retval] BSTR * pbstrGroupName );
  269. [propget]
  270. HRESULT State( [out,retval] LONG * dwState );
  271. [propget]
  272. HRESULT OwnerNode( [out,retval] ClusNode ** ppOwnerNode );
  273. [propget]
  274. HRESULT Resources( [out, retval] ClusResources ** ppClusterResources );
  275. [propget]
  276. HRESULT PreferredOwnerNodes( [out, retval] ClusNodes ** ppOwnerNodes );
  277. HRESULT Delete();
  278. HRESULT Online( [in, optional] ClusNode * pDestinationNode );
  279. HRESULT Move( [in, optional] ClusNode * pDestinationNode );
  280. HRESULT Offline();
  281. [propget]
  282. HRESULT CommonProperties( [out, retval] ClusProperties ** ppProperties );
  283. [propget]
  284. HRESULT PrivateProperties( [out, retval] ClusProperties ** ppProperties );
  285. [propget]
  286. HRESULT CommonROProperties( [out, retval] ClusProperties ** ppProperties );
  287. [propget]
  288. HRESULT PrivateROProperties( [out, retval] ClusProperties ** ppProperties );
  289. };
  290. /////////////////////////////////////////////////
  291. // ClusResGroups
  292. [
  293. object,
  294. uuid(e9d74366-e986-11d0-a1cf-00a024ab73e5),
  295. dual,
  296. helpstring("Cluster Resource Groups Interface"),
  297. pointer_default(unique)
  298. ]
  299. interface ClusResGroups : IDispatch
  300. {
  301. [propget]
  302. HRESULT Count( [out, retval] long * pnCount );
  303. [propget, id(DISPID_VALUE)]
  304. HRESULT Item( [in] VARIANT varIndex, [out, retval] ClusResGroup ** ppResourceGroup );
  305. [propget, restricted, id(DISPID_NEWENUM)]
  306. HRESULT _NewEnum( [out, retval] IUnknown ** ppEnum );
  307. [helpstring("Create a new resource group")]
  308. HRESULT CreateItem( [in] BSTR bstrResourceGroupName, [out, retval] ClusResGroup ** ppResourceGroup );
  309. [helpstring("Delete a resource group")]
  310. HRESULT DeleteItem( [in] VARIANT varIndex );
  311. [helpstring("Add a resource group to the list.")]
  312. HRESULT AddItem( [in] ClusResGroup* pResourceGroup );
  313. [helpstring("Remove a resource group from the list by name or index.")]
  314. HRESULT RemoveItem( [in] VARIANT varIndex );
  315. [helpstring("Refresh data in collection")]
  316. HRESULT Refresh();
  317. };
  318. /////////////////////////////////////////////////
  319. // ClusResource
  320. [
  321. object,
  322. uuid(e9d74367-e986-11d0-a1cf-00a024ab73e5),
  323. dual,
  324. helpstring("Cluster Resource Interface"),
  325. pointer_default(unique)
  326. ]
  327. interface ClusResource : IDispatch
  328. {
  329. [propget, hidden]
  330. HRESULT Handle( [out, retval] LONG * phandle );
  331. [propput]
  332. HRESULT Name( [in] BSTR bstrResourceName );
  333. [propget]
  334. HRESULT Name( [out, retval] BSTR * pbstrResourceName );
  335. [propget]
  336. HRESULT State( [out,retval] LONG * dwState );
  337. HRESULT BecomeQuorumResource( [in] BSTR bstrDevicePath, [in] long lMaxLogSize );
  338. HRESULT Delete();
  339. HRESULT Fail();
  340. HRESULT Online();
  341. HRESULT Offline();
  342. HRESULT ChangeResourceGroup( [in] ClusResGroup * pResourceGroup );
  343. HRESULT AddResourceNode( [in] ClusNode * pNode );
  344. HRESULT RemoveResourceNode( [in] ClusNode * pNode );
  345. HRESULT AddResourceDependency( [in] ClusResource * pResource );
  346. HRESULT RemoveResourceDependency( [in] ClusResource * pResource );
  347. HRESULT CanResourceBeDependent( [in] ClusResource * pResource, [out, retval] BOOL * bDependent );
  348. [propget]
  349. HRESULT AllowedNodes( [out, retval] ClusNodes ** ppNodes );
  350. [propget]
  351. HRESULT Dependencies( [out, retval] ClusResources ** ppResources );
  352. [propget]
  353. HRESULT CommonProperties( [out, retval] ClusProperties ** ppProperties );
  354. [propget]
  355. HRESULT PrivateProperties( [out, retval] ClusProperties ** ppProperties );
  356. [propget]
  357. HRESULT CommonROProperties( [out, retval] ClusProperties ** ppProperties );
  358. [propget]
  359. HRESULT PrivateROProperties( [out, retval] ClusProperties ** ppProperties );
  360. };
  361. /////////////////////////////////////////////////
  362. // ClusResources
  363. [
  364. object,
  365. uuid(e9d74368-e986-11d0-a1cf-00a024ab73e5),
  366. dual,
  367. helpstring("Cluster Resources Interface"),
  368. pointer_default(unique)
  369. ]
  370. interface ClusResources : IDispatch
  371. {
  372. [propget]
  373. HRESULT Count( [out, retval] long * pnCount );
  374. [propget, id(DISPID_VALUE)]
  375. HRESULT Item( [in] VARIANT varIndex, [out, retval] ClusResource ** ppClusterResource );
  376. [propget, restricted, id(DISPID_NEWENUM)]
  377. HRESULT _NewEnum( [out, retval] IUnknown ** ppEnum );
  378. [helpstring("Create a new resource.")]
  379. HRESULT CreateItem(
  380. [in] BSTR bstrResourceName,
  381. [in] BSTR bstrResourceType,
  382. [in] long dwFlags,
  383. [out, retval] ClusResource ** ppClusterResource );
  384. [helpstring("Delete a resource by name or index.")]
  385. HRESULT DeleteItem( [in] VARIANT varIndex );
  386. [helpstring("Add a resource to the list.")]
  387. HRESULT AddItem( [in] ClusResource* pResource );
  388. [helpstring("Remove a resource from the list by name or index.")]
  389. HRESULT RemoveItem( [in] VARIANT varIndex );
  390. [helpstring("Refresh data in collection")]
  391. HRESULT Refresh();
  392. };
  393. /////////////////////////////////////////////////
  394. // ClusResType
  395. [
  396. object,
  397. uuid(e9d74369-e986-11d0-a1cf-00a024ab73e5),
  398. dual,
  399. helpstring("Cluster Resource Type"),
  400. pointer_default(unique)
  401. ]
  402. interface ClusResType : IDispatch
  403. {
  404. [propget]
  405. HRESULT Name( [out, retval] BSTR * strTypeName );
  406. HRESULT Delete();
  407. [propget]
  408. HRESULT CommonProperties( [out, retval] ClusProperties ** ppProperties );
  409. [propget]
  410. HRESULT PrivateProperties( [out, retval] ClusProperties ** ppProperties );
  411. [propget]
  412. HRESULT CommonROProperties( [out, retval] ClusProperties ** ppProperties );
  413. [propget]
  414. HRESULT PrivateROProperties( [out, retval] ClusProperties ** ppProperties );
  415. };
  416. /////////////////////////////////////////////////
  417. // ClusResTypes
  418. [
  419. object,
  420. uuid(e9d7436a-e986-11d0-a1cf-00a024ab73e5),
  421. dual,
  422. helpstring("Cluster Resource Types"),
  423. pointer_default(unique)
  424. ]
  425. interface ClusResTypes : IDispatch
  426. {
  427. [propget]
  428. HRESULT Count( [out, retval] long * pnCount );
  429. [propget, id(DISPID_VALUE)]
  430. HRESULT Item( [in] VARIANT varIndex, [out, retval] ClusResType ** ppResourceType );
  431. [propget, restricted, id(DISPID_NEWENUM)]
  432. HRESULT _NewEnum( [out, retval] IUnknown ** ppEnum );
  433. [helpstring("Create a resource type")]
  434. HRESULT CreateItem(
  435. [in] BSTR bstrResourceTypeName,
  436. [in] BSTR bstrDisplayName,
  437. [in] BSTR bstrResourceTypeDll,
  438. [in] LONG dwLooksAlivePollInterval,
  439. [in] LONG dwIsAlivePollInterval,
  440. [out, retval] ClusResType ** ppResourceType );
  441. [helpstring("Delete a resource type")]
  442. HRESULT DeleteItem( [in] VARIANT varIndex );
  443. [helpstring("Add a resource type to the list.")]
  444. HRESULT AddItem( [in] ClusResType * pResourceType );
  445. [helpstring("Remove a resource type from the list by name or index.")]
  446. HRESULT RemoveItem( [in] VARIANT varIndex );
  447. [helpstring("Refresh data in collection")]
  448. HRESULT Refresh();
  449. };
  450. /////////////////////////////////////////////////
  451. // ClusProperty
  452. [
  453. object,
  454. uuid(e9d7436b-e986-11d0-a1cf-00a024ab73e5),
  455. dual,
  456. helpstring("Property of an object in the cluster"),
  457. pointer_default(unique)
  458. ]
  459. interface ClusProperty : IDispatch
  460. {
  461. [propget]
  462. HRESULT Name( [out, retval] BSTR * pbstrName );
  463. [propget]
  464. HRESULT Value( [out, retval] VARIANT * pvarValue );
  465. [propput, id(DISPID_VALUE)]
  466. HRESULT Value( [in] VARIANT varValue );
  467. };
  468. /////////////////////////////////////////////////
  469. // ClusProperties
  470. [
  471. object,
  472. uuid(e9d7436c-e986-11d0-a1cf-00a024ab73e5),
  473. dual,
  474. helpstring("ClusProperty collection"),
  475. pointer_default(unique)
  476. ]
  477. interface ClusProperties : IDispatch
  478. {
  479. [propget]
  480. HRESULT Count( [out, retval] long * pnCount );
  481. [propget, id(DISPID_VALUE)]
  482. HRESULT Item( [in] VARIANT varIndex, [out, retval] ClusProperty ** ppProperty );
  483. [propget, restricted, id(DISPID_NEWENUM)]
  484. HRESULT _NewEnum( [out, retval] IUnknown ** ppEnum );
  485. [helpstring("Add an object")]
  486. HRESULT Add( [in] BSTR bstrName, [in] VARIANT varValue, [out, retval] ClusProperty ** pProperty );
  487. [helpstring("Remove an object")]
  488. HRESULT Remove( [in] VARIANT varIndex );
  489. [helpstring("Refresh data in collection")]
  490. HRESULT Refresh();
  491. [helpstring("Save all property changes")]
  492. HRESULT SaveChanges();
  493. };
  494. /////////////////////////////////////////////////////////
  495. // MSClusterLib
  496. [
  497. uuid(e9d74370-e986-11d0-a1cf-00a024ab73e5),
  498. version(1.0),
  499. helpstring("MS Cluster 1.0 Type Library")
  500. ]
  501. library MSClusterLib
  502. {
  503. importlib("stdole2.tlb");
  504. // Temporary include file for CLUSAPI constants.
  505. // #include "cluconst.idl"
  506. [
  507. uuid(e9d74371-e986-11d0-a1cf-00a024ab73e5),
  508. helpstring("Application Class")
  509. ]
  510. coclass Application
  511. {
  512. [default] interface IClusterApplication;
  513. };
  514. [
  515. uuid(e9d74372-e986-11d0-a1cf-00a024ab73e5),
  516. helpstring("Cluster Class")
  517. ]
  518. coclass Cluster
  519. {
  520. [default] interface ICluster;
  521. };
  522. [
  523. uuid(e9d74373-e986-11d0-a1cf-00a024ab73e5),
  524. helpstring("ClusterDomain Class")
  525. ]
  526. coclass ClusterDomain
  527. {
  528. [default] interface IClusterDomain;
  529. };
  530. };