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.

53 lines
1.7 KiB

  1. //***************************************************************************
  2. //
  3. // Copyright � Microsoft Corporation. All rights reserved.
  4. //
  5. // EventProvider.H
  6. //
  7. // Purpose: Definition of EventProvider class
  8. //
  9. //***************************************************************************
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #ifndef _EVENT_PROVIDER_COMPILED_
  14. #define _EVENT_PROVIDER_COMPILED_
  15. #ifdef EVENT_PROVIDER_ENABLED
  16. #include "Provider.h"
  17. // class EventProvider
  18. // Encapsulation of the IWbemEventProvider interfaces
  19. class EventProvider : public Provider
  20. {
  21. public:
  22. EventProvider( const CHString& setName, LPCWSTR pszNameSpace = NULL );
  23. ~EventProvider( void );
  24. virtual HRESULT ProvideEvents(MethodContext *pContext, long lFlags = 0L ) =0;
  25. // functions much like EnumerateInstances in Provider
  26. // use CreateNewInstance to create event instance
  27. // use Commit to send it on its merry way
  28. // overrides of the base class' pure virtuals, return WBEM_E_PROVIDER_NOT_CAPABLE
  29. // logic is that an event provider will not want to support them in the general case
  30. virtual HRESULT GetObject(CInstance *pInstance, long lFlags = 0L);
  31. virtual HRESULT EnumerateInstances(MethodContext *pMethodContext, long lFlags = 0L);
  32. // entry point for the framework's use. Do not override.
  33. HRESULT KickoffEvents( MethodContext *pContext, long lFlags =0L );
  34. protected:
  35. // flag validation
  36. virtual HRESULT ValidateProvideEventsFlags(long lFlags);
  37. virtual HRESULT ValidateQueryEventsFlags(long lFlags);
  38. private:
  39. };
  40. #endif //EVENT_PROVIDER_ENABLED
  41. #endif //_EVENT_PROVIDER_COMPILED_