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.

93 lines
2.4 KiB

  1. // HMRuleConfiguration.h: interface for the CHMRuleConfiguration class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_HMRULECONFIGURATION_H__B0D24258_F80C_11D2_BDC8_0000F87A3912__INCLUDED_)
  5. #define AFX_HMRULECONFIGURATION_H__B0D24258_F80C_11D2_BDC8_0000F87A3912__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "WbemClassObject.h"
  10. class CHMRuleConfiguration : public CWbemClassObject
  11. {
  12. DECLARE_DYNCREATE(CHMRuleConfiguration)
  13. // Construction/Destruction
  14. public:
  15. CHMRuleConfiguration();
  16. virtual ~CHMRuleConfiguration();
  17. // Create
  18. public:
  19. HRESULT Create(const CString& sMachineName);
  20. HRESULT Create(IWbemClassObject* pObject);
  21. // Enumeration Operations
  22. public:
  23. HRESULT EnumerateObjects(ULONG& uReturned); // rentrant...continue to call until uReturned == 0
  24. // Property Retreival Operations
  25. public:
  26. HRESULT GetAllProperties();
  27. HRESULT SaveEnabledProperty();
  28. HRESULT SaveAllProperties();
  29. HRESULT SaveAllExpressionProperties();
  30. // HMRuleConfiguration Attributes
  31. public:
  32. CString m_sGUID; // Unique identifier
  33. CString m_sName; // Display name
  34. CString m_sDescription; // Description
  35. int m_iID; // User viewable ID that shows up in the event so user
  36. // can query/filter for them instead of by string.
  37. CString m_sPropertyName;// What property to look at from the parent instance
  38. // It all comes down to this. This is the value we
  39. // get each sampling interval. It is used to keep
  40. // the current, min, max and avg values.
  41. int m_iUseFlag;
  42. int m_iRuleCondition; // The condition to use for the Rule.
  43. CString m_sRuleCondition;
  44. CString m_sRuleValue; // Value to use for Rule.
  45. int m_iRuleDuration;// How long the value must remain. In
  46. int m_iState;// The state we transition to if cross Rule.
  47. CString m_sState;
  48. CString m_sCreationDate; // Time of origional creation
  49. CString m_sLastUpdate; // Time of last change
  50. CString m_sMessage; // What gets sent to the event. Can contain special
  51. int m_iActiveDays; // Days of the week it is active. One bit per day.
  52. int m_iBeginHourTime; // Hour (24hr) to activate (if day is active). e.g. 9 for 9AM
  53. int m_iBeginMinuteTime;
  54. int m_iEndHourTime; // Hour (24hr) to inactivate. e.g. 1350
  55. int m_iEndMinuteTime;
  56. bool m_bEnable;
  57. };
  58. typedef CTypedPtrArray<CObArray,CHMRuleConfiguration*> RuleArray;
  59. #endif // !defined(AFX_HMRULECONFIGURATION_H__B0D24258_F80C_11D2_BDC8_0000F87A3912__INCLUDED_)