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.

340 lines
9.9 KiB

  1. cpp_quote("/*******************************************************************************/" )
  2. cpp_quote("/* */" )
  3. cpp_quote("/* Copyright � Microsoft Corporation. All rights reserved. */" )
  4. cpp_quote("/* */" )
  5. /* WBEMPROV.IDL */
  6. /* */
  7. cpp_quote("/* This IDL file defines the interfaces that WBEM providers need in */" )
  8. cpp_quote("/* addition to the client interfaces defined in WBEMCLI.IDL */" )
  9. cpp_quote("/* */" )
  10. cpp_quote("/*******************************************************************************/" )
  11. import "objidl.idl";
  12. import "oleidl.idl";
  13. import "oaidl.idl";
  14. import "wbemcli.idl";
  15. typedef VARIANT WBEM_VARIANT;
  16. typedef [string] WCHAR* WBEM_WSTR;
  17. typedef [string] const WCHAR* WBEM_CWSTR;
  18. typedef [v1_enum] enum tag_WBEM_PROVIDER_REQUIREMENTS_TYPE
  19. {
  20. WBEM_REQUIREMENTS_START_POSTFILTER = 0,
  21. WBEM_REQUIREMENTS_STOP_POSTFILTER = 1,
  22. WBEM_REQUIREMENTS_RECHECK_SUBSCRIPTIONS = 2
  23. } WBEM_PROVIDER_REQUIREMENTS_TYPE;
  24. [uuid(092df710-7010-11d1-ad90-00c04fd8fdff)]
  25. library WbemProviders_v1
  26. {
  27. interface IWbemPropertyProvider;
  28. interface IWbemUnboundObjectSink;
  29. interface IWbemEventProvider;
  30. interface IWbemEventProviderQuerySink;
  31. interface IWbemEventProviderSecurity;
  32. interface IWbemEventConsumerProvider;
  33. interface IWbemProviderInitSink;
  34. interface IWbemProviderInit;
  35. interface IWbemHiPerfProvider;
  36. interface IWbemDecoupledRegistrar ;
  37. /////////////////////////////////////////////////////////////////
  38. //
  39. [uuid(cb8555cc-9128-11d1-ad9b-00c04fd8fdff)]
  40. coclass WbemAdministrativeLocator
  41. {
  42. interface IWbemLocator;
  43. };
  44. // this assumes that the transport has verified that
  45. // the user has access. Unlike the Administrative locator,
  46. // it increases the count of external connections
  47. [uuid(cd184336-9128-11d1-ad9b-00c04fd8fdff)]
  48. coclass WbemAuthenticatedLocator
  49. {
  50. interface IWbemLocator;
  51. };
  52. // this is used by providers who dont know if a user
  53. // has access or not.
  54. [uuid(443E7B79-DE31-11d2-B340-00104BCC4B4A)]
  55. coclass WbemUnauthenticatedLocator
  56. {
  57. interface IWbemLocator;
  58. };
  59. // this is used by providers that do not wish to be instantiated
  60. // by winmgmt, rather the provider registers it's participation
  61. // in servicing client requests as and when desired. This is
  62. // primarily used by providers that act on the part of application
  63. // hosts and that export management information only when they are activated
  64. // via some application scenario.
  65. [uuid(4cfc7932-0f9d-4bef-9c32-8ea2a6b56fcb)]
  66. coclass WbemDecoupledRegistrar
  67. {
  68. interface IWbemDecoupledRegistrar ;
  69. };
  70. [uuid(f5f75737-2843-4f22-933d-c76a97cda62f)]
  71. coclass WbemDecoupledBasicEventProvider
  72. {
  73. interface IWbemDecoupledBasicEventProvider ;
  74. };
  75. };
  76. #define OPTIONAL in, unique
  77. [restricted, object, uuid(e246107b-b06e-11d0-ad61-00c04fd8fdff)]
  78. interface IWbemUnboundObjectSink : IUnknown
  79. {
  80. HRESULT IndicateToConsumer(
  81. [in] IWbemClassObject* pLogicalConsumer,
  82. [in] long lNumObjects,
  83. [in, size_is(lNumObjects)] IWbemClassObject** apObjects);
  84. };
  85. /////////////////////////////////////////////////////////////////
  86. //
  87. //
  88. [restricted, object, uuid(CE61E841-65BC-11d0-B6BD-00AA003240C7)]
  89. interface IWbemPropertyProvider : IUnknown
  90. {
  91. HRESULT GetProperty(
  92. [in] long lFlags,
  93. [in] const BSTR strLocale,
  94. [in] const BSTR strClassMapping,
  95. [in] const BSTR strInstMapping,
  96. [in] const BSTR strPropMapping,
  97. [out] VARIANT* pvValue
  98. );
  99. HRESULT PutProperty(
  100. [in] long lFlags,
  101. [in] const BSTR strLocale,
  102. [in] const BSTR strClassMapping,
  103. [in] const BSTR strInstMapping,
  104. [in] const BSTR strPropMapping,
  105. [in] const VARIANT* pvValue
  106. );
  107. };
  108. [restricted, object, uuid(e245105b-b06e-11d0-ad61-00c04fd8fdff)]
  109. interface IWbemEventProvider : IUnknown
  110. {
  111. HRESULT ProvideEvents(
  112. [in] IWbemObjectSink* pSink,
  113. [in] long lFlags
  114. );
  115. };
  116. [restricted, object, uuid(580acaf8-fa1c-11d0-ad72-00c04fd8fdff)]
  117. interface IWbemEventProviderQuerySink : IUnknown
  118. {
  119. HRESULT NewQuery(
  120. [in] unsigned long dwId,
  121. [in] WBEM_WSTR wszQueryLanguage,
  122. [in] WBEM_WSTR wszQuery
  123. );
  124. HRESULT CancelQuery(
  125. [in] unsigned long dwId);
  126. };
  127. [restricted, object, uuid(631f7d96-d993-11d2-b339-00105a1f4aaf)]
  128. interface IWbemEventProviderSecurity : IUnknown
  129. {
  130. HRESULT AccessCheck(
  131. [in] WBEM_CWSTR wszQueryLanguage,
  132. [in] WBEM_CWSTR wszQuery,
  133. [in] long lSidLength,
  134. [in, size_is(lSidLength), unique] const BYTE* pSid);
  135. };
  136. [restricted, object, uuid(631f7d97-d993-11d2-b339-00105a1f4aaf)]
  137. interface IWbemProviderIdentity : IUnknown
  138. {
  139. HRESULT SetRegistrationObject(
  140. [in] long lFlags,
  141. [in] IWbemClassObject* pProvReg);
  142. };
  143. [restricted, object, uuid(e246107a-b06e-11d0-ad61-00c04fd8fdff)]
  144. interface IWbemEventConsumerProvider : IUnknown
  145. {
  146. HRESULT FindConsumer(
  147. [in] IWbemClassObject* pLogicalConsumer,
  148. [out] IWbemUnboundObjectSink** ppConsumer);
  149. };
  150. typedef enum tag_WBEM_EXTRA_RETURN_CODES
  151. {
  152. WBEM_S_INITIALIZED = 0,
  153. WBEM_S_LIMITED_SERVICE = 0x43001,
  154. WBEM_S_INDIRECTLY_UPDATED,
  155. WBEM_S_SUBJECT_TO_SDS,
  156. WBEM_E_RETRY_LATER = 0x80043001,
  157. WBEM_E_RESOURCE_CONTENTION,
  158. } WBEM_EXTRA_RETURN_CODES;
  159. typedef enum tag_WBEM_PROVIDER_FLAGS
  160. {
  161. WBEM_FLAG_OWNER_UPDATE = 0x10000,
  162. } WBEM_PROVIDER_FLAGS;
  163. [object, uuid(1be41571-91dd-11d1-aeb2-00c04fb68820)]
  164. interface IWbemProviderInitSink : IUnknown
  165. {
  166. HRESULT SetStatus(
  167. [in] LONG lStatus,
  168. [in] LONG lFlags
  169. );
  170. };
  171. [object, uuid(1be41572-91dd-11d1-aeb2-00c04fb68820)]
  172. interface IWbemProviderInit : IUnknown
  173. {
  174. HRESULT Initialize(
  175. [in, unique, string] LPWSTR wszUser,
  176. [in] LONG lFlags,
  177. [in, string] LPWSTR wszNamespace,
  178. [in, unique, string] LPWSTR wszLocale,
  179. [in] IWbemServices* pNamespace,
  180. [in] IWbemContext* pCtx,
  181. [in] IWbemProviderInitSink* pInitSink
  182. );
  183. };
  184. [local, restricted, object, uuid(49353c93-516b-11d1-aea6-00c04fb68820)]
  185. interface IWbemHiPerfProvider : IUnknown
  186. {
  187. HRESULT QueryInstances(
  188. [in] IWbemServices* pNamespace,
  189. [in, string] WCHAR* wszClass,
  190. [in] long lFlags,
  191. [in] IWbemContext* pCtx,
  192. [in] IWbemObjectSink* pSink // Return IWbemClassObject ptrs
  193. );
  194. HRESULT CreateRefresher(
  195. [in] IWbemServices* pNamespace,
  196. [in] long lFlags,
  197. [out] IWbemRefresher** ppRefresher);
  198. HRESULT CreateRefreshableObject(
  199. [in] IWbemServices* pNamespace,
  200. [in] IWbemObjectAccess* pTemplate,
  201. [in] IWbemRefresher* pRefresher,
  202. [in] long lFlags,
  203. [in] IWbemContext* pContext,
  204. [out] IWbemObjectAccess** ppRefreshable,
  205. [out] long* plId);
  206. HRESULT StopRefreshing(
  207. [in] IWbemRefresher* pRefresher,
  208. [in] long lId,
  209. [in] long lFlags);
  210. HRESULT CreateRefreshableEnum(
  211. [in] IWbemServices* pNamespace,
  212. [in, string] LPCWSTR wszClass,
  213. [in] IWbemRefresher* pRefresher,
  214. [in] long lFlags,
  215. [in] IWbemContext* pContext,
  216. [in] IWbemHiPerfEnum* pHiPerfEnum,
  217. [out] long* plId);
  218. HRESULT GetObjects(
  219. [in] IWbemServices* pNamespace,
  220. [in] long lNumObjects,
  221. [in,out,size_is(lNumObjects)] IWbemObjectAccess** apObj,
  222. [in] long lFlags,
  223. [in] IWbemContext* pContext);
  224. };
  225. [object, local, uuid(1005cbcf-e64f-4646-bcd3-3a089d8a84b4)]
  226. interface IWbemDecoupledRegistrar : IUnknown
  227. {
  228. HRESULT Register (
  229. [in] long a_Flags ,
  230. [in] IWbemContext *a_Context ,
  231. [in] LPCWSTR a_User ,
  232. [in] LPCWSTR a_Locale ,
  233. [in] LPCWSTR a_Scope ,
  234. [in] LPCWSTR a_Registration ,
  235. [in] IUnknown *a_Unknown
  236. ) ;
  237. HRESULT UnRegister () ;
  238. } ;
  239. [object, local, uuid(86336d20-ca11-4786-9ef1-bc8a946b42fc)]
  240. interface IWbemDecoupledBasicEventProvider : IWbemDecoupledRegistrar
  241. {
  242. HRESULT GetSink (
  243. [in] long a_Flags ,
  244. [in] IWbemContext *a_Context ,
  245. [out] IWbemObjectSink **a_Sink
  246. ) ;
  247. HRESULT GetService (
  248. [in] long a_Flags ,
  249. [in] IWbemContext *a_Context ,
  250. [out] IWbemServices **a_Service
  251. ) ;
  252. } ;
  253. typedef [v1_enum] enum tag_WBEM_BATCH_TYPE
  254. {
  255. WBEM_FLAG_BATCH_IF_NEEDED = 0,
  256. WBEM_FLAG_MUST_BATCH = 0x1,
  257. WBEM_FLAG_MUST_NOT_BATCH = 0x2
  258. } WBEM_BATCH_TYPE;
  259. [object, restricted, uuid(3ae0080a-7e3a-4366-bf89-0feedc931659)]
  260. interface IWbemEventSink : IWbemObjectSink
  261. {
  262. HRESULT SetSinkSecurity(
  263. [in] long lSDLength,
  264. [in, size_is(lSDLength)] BYTE* pSD);
  265. HRESULT IsActive();
  266. HRESULT GetRestrictedSink(
  267. [in] long lNumQueries,
  268. [in, size_is(lNumQueries), string] const LPCWSTR* awszQueries,
  269. [in] IUnknown* pCallback,
  270. [out] IWbemEventSink** ppSink);
  271. HRESULT SetBatchingParameters(
  272. [in] LONG lFlags,
  273. [in] DWORD dwMaxBufferSize,
  274. [in] DWORD dwMaxSendLatency);
  275. };