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.

239 lines
9.1 KiB

  1. #ifndef __WBEM_POLICY_STATUS__H_
  2. #define __WBEM_POLICY_STATUS__H_
  3. class CPolicyStatus : public CUnk
  4. {
  5. public:
  6. CPolicyStatus(CLifeControl* pControl = NULL, IUnknown* pOuter = NULL)
  7. : CUnk(pControl, pOuter), m_XProvider(this), m_XInit(this),
  8. m_pWMIMgmt(NULL) { }
  9. ~CPolicyStatus() {};
  10. void* GetInterface(REFIID riid);
  11. CComPtr<IWbemServices>& GetWMIServices();
  12. IADsContainer* GetADServices(CComBSTR &pIPDomain, CComBSTR &pADDomain, HRESULT &hres);
  13. bool SetWMIServices(IWbemServices* pServices);
  14. IWbemClassObject* GetStatusClass(HRESULT &hres);
  15. IWbemClassObject* GetStatusInstance(HRESULT &hres);
  16. protected:
  17. class XProvider : public CImpl<IWbemServices, CPolicyStatus>
  18. {
  19. public:
  20. /* construction & de- */
  21. XProvider(CPolicyStatus* pObj)
  22. : CImpl<IWbemServices, CPolicyStatus>(pObj)
  23. { /* this page intentionally left blank */ }
  24. ~XProvider() {};
  25. private:
  26. // NULL until we need it -
  27. // access through GetLocator;
  28. CComPtr<IWbemLocator>
  29. m_pLocator;
  30. /* IWbemServices */
  31. public:
  32. HRESULT STDMETHODCALLTYPE OpenNamespace(
  33. /* [in] */ const BSTR Namespace,
  34. /* [in] */ long lFlags,
  35. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  36. /* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace,
  37. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult)
  38. {return WBEM_E_NOT_SUPPORTED;};
  39. HRESULT STDMETHODCALLTYPE CancelAsyncCall(
  40. /* [in] */ IWbemObjectSink __RPC_FAR *pSink)
  41. {return WBEM_E_NOT_SUPPORTED;};
  42. HRESULT STDMETHODCALLTYPE QueryObjectSink(
  43. /* [in] */ long lFlags,
  44. /* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler)
  45. {return WBEM_E_NOT_SUPPORTED;};
  46. HRESULT STDMETHODCALLTYPE GetObject(
  47. /* [in] */ const BSTR ObjectPath,
  48. /* [in] */ long lFlags,
  49. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  50. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject,
  51. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult)
  52. {return WBEM_E_NOT_SUPPORTED;};
  53. HRESULT STDMETHODCALLTYPE GetObjectAsync(
  54. /* [in] */ const BSTR ObjectPath,
  55. /* [in] */ long lFlags,
  56. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  57. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler);
  58. HRESULT STDMETHODCALLTYPE PutClass(
  59. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  60. /* [in] */ long lFlags,
  61. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  62. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult)
  63. {return WBEM_E_NOT_SUPPORTED;};
  64. HRESULT STDMETHODCALLTYPE PutClassAsync(
  65. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  66. /* [in] */ long lFlags,
  67. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  68. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  69. {return WBEM_E_NOT_SUPPORTED;};
  70. HRESULT STDMETHODCALLTYPE DeleteClass(
  71. /* [in] */ const BSTR Class,
  72. /* [in] */ long lFlags,
  73. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  74. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult)
  75. {return WBEM_E_NOT_SUPPORTED;};
  76. HRESULT STDMETHODCALLTYPE DeleteClassAsync(
  77. /* [in] */ const BSTR Class,
  78. /* [in] */ long lFlags,
  79. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  80. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  81. {return WBEM_E_NOT_SUPPORTED;};
  82. HRESULT STDMETHODCALLTYPE CreateClassEnum(
  83. /* [in] */ const BSTR Superclass,
  84. /* [in] */ long lFlags,
  85. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  86. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum)
  87. {return WBEM_E_NOT_SUPPORTED;};
  88. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync(
  89. /* [in] */ const BSTR Superclass,
  90. /* [in] */ long lFlags,
  91. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  92. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  93. {return WBEM_E_NOT_SUPPORTED;};
  94. HRESULT STDMETHODCALLTYPE PutInstance(
  95. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  96. /* [in] */ long lFlags,
  97. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  98. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult)
  99. {return WBEM_E_NOT_SUPPORTED;};
  100. HRESULT STDMETHODCALLTYPE PutInstanceAsync(
  101. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  102. /* [in] */ long lFlags,
  103. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  104. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  105. {return WBEM_E_NOT_SUPPORTED;};
  106. HRESULT STDMETHODCALLTYPE DeleteInstance(
  107. /* [in] */ const BSTR ObjectPath,
  108. /* [in] */ long lFlags,
  109. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  110. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult)
  111. {return WBEM_E_NOT_SUPPORTED;};
  112. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync(
  113. /* [in] */ const BSTR ObjectPath,
  114. /* [in] */ long lFlags,
  115. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  116. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  117. {return WBEM_E_NOT_SUPPORTED;};
  118. HRESULT STDMETHODCALLTYPE CreateInstanceEnum(
  119. /* [in] */ const BSTR Class,
  120. /* [in] */ long lFlags,
  121. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  122. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum)
  123. {return WBEM_E_NOT_SUPPORTED;};
  124. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync(
  125. /* [in] */ const BSTR Class,
  126. /* [in] */ long lFlags,
  127. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  128. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  129. {return WBEM_E_NOT_SUPPORTED;};
  130. HRESULT STDMETHODCALLTYPE ExecQuery(
  131. /* [in] */ const BSTR QueryLanguage,
  132. /* [in] */ const BSTR Query,
  133. /* [in] */ long lFlags,
  134. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  135. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum)
  136. {return WBEM_E_NOT_SUPPORTED;};
  137. HRESULT STDMETHODCALLTYPE ExecQueryAsync(
  138. /* [in] */ const BSTR QueryLanguage,
  139. /* [in] */ const BSTR Query,
  140. /* [in] */ long lFlags,
  141. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  142. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  143. {return WBEM_E_NOT_SUPPORTED;};
  144. HRESULT STDMETHODCALLTYPE ExecNotificationQuery(
  145. /* [in] */ const BSTR QueryLanguage,
  146. /* [in] */ const BSTR Query,
  147. /* [in] */ long lFlags,
  148. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  149. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum)
  150. {return WBEM_E_NOT_SUPPORTED;};
  151. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync(
  152. /* [in] */ const BSTR QueryLanguage,
  153. /* [in] */ const BSTR Query,
  154. /* [in] */ long lFlags,
  155. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  156. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  157. {return WBEM_E_NOT_SUPPORTED;};
  158. HRESULT STDMETHODCALLTYPE ExecMethod( const BSTR, const BSTR, long, IWbemContext*,
  159. IWbemClassObject*, IWbemClassObject**, IWbemCallResult**)
  160. {return WBEM_E_NOT_SUPPORTED;}
  161. HRESULT STDMETHODCALLTYPE ExecMethodAsync(
  162. /* [in] */ const BSTR strObjectPath,
  163. /* [in] */ const BSTR strMethodName,
  164. /* [in] */ long lFlags,
  165. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  166. /* [in] */ IWbemClassObject __RPC_FAR *pInParams,
  167. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler)
  168. {return WBEM_E_NOT_SUPPORTED;};
  169. } m_XProvider;
  170. friend XProvider;
  171. class XInit : public CImpl<IWbemProviderInit, CPolicyStatus>
  172. {
  173. public:
  174. XInit(CPolicyStatus* pObj)
  175. : CImpl<IWbemProviderInit, CPolicyStatus>(pObj){}
  176. HRESULT STDMETHODCALLTYPE Initialize(
  177. LPWSTR, LONG, LPWSTR, LPWSTR, IWbemServices*, IWbemContext*,
  178. IWbemProviderInitSink*);
  179. } m_XInit;
  180. friend XInit;
  181. private:
  182. // NULL until we need it
  183. CComPtr<IWbemClassObject>
  184. m_pStatusClassObject;
  185. // pointer back to win management
  186. CComPtr<IWbemServices> m_pWMIMgmt;
  187. CComVariant
  188. m_vDsLocalContext;
  189. // a little something to keep our threads from getting tangled
  190. // will use a single critical section to protect all instance variables
  191. CCritSec m_CS;
  192. };
  193. #endif // __WBEM_POLICY_STATUS__H_