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.

354 lines
9.1 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. WBEMPROV.IDL
  5. Abstract:
  6. This IDL file defines the interfaces that WBEM providers need in addition
  7. to the client interfaces defined in WBEMCLI.IDL
  8. History:
  9. --*/
  10. import "objidl.idl";
  11. import "oleidl.idl";
  12. import "oaidl.idl";
  13. import "wbemcli.idl";
  14. typedef VARIANT WBEM_VARIANT;
  15. typedef [string] WCHAR* WBEM_WSTR;
  16. typedef [string] const WCHAR* WBEM_CWSTR;
  17. typedef [v1_enum] enum tag_WBEM_PROVIDER_REQUIREMENTS_TYPE
  18. {
  19. WBEM_REQUIREMENTS_START_POSTFILTER = 0,
  20. WBEM_REQUIREMENTS_STOP_POSTFILTER = 1,
  21. WBEM_REQUIREMENTS_RECHECK_SUBSCRIPTIONS = 2
  22. } WBEM_PROVIDER_REQUIREMENTS_TYPE;
  23. [uuid(092df710-7010-11d1-ad90-00c04fd8fdff)]
  24. library WbemProviders_v1
  25. {
  26. interface IWbemPropertyProvider;
  27. interface IWbemUnboundObjectSink;
  28. interface IWbemEventProvider;
  29. interface IWbemEventProviderQuerySink;
  30. interface IWbemEventProviderSecurity;
  31. interface IWbemEventConsumerProvider;
  32. interface IWbemEventConsumerProviderEx;
  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. [object, restricted, uuid(17cf534a-d8a3-4ad0-ac92-5e3d01717151)]
  151. interface IWbemEventConsumerProviderEx : IWbemEventConsumerProvider
  152. {
  153. HRESULT ValidateSubscription(
  154. [in] IWbemClassObject* pLogicalConsumer);
  155. };
  156. typedef enum tag_WBEM_EXTRA_RETURN_CODES
  157. {
  158. WBEM_S_INITIALIZED = 0,
  159. WBEM_S_LIMITED_SERVICE = 0x43001,
  160. WBEM_S_INDIRECTLY_UPDATED,
  161. WBEM_S_SUBJECT_TO_SDS,
  162. WBEM_E_RETRY_LATER = 0x80043001,
  163. WBEM_E_RESOURCE_CONTENTION,
  164. } WBEM_EXTRA_RETURN_CODES;
  165. typedef enum tag_WBEM_PROVIDER_FLAGS
  166. {
  167. WBEM_FLAG_OWNER_UPDATE = 0x10000,
  168. } WBEM_PROVIDER_FLAGS;
  169. [object, uuid(1be41571-91dd-11d1-aeb2-00c04fb68820)]
  170. interface IWbemProviderInitSink : IUnknown
  171. {
  172. HRESULT SetStatus(
  173. [in] LONG lStatus,
  174. [in] LONG lFlags
  175. );
  176. };
  177. [object, uuid(1be41572-91dd-11d1-aeb2-00c04fb68820)]
  178. interface IWbemProviderInit : IUnknown
  179. {
  180. HRESULT Initialize(
  181. [in, unique, string] LPWSTR wszUser,
  182. [in] LONG lFlags,
  183. [in, string] LPWSTR wszNamespace,
  184. [in, unique, string] LPWSTR wszLocale,
  185. [in] IWbemServices* pNamespace,
  186. [in] IWbemContext* pCtx,
  187. [in] IWbemProviderInitSink* pInitSink
  188. );
  189. };
  190. [local, restricted, object, uuid(49353c93-516b-11d1-aea6-00c04fb68820)]
  191. interface IWbemHiPerfProvider : IUnknown
  192. {
  193. HRESULT QueryInstances(
  194. [in] IWbemServices* pNamespace,
  195. [in, string] WCHAR* wszClass,
  196. [in] long lFlags,
  197. [in] IWbemContext* pCtx,
  198. [in] IWbemObjectSink* pSink // Return IWbemClassObject ptrs
  199. );
  200. HRESULT CreateRefresher(
  201. [in] IWbemServices* pNamespace,
  202. [in] long lFlags,
  203. [out] IWbemRefresher** ppRefresher);
  204. HRESULT CreateRefreshableObject(
  205. [in] IWbemServices* pNamespace,
  206. [in] IWbemObjectAccess* pTemplate,
  207. [in] IWbemRefresher* pRefresher,
  208. [in] long lFlags,
  209. [in] IWbemContext* pContext,
  210. [out] IWbemObjectAccess** ppRefreshable,
  211. [out] long* plId);
  212. HRESULT StopRefreshing(
  213. [in] IWbemRefresher* pRefresher,
  214. [in] long lId,
  215. [in] long lFlags);
  216. HRESULT CreateRefreshableEnum(
  217. [in] IWbemServices* pNamespace,
  218. [in, string] LPCWSTR wszClass,
  219. [in] IWbemRefresher* pRefresher,
  220. [in] long lFlags,
  221. [in] IWbemContext* pContext,
  222. [in] IWbemHiPerfEnum* pHiPerfEnum,
  223. [out] long* plId);
  224. HRESULT GetObjects(
  225. [in] IWbemServices* pNamespace,
  226. [in] long lNumObjects,
  227. [in,out,size_is(lNumObjects)] IWbemObjectAccess** apObj,
  228. [in] long lFlags,
  229. [in] IWbemContext* pContext);
  230. };
  231. [object, local, uuid(1005cbcf-e64f-4646-bcd3-3a089d8a84b4)]
  232. interface IWbemDecoupledRegistrar : IUnknown
  233. {
  234. HRESULT Register (
  235. [in] long a_Flags ,
  236. [in] IWbemContext *a_Context ,
  237. [in] LPCWSTR a_User ,
  238. [in] LPCWSTR a_Locale ,
  239. [in] LPCWSTR a_Scope ,
  240. [in] LPCWSTR a_Registration ,
  241. [in] IUnknown *a_Unknown
  242. ) ;
  243. HRESULT UnRegister () ;
  244. } ;
  245. [object, local, uuid(86336d20-ca11-4786-9ef1-bc8a946b42fc)]
  246. interface IWbemDecoupledBasicEventProvider : IWbemDecoupledRegistrar
  247. {
  248. HRESULT GetSink (
  249. [in] long a_Flags ,
  250. [in] IWbemContext *a_Context ,
  251. [out] IWbemObjectSink **a_Sink
  252. ) ;
  253. HRESULT GetService (
  254. [in] long a_Flags ,
  255. [in] IWbemContext *a_Context ,
  256. [out] IWbemServices **a_Service
  257. ) ;
  258. } ;
  259. typedef [v1_enum] enum tag_WBEM_BATCH_TYPE
  260. {
  261. WBEM_FLAG_BATCH_IF_NEEDED = 0,
  262. WBEM_FLAG_MUST_BATCH = 0x1,
  263. WBEM_FLAG_MUST_NOT_BATCH = 0x2
  264. } WBEM_BATCH_TYPE;
  265. [object, restricted, uuid(3ae0080a-7e3a-4366-bf89-0feedc931659)]
  266. interface IWbemEventSink : IWbemObjectSink
  267. {
  268. HRESULT SetSinkSecurity(
  269. [in] long lSDLength,
  270. [in, size_is(lSDLength)] BYTE* pSD);
  271. HRESULT IsActive();
  272. HRESULT GetRestrictedSink(
  273. [in] long lNumQueries,
  274. [in, size_is(lNumQueries), string] const LPCWSTR* awszQueries,
  275. [in] IUnknown* pCallback,
  276. [out] IWbemEventSink** ppSink);
  277. HRESULT SetBatchingParameters(
  278. [in] LONG lFlags,
  279. [in] DWORD dwMaxBufferSize,
  280. [in] DWORD dwMaxSendLatency);
  281. };