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.

169 lines
3.4 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvWsv.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_EventProvider_H
  9. #define _Server_EventProvider_H
  10. #include "Globals.h"
  11. #include "CGlobals.h"
  12. class CServerObject_ProviderEvents ;
  13. /******************************************************************************
  14. *
  15. * Name:
  16. *
  17. *
  18. * Description:
  19. *
  20. *
  21. *****************************************************************************/
  22. class CEventProvider : public IWbemEventProvider ,
  23. public IWbemEventProviderQuerySink ,
  24. public IWbemEventProviderSecurity ,
  25. public IWbemProviderIdentity ,
  26. public IWbemEventConsumerProviderEx ,
  27. public IWbemProviderInit ,
  28. public IWbemShutdown
  29. {
  30. private:
  31. LONG m_ReferenceCount ;
  32. CriticalSection m_CriticalSection ;
  33. IUnknown *m_Unknown ;
  34. IWbemEventProvider *m_Provider_IWbemEventProvider ;
  35. IWbemEventProviderQuerySink *m_Provider_IWbemEventProviderQuerySink ;
  36. IWbemEventProviderSecurity *m_Provider_IWbemEventProviderSecurity ;
  37. IWbemProviderIdentity *m_Provider_IWbemProviderIdentity ;
  38. IWbemEventConsumerProvider *m_Provider_IWbemEventConsumerProvider ;
  39. IWbemEventConsumerProviderEx *m_Provider_IWbemEventConsumerProviderEx ;
  40. IWbemServices *m_CoreService ;
  41. IUnknown *m_Provider ;
  42. CServerObject_ProviderEvents *m_EventRegistrar ;
  43. public:
  44. BSTR m_Locale ;
  45. BSTR m_User ;
  46. BSTR m_Namespace ;
  47. private:
  48. public:
  49. CEventProvider (
  50. WmiAllocator &a_Allocator ,
  51. CServerObject_ProviderEvents *a_EventRegistrar ,
  52. IUnknown *a_Unknown
  53. ) ;
  54. ~CEventProvider () ;
  55. HRESULT Initialize () ;
  56. HRESULT UnRegister () ;
  57. public:
  58. //Non-delegating object IUnknown
  59. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  60. STDMETHODIMP_( ULONG ) AddRef () ;
  61. STDMETHODIMP_( ULONG ) Release () ;
  62. /* IWbemEventProvider */
  63. HRESULT STDMETHODCALLTYPE ProvideEvents (
  64. IWbemObjectSink *a_Sink ,
  65. long a_Flags
  66. ) ;
  67. /* IWbemEventProviderQuerySink */
  68. HRESULT STDMETHODCALLTYPE NewQuery (
  69. unsigned long a_Id ,
  70. WBEM_WSTR a_QueryLanguage ,
  71. WBEM_WSTR a_Query
  72. );
  73. HRESULT STDMETHODCALLTYPE CancelQuery (
  74. unsigned long a_Id
  75. ) ;
  76. /* IWbemEventProviderSecurity */
  77. HRESULT STDMETHODCALLTYPE AccessCheck (
  78. WBEM_CWSTR a_QueryLanguage ,
  79. WBEM_CWSTR a_Query ,
  80. long a_SidLength ,
  81. const BYTE *a_Sid
  82. ) ;
  83. /* IWbemProviderIdentity */
  84. HRESULT STDMETHODCALLTYPE SetRegistrationObject (
  85. long a_Flags ,
  86. IWbemClassObject *a_ProviderRegistration
  87. ) ;
  88. /* IWbemEventConsumerProvider */
  89. HRESULT STDMETHODCALLTYPE FindConsumer (
  90. IWbemClassObject *a_LogicalConsumer ,
  91. IWbemUnboundObjectSink **a_Consumer
  92. );
  93. /* IWbemEventConsumerProviderEx */
  94. HRESULT STDMETHODCALLTYPE ValidateSubscription (
  95. IWbemClassObject *a_LogicalConsumer
  96. ) ;
  97. /* IWbemProviderInit methods */
  98. HRESULT STDMETHODCALLTYPE Initialize (
  99. LPWSTR a_User,
  100. LONG a_Flags,
  101. LPWSTR a_Namespace,
  102. LPWSTR a_Locale,
  103. IWbemServices *a_CoreService, // For anybody
  104. IWbemContext *a_Context,
  105. IWbemProviderInitSink *a_Sink // For init signals
  106. ) ;
  107. // IWbemShutdown members
  108. HRESULT STDMETHODCALLTYPE Shutdown (
  109. LONG a_Flags ,
  110. ULONG a_MaxMilliSeconds ,
  111. IWbemContext *a_Context
  112. ) ;
  113. } ;
  114. #endif // _Server_EventProvider_H