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.

256 lines
6.6 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. };
  57. #define OPTIONAL in, unique
  58. [restricted, object, uuid(e246107b-b06e-11d0-ad61-00c04fd8fdff)]
  59. interface IWbemUnboundObjectSink : IUnknown
  60. {
  61. HRESULT IndicateToConsumer(
  62. [in] IWbemClassObject* pLogicalConsumer,
  63. [in] long lNumObjects,
  64. [in, size_is(lNumObjects)] IWbemClassObject** apObjects);
  65. };
  66. /////////////////////////////////////////////////////////////////
  67. //
  68. //
  69. [restricted, object, local, uuid(CE61E841-65BC-11d0-B6BD-00AA003240C7)]
  70. interface IWbemPropertyProvider : IUnknown
  71. {
  72. HRESULT GetProperty(
  73. [in] long lFlags,
  74. [in] const BSTR strLocale,
  75. [in] const BSTR strClassMapping,
  76. [in] const BSTR strInstMapping,
  77. [in] const BSTR strPropMapping,
  78. [out] VARIANT* pvValue
  79. );
  80. HRESULT PutProperty(
  81. [in] long lFlags,
  82. [in] const BSTR strLocale,
  83. [in] const BSTR strClassMapping,
  84. [in] const BSTR strInstMapping,
  85. [in] const BSTR strPropMapping,
  86. [in] const VARIANT* pvValue
  87. );
  88. };
  89. [restricted, object, uuid(e245105b-b06e-11d0-ad61-00c04fd8fdff)]
  90. interface IWbemEventProvider : IUnknown
  91. {
  92. HRESULT ProvideEvents(
  93. [in] IWbemObjectSink* pSink,
  94. [in] long lFlags
  95. );
  96. };
  97. [restricted, object, uuid(580acaf8-fa1c-11d0-ad72-00c04fd8fdff)]
  98. interface IWbemEventProviderQuerySink : IUnknown
  99. {
  100. HRESULT NewQuery(
  101. [in] unsigned long dwId,
  102. [in] WBEM_WSTR wszQueryLanguage,
  103. [in] WBEM_WSTR wszQuery
  104. );
  105. HRESULT CancelQuery(
  106. [in] unsigned long dwId);
  107. };
  108. [restricted, object, uuid(631f7d96-d993-11d2-b339-00105a1f4aaf)]
  109. interface IWbemEventProviderSecurity : IUnknown
  110. {
  111. HRESULT AccessCheck(
  112. [in] WBEM_CWSTR wszQueryLanguage,
  113. [in] WBEM_CWSTR wszQuery,
  114. [in] long lSidLength,
  115. [in, size_is(lSidLength), unique] const BYTE* pSid);
  116. };
  117. [restricted, object, uuid(631f7d97-d993-11d2-b339-00105a1f4aaf)]
  118. interface IWbemProviderIdentity : IUnknown
  119. {
  120. HRESULT SetRegistrationObject(
  121. [in] long lFlags,
  122. [in] IWbemClassObject* pProvReg);
  123. };
  124. [restricted, object, uuid(e246107a-b06e-11d0-ad61-00c04fd8fdff)]
  125. interface IWbemEventConsumerProvider : IUnknown
  126. {
  127. HRESULT FindConsumer(
  128. [in] IWbemClassObject* pLogicalConsumer,
  129. [out] IWbemUnboundObjectSink** ppConsumer);
  130. };
  131. typedef enum tag_WBEM_EXTRA_RETURN_CODES
  132. {
  133. WBEM_S_INITIALIZED = 0,
  134. WBEM_S_LIMITED_SERVICE = 0x43001,
  135. WBEM_S_INDIRECTLY_UPDATED,
  136. WBEM_E_RETRY_LATER = 0x80043001,
  137. WBEM_E_RESOURCE_CONTENTION,
  138. } WBEM_EXTRA_RETURN_CODES;
  139. typedef enum tag_WBEM_PROVIDER_FLAGS
  140. {
  141. WBEM_FLAG_OWNER_UPDATE = 0x10000,
  142. } WBEM_PROVIDER_FLAGS;
  143. [object, uuid(1be41571-91dd-11d1-aeb2-00c04fb68820)]
  144. interface IWbemProviderInitSink : IUnknown
  145. {
  146. HRESULT SetStatus(
  147. [in] LONG lStatus,
  148. [in] LONG lFlags
  149. );
  150. };
  151. [object, uuid(1be41572-91dd-11d1-aeb2-00c04fb68820)]
  152. interface IWbemProviderInit : IUnknown
  153. {
  154. HRESULT Initialize(
  155. [in, unique, string] LPWSTR wszUser,
  156. [in] LONG lFlags,
  157. [in, string] LPWSTR wszNamespace,
  158. [in, unique, string] LPWSTR wszLocale,
  159. [in] IWbemServices* pNamespace,
  160. [in] IWbemContext* pCtx,
  161. [in] IWbemProviderInitSink* pInitSink
  162. );
  163. };
  164. [local, restricted, object, uuid(49353c93-516b-11d1-aea6-00c04fb68820)]
  165. interface IWbemHiPerfProvider : IUnknown
  166. {
  167. HRESULT QueryInstances(
  168. [in] IWbemServices* pNamespace,
  169. [in, string] WCHAR* wszClass,
  170. [in] long lFlags,
  171. [in] IWbemContext* pCtx,
  172. [in] IWbemObjectSink* pSink // Return IWbemClassObject ptrs
  173. );
  174. HRESULT CreateRefresher(
  175. [in] IWbemServices* pNamespace,
  176. [in] long lFlags,
  177. [out] IWbemRefresher** ppRefresher);
  178. HRESULT CreateRefreshableObject(
  179. [in] IWbemServices* pNamespace,
  180. [in] IWbemObjectAccess* pTemplate,
  181. [in] IWbemRefresher* pRefresher,
  182. [in] long lFlags,
  183. [in] IWbemContext* pContext,
  184. [out] IWbemObjectAccess** ppRefreshable,
  185. [out] long* plId);
  186. HRESULT StopRefreshing(
  187. [in] IWbemRefresher* pRefresher,
  188. [in] long lId,
  189. [in] long lFlags);
  190. HRESULT CreateRefreshableEnum(
  191. [in] IWbemServices* pNamespace,
  192. [in, string] LPCWSTR wszClass,
  193. [in] IWbemRefresher* pRefresher,
  194. [in] long lFlags,
  195. [in] IWbemContext* pContext,
  196. [in] IWbemHiPerfEnum* pHiPerfEnum,
  197. [out] long* plId);
  198. HRESULT GetObjects(
  199. [in] IWbemServices* pNamespace,
  200. [in] long lNumObjects,
  201. [in,out,size_is(lNumObjects)] IWbemObjectAccess** apObj,
  202. [in] long lFlags,
  203. [in] IWbemContext* pContext);
  204. };