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.

355 lines
7.5 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvResv.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_ProviderSelfInstrumentation_H
  9. #define _Server_ProviderSelfInstrumentation_H
  10. /******************************************************************************
  11. *
  12. * Name:
  13. *
  14. *
  15. * Description:
  16. *
  17. *
  18. *****************************************************************************/
  19. class CServerObject_IWbemServices : public IWbemServices ,
  20. public IWbemProviderInit,
  21. public IWbemShutdown
  22. {
  23. private:
  24. LONG m_ReferenceCount ; //Object reference count
  25. IWbemServices *m_Service ;
  26. HRESULT Write_Msft_WmiProvider_Counters (
  27. IWbemClassObject *a_Object
  28. ) ;
  29. HRESULT GetObjectAsync_Msft_WmiProvider_Counters (
  30. IWbemPath *a_Path,
  31. BSTR a_Class ,
  32. const BSTR a_ObjectPath,
  33. long a_Flags,
  34. IWbemContext *a_Context,
  35. IWbemObjectSink *a_Sink
  36. ) ;
  37. HRESULT GetObjectAsync_Msft_Providers (
  38. IWbemPath *a_Path,
  39. BSTR a_Class ,
  40. const BSTR a_ObjectPath,
  41. long a_Flags,
  42. IWbemContext *a_Context,
  43. IWbemObjectSink *a_Sink
  44. ) ;
  45. HRESULT CreateInstanceEnumAsync_Msft_WmiProvider_Counters (
  46. const BSTR a_Class,
  47. long a_Flags,
  48. IWbemContext *a_Context,
  49. IWbemObjectSink *a_Sink
  50. ) ;
  51. HRESULT CreateInstanceEnumAsync_Msft_Providers (
  52. const BSTR a_Class,
  53. long a_Flags,
  54. IWbemContext *a_Context,
  55. IWbemObjectSink *a_Sink
  56. ) ;
  57. HRESULT Helper_ExecMethodAsync_Suspend (
  58. IWbemPath *a_Path ,
  59. const BSTR a_ObjectPath,
  60. const BSTR a_MethodName,
  61. long a_Flags,
  62. IWbemContext *a_Context,
  63. IWbemClassObject *a_InParams,
  64. IWbemObjectSink *a_Sink
  65. ) ;
  66. HRESULT Helper_ExecMethodAsync_Resume (
  67. IWbemPath *a_Path ,
  68. const BSTR a_ObjectPath,
  69. const BSTR a_MethodName,
  70. long a_Flags,
  71. IWbemContext *a_Context,
  72. IWbemClassObject *a_InParams,
  73. IWbemObjectSink *a_Sink
  74. ) ;
  75. HRESULT Helper_ExecMethodAsync_UnLoad (
  76. IWbemPath *a_Path ,
  77. const BSTR a_ObjectPath,
  78. const BSTR a_MethodName,
  79. long a_Flags,
  80. IWbemContext *a_Context,
  81. IWbemClassObject *a_InParams,
  82. IWbemObjectSink *a_Sink
  83. ) ;
  84. HRESULT Helper_ExecMethodAsync_Load (
  85. IWbemPath *a_Path ,
  86. const BSTR a_ObjectPath,
  87. const BSTR a_MethodName,
  88. long a_Flags,
  89. IWbemContext *a_Context,
  90. IWbemClassObject *a_InParams,
  91. IWbemObjectSink *a_Sink
  92. ) ;
  93. public:
  94. CServerObject_IWbemServices (
  95. WmiAllocator &a_Allocator
  96. ) ;
  97. ~CServerObject_IWbemServices () ;
  98. public:
  99. //Non-delegating object IUnknown
  100. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  101. STDMETHODIMP_( ULONG ) AddRef () ;
  102. STDMETHODIMP_( ULONG ) Release () ;
  103. /* IWbemServices methods */
  104. HRESULT STDMETHODCALLTYPE OpenNamespace (
  105. const BSTR a_Namespace ,
  106. long a_Flags ,
  107. IWbemContext *a_Context ,
  108. IWbemServices **a_Service ,
  109. IWbemCallResult **a_CallResult
  110. ) ;
  111. HRESULT STDMETHODCALLTYPE CancelAsyncCall (
  112. IWbemObjectSink *a_Sink
  113. ) ;
  114. HRESULT STDMETHODCALLTYPE QueryObjectSink (
  115. long a_Flags ,
  116. IWbemObjectSink **a_Sink
  117. ) ;
  118. HRESULT STDMETHODCALLTYPE GetObject (
  119. const BSTR a_ObjectPath ,
  120. long a_Flags ,
  121. IWbemContext *a_Context ,
  122. IWbemClassObject **ppObject ,
  123. IWbemCallResult **a_CallResult
  124. ) ;
  125. HRESULT STDMETHODCALLTYPE GetObjectAsync (
  126. const BSTR a_ObjectPath ,
  127. long a_Flags ,
  128. IWbemContext *a_Context ,
  129. IWbemObjectSink *a_Sink
  130. ) ;
  131. HRESULT STDMETHODCALLTYPE PutClass (
  132. IWbemClassObject *a_Object ,
  133. long a_Flags ,
  134. IWbemContext *a_Context ,
  135. IWbemCallResult **a_CallResult
  136. ) ;
  137. HRESULT STDMETHODCALLTYPE PutClassAsync (
  138. IWbemClassObject *a_Object ,
  139. long a_Flags ,
  140. IWbemContext *a_Context ,
  141. IWbemObjectSink *a_Sink
  142. ) ;
  143. HRESULT STDMETHODCALLTYPE DeleteClass (
  144. const BSTR a_Class ,
  145. long a_Flags ,
  146. IWbemContext *a_Context ,
  147. IWbemCallResult **a_CallResult
  148. ) ;
  149. HRESULT STDMETHODCALLTYPE DeleteClassAsync (
  150. const BSTR a_Class ,
  151. long a_Flags ,
  152. IWbemContext *a_Context ,
  153. IWbemObjectSink *a_Sink
  154. ) ;
  155. HRESULT STDMETHODCALLTYPE CreateClassEnum (
  156. const BSTR a_Superclass ,
  157. long a_Flags ,
  158. IWbemContext *a_Context ,
  159. IEnumWbemClassObject **a_Enum
  160. ) ;
  161. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync (
  162. const BSTR a_Superclass ,
  163. long a_Flags ,
  164. IWbemContext *a_Context ,
  165. IWbemObjectSink *a_Sink
  166. ) ;
  167. HRESULT STDMETHODCALLTYPE PutInstance (
  168. IWbemClassObject *a_Instance ,
  169. long a_Flags ,
  170. IWbemContext *a_Context ,
  171. IWbemCallResult **a_CallResult
  172. ) ;
  173. HRESULT STDMETHODCALLTYPE PutInstanceAsync (
  174. IWbemClassObject *a_Instance ,
  175. long a_Flags ,
  176. IWbemContext *a_Context ,
  177. IWbemObjectSink *a_Sink
  178. ) ;
  179. HRESULT STDMETHODCALLTYPE DeleteInstance (
  180. const BSTR a_ObjectPath ,
  181. long a_Flags ,
  182. IWbemContext *a_Context ,
  183. IWbemCallResult **a_CallResult
  184. ) ;
  185. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync (
  186. const BSTR a_ObjectPath,
  187. long a_Flags,
  188. IWbemContext *a_Context ,
  189. IWbemObjectSink *a_Sink
  190. ) ;
  191. HRESULT STDMETHODCALLTYPE CreateInstanceEnum (
  192. const BSTR a_Class ,
  193. long a_Flags ,
  194. IWbemContext *a_Context ,
  195. IEnumWbemClassObject **a_Enum
  196. ) ;
  197. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync (
  198. const BSTR a_Class ,
  199. long a_Flags ,
  200. IWbemContext *a_Context ,
  201. IWbemObjectSink *a_Sink
  202. ) ;
  203. HRESULT STDMETHODCALLTYPE ExecQuery (
  204. const BSTR a_QueryLanguage,
  205. const BSTR a_Query,
  206. long a_Flags ,
  207. IWbemContext *a_Context ,
  208. IEnumWbemClassObject **a_Enum
  209. ) ;
  210. HRESULT STDMETHODCALLTYPE ExecQueryAsync (
  211. const BSTR a_QueryLanguage ,
  212. const BSTR a_Query ,
  213. long a_Flags ,
  214. IWbemContext *a_Context ,
  215. IWbemObjectSink *a_Sink
  216. ) ;
  217. HRESULT STDMETHODCALLTYPE ExecNotificationQuery (
  218. const BSTR a_QueryLanguage ,
  219. const BSTR a_Query ,
  220. long a_Flags ,
  221. IWbemContext *a_Context ,
  222. IEnumWbemClassObject **a_Enum
  223. ) ;
  224. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync (
  225. const BSTR a_QueryLanguage ,
  226. const BSTR a_Query ,
  227. long a_Flags ,
  228. IWbemContext *a_Context ,
  229. IWbemObjectSink *a_Sink
  230. ) ;
  231. HRESULT STDMETHODCALLTYPE ExecMethod (
  232. const BSTR a_ObjectPath ,
  233. const BSTR a_MethodName ,
  234. long a_Flags ,
  235. IWbemContext *a_Context ,
  236. IWbemClassObject *a_InParams ,
  237. IWbemClassObject **a_OutParams ,
  238. IWbemCallResult **a_CallResult
  239. ) ;
  240. HRESULT STDMETHODCALLTYPE ExecMethodAsync (
  241. const BSTR a_ObjectPath ,
  242. const BSTR a_MethodName ,
  243. long a_Flags ,
  244. IWbemContext *a_Context ,
  245. IWbemClassObject *a_InParams ,
  246. IWbemObjectSink *a_Sink
  247. ) ;
  248. /* IWbemProviderInit methods */
  249. HRESULT STDMETHODCALLTYPE Initialize (
  250. LPWSTR a_User ,
  251. LONG a_Flags ,
  252. LPWSTR a_Namespace ,
  253. LPWSTR a_Locale ,
  254. IWbemServices *a_Core ,
  255. IWbemContext *a_Context ,
  256. IWbemProviderInitSink *a_Sink
  257. ) ;
  258. HRESULT STDMETHODCALLTYPE Shutdown (
  259. LONG a_Flags ,
  260. ULONG a_MaxMilliSeconds ,
  261. IWbemContext *a_Context
  262. ) ;
  263. } ;
  264. #endif // _Server_ProviderSelfInstrumentation_H