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.

287 lines
7.7 KiB

  1. //***************************************************************************
  2. //
  3. // (c) 1996-1999 by Microsoft Corporation
  4. //
  5. // WBEMPROV.IDL
  6. //
  7. // This IDL file defines the interfaces that WBEM providers need in addition
  8. // to the client interfaces defined in WBEMCLI.IDL
  9. //
  10. //***************************************************************************
  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 IWbemEventConsumerProvider;
  32. interface IWbemProviderInitSink;
  33. interface IWbemProviderInit;
  34. interface IWbemHiPerfProvider;
  35. /////////////////////////////////////////////////////////////////
  36. //
  37. [uuid(cb8555cc-9128-11d1-ad9b-00c04fd8fdff)]
  38. coclass WbemAdministrativeLocator
  39. {
  40. interface IWbemLocator;
  41. };
  42. // this assumes that the transport has verified that
  43. // the user has access. Unlike the Administrative locator,
  44. // it increases the count of external connections
  45. [uuid(cd184336-9128-11d1-ad9b-00c04fd8fdff)]
  46. coclass WbemAuthenticatedLocator
  47. {
  48. interface IWbemLocator;
  49. };
  50. // this is used by providers who dont know if a user
  51. // has access or not.
  52. [uuid(443E7B79-DE31-11d2-B340-00104BCC4B4A)]
  53. coclass WbemUnauthenticatedLocator
  54. {
  55. interface IWbemLocator;
  56. };
  57. [uuid(C10B4771-4DA0-11d2-A2F5-00C04F86FB7D)]
  58. coclass WinmgmtMofCompiler
  59. {
  60. interface IWinmgmtMofCompiler;
  61. };
  62. };
  63. #define OPTIONAL in, unique
  64. [restricted, object, uuid(e246107b-b06e-11d0-ad61-00c04fd8fdff)]
  65. interface IWbemUnboundObjectSink : IUnknown
  66. {
  67. HRESULT IndicateToConsumer(
  68. [in] IWbemClassObject* pLogicalConsumer,
  69. [in] long lNumObjects,
  70. [in, size_is(lNumObjects)] IWbemClassObject** apObjects);
  71. };
  72. /////////////////////////////////////////////////////////////////
  73. //
  74. //
  75. [restricted, object, local, uuid(CE61E841-65BC-11d0-B6BD-00AA003240C7)]
  76. interface IWbemPropertyProvider : IUnknown
  77. {
  78. HRESULT GetProperty(
  79. [in] long lFlags,
  80. [in] const BSTR strLocale,
  81. [in] const BSTR strClassMapping,
  82. [in] const BSTR strInstMapping,
  83. [in] const BSTR strPropMapping,
  84. [out] VARIANT* pvValue
  85. );
  86. HRESULT PutProperty(
  87. [in] long lFlags,
  88. [in] const BSTR strLocale,
  89. [in] const BSTR strClassMapping,
  90. [in] const BSTR strInstMapping,
  91. [in] const BSTR strPropMapping,
  92. [in] const VARIANT* pvValue
  93. );
  94. };
  95. [restricted, object, uuid(e245105b-b06e-11d0-ad61-00c04fd8fdff)]
  96. interface IWbemEventProvider : IUnknown
  97. {
  98. HRESULT ProvideEvents(
  99. [in] IWbemObjectSink* pSink,
  100. [in] long lFlags
  101. );
  102. };
  103. [restricted, object, uuid(580acaf8-fa1c-11d0-ad72-00c04fd8fdff)]
  104. interface IWbemEventProviderQuerySink : IUnknown
  105. {
  106. HRESULT NewQuery(
  107. [in] unsigned long dwId,
  108. [in] WBEM_WSTR wszQueryLanguage,
  109. [in] WBEM_WSTR wszQuery
  110. );
  111. HRESULT CancelQuery(
  112. [in] unsigned long dwId);
  113. };
  114. [restricted, object, uuid(631f7d96-d993-11d2-b339-00105a1f4aaf)]
  115. interface IWbemEventProviderSecurity : IUnknown
  116. {
  117. HRESULT AccessCheck(
  118. [in] WBEM_CWSTR wszQueryLanguage,
  119. [in] WBEM_CWSTR wszQuery,
  120. [in] long lSidLength,
  121. [in, size_is(lSidLength), unique] const BYTE* pSid);
  122. };
  123. [restricted, object, uuid(631f7d97-d993-11d2-b339-00105a1f4aaf)]
  124. interface IWbemProviderIdentity : IUnknown
  125. {
  126. HRESULT SetRegistrationObject(
  127. [in] long lFlags,
  128. [in] IWbemClassObject* pProvReg);
  129. };
  130. [restricted, object, uuid(e246107a-b06e-11d0-ad61-00c04fd8fdff)]
  131. interface IWbemEventConsumerProvider : IUnknown
  132. {
  133. HRESULT FindConsumer(
  134. [in] IWbemClassObject* pLogicalConsumer,
  135. [out] IWbemUnboundObjectSink** ppConsumer);
  136. };
  137. typedef enum tag_WBEM_EXTRA_RETURN_CODES
  138. {
  139. WBEM_S_INITIALIZED = 0,
  140. WBEM_S_LIMITED_SERVICE = 0x43001,
  141. WBEM_S_INDIRECTLY_UPDATED,
  142. WBEM_E_RETRY_LATER = 0x80043001,
  143. WBEM_E_RESOURCE_CONTENTION,
  144. } WBEM_EXTRA_RETURN_CODES;
  145. typedef enum tag_WBEM_PROVIDER_FLAGS
  146. {
  147. WBEM_FLAG_OWNER_UPDATE = 0x10000,
  148. } WBEM_PROVIDER_FLAGS;
  149. [object, uuid(1be41571-91dd-11d1-aeb2-00c04fb68820)]
  150. interface IWbemProviderInitSink : IUnknown
  151. {
  152. HRESULT SetStatus(
  153. [in] LONG lStatus,
  154. [in] LONG lFlags
  155. );
  156. };
  157. [object, uuid(1be41572-91dd-11d1-aeb2-00c04fb68820)]
  158. interface IWbemProviderInit : IUnknown
  159. {
  160. HRESULT Initialize(
  161. [in, unique, string] LPWSTR wszUser,
  162. [in] LONG lFlags,
  163. [in, string] LPWSTR wszNamespace,
  164. [in, unique, string] LPWSTR wszLocale,
  165. [in] IWbemServices* pNamespace,
  166. [in] IWbemContext* pCtx,
  167. [in] IWbemProviderInitSink* pInitSink
  168. );
  169. };
  170. [local, object, uuid(C10B4772-4DA0-11d2-A2F5-00C04F86FB7D)]
  171. interface IWinmgmtMofCompiler : IUnknown
  172. {
  173. HRESULT WinmgmtCompileFile(
  174. [in, string] LPWSTR FileName,
  175. [in, string] LPWSTR ServerAndNamespace,
  176. [in] LONG lOptionFlags, // autocomp, check, etc
  177. [in] LONG lClassFlags,
  178. [in] LONG lInstanceFlags,
  179. [in] IWbemServices * pOverride,
  180. [in] IWbemContext * pCtx,
  181. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  182. );
  183. // lFlags correspond to all the available command-line flags.
  184. HRESULT WinmgmtCompileBuffer(
  185. [in] long BuffSize,
  186. [in, size_is(BuffSize)]BYTE * pBuffer,
  187. [in] LONG lOptionFlags, // autocomp, check, etc
  188. [in] LONG lClassFlags,
  189. [in] LONG lInstanceFlags,
  190. [in] IWbemServices * pOverride,
  191. [in] IWbemContext * pCtx,
  192. [in, out] WBEM_COMPILE_STATUS_INFO * pInfo
  193. );
  194. // lFlags correspond to all the available command-line flags.
  195. };
  196. [local, restricted, object, uuid(49353c93-516b-11d1-aea6-00c04fb68820)]
  197. interface IWbemHiPerfProvider : IUnknown
  198. {
  199. HRESULT QueryInstances(
  200. [in] IWbemServices* pNamespace,
  201. [in, string] WCHAR* wszClass,
  202. [in] long lFlags,
  203. [in] IWbemContext* pCtx,
  204. [in] IWbemObjectSink* pSink // Return IWbemClassObject ptrs
  205. );
  206. HRESULT CreateRefresher(
  207. [in] IWbemServices* pNamespace,
  208. [in] long lFlags,
  209. [out] IWbemRefresher** ppRefresher);
  210. HRESULT CreateRefreshableObject(
  211. [in] IWbemServices* pNamespace,
  212. [in] IWbemObjectAccess* pTemplate,
  213. [in] IWbemRefresher* pRefresher,
  214. [in] long lFlags,
  215. [in] IWbemContext* pContext,
  216. [out] IWbemObjectAccess** ppRefreshable,
  217. [out] long* plId);
  218. HRESULT StopRefreshing(
  219. [in] IWbemRefresher* pRefresher,
  220. [in] long lId,
  221. [in] long lFlags);
  222. HRESULT CreateRefreshableEnum(
  223. [in] IWbemServices* pNamespace,
  224. [in, string] LPCWSTR wszClass,
  225. [in] IWbemRefresher* pRefresher,
  226. [in] long lFlags,
  227. [in] IWbemContext* pContext,
  228. [in] IWbemHiPerfEnum* pHiPerfEnum,
  229. [out] long* plId);
  230. HRESULT GetObjects(
  231. [in] IWbemServices* pNamespace,
  232. [in] long lNumObjects,
  233. [in,out,size_is(lNumObjects)] IWbemObjectAccess** apObj,
  234. [in] long lFlags,
  235. [in] IWbemContext* pContext);
  236. };