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.

123 lines
3.1 KiB

  1. #if !defined(AFX_DATAELEMENT_H__D9BF4FA7_F673_11D2_BDC4_0000F87A3912__INCLUDED_)
  2. #define AFX_DATAELEMENT_H__D9BF4FA7_F673_11D2_BDC4_0000F87A3912__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DataElement.h : header file
  7. //
  8. #include "HMObject.h"
  9. #include "HMRuleConfiguration.h"
  10. #include "Rule.h"
  11. #include "DataElementScopeItem.h"
  12. #include "RuleConfigListener.h"
  13. #include "HMDataElementStatus.h"
  14. #include "DataElementStatusListener.h"
  15. #include "DataElementStatsListener.h"
  16. #include "HMDataElementStatistics.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CDataElement command target
  19. class CDataElement : public CHMObject
  20. {
  21. DECLARE_SERIAL(CDataElement)
  22. // Construction/Destruction
  23. public:
  24. // v-marfin 62585 Indicates if this is a brand new collector
  25. //CDataElement();
  26. CDataElement(BOOL bSetStateToEnabledOnOK=FALSE);
  27. virtual ~CDataElement();
  28. // WMI Operations
  29. public:
  30. HRESULT EnumerateChildren();
  31. CString GetObjectPath();
  32. CString GetObjectPathBasedOnTypeGUID();
  33. CString GetStatusObjectPath();
  34. CHMEvent* GetStatusClassObject();
  35. // void DeleteClassObject();
  36. protected:
  37. CRuleConfigListener* m_pRuleListener;
  38. BOOL m_bSetStateToEnabledOnOK; // v-marfin 62585 Indicates if this is a brand new collector
  39. // Clipboard Operations
  40. public:
  41. virtual bool Cut();
  42. virtual bool Copy();
  43. virtual bool Paste();
  44. // v-marfin 62585 Indicates if this is a brand new collector
  45. void SetStateToEnabledOnOK(BOOL bSetStateToEnabledOnOK);
  46. BOOL IsStateSetToEnabledOnOK() {return m_bSetStateToEnabledOnOK;}
  47. // Scope Item Members
  48. public:
  49. virtual CScopePaneItem* CreateScopeItem();
  50. // New Child Creation Members
  51. public:
  52. // v-marfin 62510 : Added default value. Now also returns the created
  53. // rule.
  54. void CreateNewChildRule(BOOL bJustCreateAndReturn=FALSE, CRule** pCreatedRule=NULL, CString sThresholdName="");
  55. // DataElement Type Info
  56. public:
  57. CString GetTypeGuid();
  58. void SetTypeGuid(const CString& sGuid);
  59. int GetType();
  60. void SetType(int iType);
  61. CString GetUITypeName();
  62. protected:
  63. CString m_sTypeGuid;
  64. int m_iType;
  65. // State Members
  66. public:
  67. void UpdateStatus();
  68. // Attributes
  69. public:
  70. // Operations
  71. public:
  72. // Overrides
  73. // ClassWizard generated virtual function overrides
  74. //{{AFX_VIRTUAL(CDataElement)
  75. public:
  76. virtual void OnFinalRelease();
  77. //}}AFX_VIRTUAL
  78. // MFC Implementation
  79. protected:
  80. // Generated message map functions
  81. //{{AFX_MSG(CDataElement)
  82. // NOTE - the ClassWizard will add and remove member functions here.
  83. //}}AFX_MSG
  84. DECLARE_MESSAGE_MAP()
  85. DECLARE_OLECREATE_EX(CDataElement)
  86. // Generated OLE dispatch map functions
  87. //{{AFX_DISPATCH(CDataElement)
  88. // NOTE - the ClassWizard will add and remove member functions here.
  89. //}}AFX_DISPATCH
  90. DECLARE_DISPATCH_MAP()
  91. DECLARE_INTERFACE_MAP()
  92. };
  93. /////////////////////////////////////////////////////////////////////////////
  94. #include "DataElement.inl"
  95. //{{AFX_INSERT_LOCATION}}
  96. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  97. #endif // !defined(AFX_DATAELEMENT_H__D9BF4FA7_F673_11D2_BDC4_0000F87A3912__INCLUDED_)