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.

292 lines
7.9 KiB

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