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.

73 lines
2.2 KiB

  1. //***************************************************************************
  2. //
  3. // BASE.H
  4. //
  5. // Module: HEALTHMON SERVER AGENT
  6. //
  7. // Purpose: Abstract base class for CSystem, CDataGroup, CDataCollector, CThreshold and CAction
  8. //
  9. // Copyright (c)1999 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. #if !defined( __BASE_H )
  13. #define __BASE_H
  14. //#include <wbemcli.h>
  15. #include <vector>
  16. //#include <iterator>
  17. #include "global.h"
  18. enum HMSTATUS_TYPE {HMSTATUS_SYSTEM, HMSTATUS_DATAGROUP, HMSTATUS_DATACOLLECTOR, HMSTATUS_THRESHOLD, HMSTATUS_ACTION};
  19. typedef struct _tag_HRLStruct
  20. {
  21. LPTSTR szTargetResourceDLL;
  22. HINSTANCE hResLib;
  23. } HRLSTRUCT, *PHRLSTRUCT;
  24. typedef std::vector<HRLSTRUCT, std::allocator<HRLSTRUCT> > HRLLIST;
  25. typedef std::vector<IWbemClassObject*, std::allocator<IWbemClassObject*> > ILIST;
  26. class CBase
  27. {
  28. public:
  29. CBase();
  30. virtual ~CBase();
  31. long m_lCurrState;
  32. // LPTSTR m_szResourceDLL;
  33. LPTSTR m_szName;
  34. LPTSTR m_szGUID;
  35. HMSTATUS_TYPE m_hmStatusType;
  36. //
  37. // STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC STATIC
  38. //
  39. static void CleanupHRLList(void);
  40. static void CleanupEventLists(void);
  41. static void CalcCurrTime(void);
  42. static HRLLIST mg_hrlList;
  43. static ILIST mg_DGEventList;
  44. static ILIST mg_DCEventList;
  45. static ILIST mg_DCPerInstanceEventList;
  46. static ILIST mg_TEventList;
  47. // static ILIST mg_TIEventList;
  48. static ILIST mg_DCStatsEventList;
  49. static ILIST mg_DCStatsInstList;
  50. static TCHAR m_szDTCurrTime[512];
  51. static TCHAR m_szCurrTime[512];
  52. // BOOL fillInResourceHandle(void);
  53. virtual CBase *FindImediateChildByName(LPTSTR pszChildName) = 0;
  54. virtual BOOL GetNextChildName(LPTSTR pszChildName, LPTSTR pszOutName) = 0;
  55. virtual CBase *FindPointerFromName(LPTSTR pszChildName) = 0;
  56. // virtual BOOL ModifyAssocForMove(CBase *pNewParentBase) = 0;
  57. virtual BOOL ReceiveNewChildForMove(CBase *pBase) = 0;
  58. virtual BOOL DeleteChildFromList(LPTSTR pszGUID) = 0;
  59. virtual BOOL SendReminderActionIfStateIsSame(IWbemObjectSink* pActionEventSink, IWbemObjectSink* pActionTriggerEventSink, IWbemClassObject* pActionInstance, IWbemClassObject* pActionTriggerInstance, unsigned long ulTriggerStates) = 0;
  60. virtual HRESULT CheckForBadLoad(void) = 0;
  61. };
  62. #endif // __BASE_H