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.

63 lines
1.4 KiB

  1. /*++
  2. Copyright (C) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. //////////////////////////////////////////////////////////////////////
  8. //
  9. // Refresher.h
  10. //
  11. // CRefresher is a wrapper class for IWbemRefresher and
  12. // IWbemConfigureRefresher. It uses a two phase initialization
  13. // to create the refresher and refresher manager.
  14. //
  15. //////////////////////////////////////////////////////////////////////
  16. #ifndef _REFRESHER_H_
  17. #define _REFRESHER_H_
  18. #include "HiPerStress.h"
  19. #include "Object.h"
  20. #include "arrtempl.h"
  21. class CRefresher
  22. {
  23. IWbemRefresher *m_pRef; // WBEM refresher pointer
  24. IWbemConfigureRefresher *m_pCfg; // WBEM refresher mgr pointer
  25. CUniquePointerArray<CInstance> m_apObj; // Array of refresher's objects
  26. CUniquePointerArray<CRefresher> m_apRef; // Array of child refreshers
  27. long m_lID; // Parent refresher ID
  28. LONG m_lRefCount; // Number of Refs Rec'd
  29. public:
  30. CRefresher();
  31. virtual ~CRefresher();
  32. BOOL Create();
  33. BOOL AddObject(WCHAR *wcsNameSpace, WCHAR *wcsName);
  34. BOOL RemoveObject(int nIndex);
  35. int GetNumObjects() {return m_apObj.GetSize();}
  36. BOOL AddRefresher(CRefresher *pRef);
  37. BOOL RemoveRefresher(int nIndex);
  38. int GetNumRefreshers() {return m_apRef.GetSize();}
  39. BOOL Refresh();
  40. long GetID(){return m_lID;}
  41. void DumpTree(const WCHAR *wcsPrefix = L"");
  42. void DumpStats();
  43. };
  44. #endif // _REFRESHER_H_