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.

180 lines
5.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 2002 **/
  4. /**********************************************************************/
  5. /*
  6. Stats.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _IKESTATS_H
  10. #define _IKESTATS_H
  11. #ifndef _IPSMHAND_H
  12. #include "ipsmhand.h"
  13. #endif
  14. #ifndef _SPDDB_H
  15. #include "spddb.h"
  16. #endif
  17. /*---------------------------------------------------------------------------
  18. Class: CIkeStatsHandler
  19. ---------------------------------------------------------------------------*/
  20. class CIkeStatsHandler : public CIpsmHandler
  21. {
  22. public:
  23. CIkeStatsHandler(ITFSComponentData* pTFSComponentData);
  24. virtual ~CIkeStatsHandler();
  25. // Interface
  26. public:
  27. // base handler functionality we override
  28. OVERRIDE_NodeHandler_HasPropertyPages();
  29. OVERRIDE_NodeHandler_CreatePropertyPages();
  30. OVERRIDE_NodeHandler_OnAddMenuItems();
  31. OVERRIDE_NodeHandler_OnCommand();
  32. OVERRIDE_NodeHandler_GetString()
  33. { return (nCol == 0) ? GetDisplayName() : NULL; }
  34. // Base handler notifications we handle
  35. OVERRIDE_BaseHandlerNotify_OnExpand();
  36. OVERRIDE_BaseHandlerNotify_OnDelete();
  37. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  38. // Result handler functionality we override
  39. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  40. OVERRIDE_BaseResultHandlerNotify_OnResultUpdateView();
  41. OVERRIDE_ResultHandler_OnGetResultViewType();
  42. OVERRIDE_ResultHandler_GetVirtualString();
  43. OVERRIDE_ResultHandler_GetVirtualImage();
  44. OVERRIDE_ResultHandler_AddMenuItems();
  45. OVERRIDE_ResultHandler_Command();
  46. OVERRIDE_ResultHandler_HasPropertyPages();
  47. OVERRIDE_ResultHandler_CreatePropertyPages();
  48. STDMETHODIMP CacheHint(int nStartIndex, int nEndIndex);
  49. /*STDMETHODIMP SortItems(int nColumn,
  50. DWORD dwSortOptions,
  51. LPARAM lUserParam);*/
  52. // base handler overrides
  53. virtual HRESULT LoadColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  54. // CHandler overridden
  55. virtual HRESULT OnRefresh(ITFSNode *, LPDATAOBJECT, DWORD, LPARAM, LPARAM);
  56. // multi select support
  57. virtual const GUID * GetVirtualGuid(int nIndex)
  58. {
  59. return &GUID_IpsmMmIkeStatsNodeType;
  60. }
  61. public:
  62. // CMTIpsmHandler functionality
  63. virtual HRESULT InitializeNode(ITFSNode * pNode);
  64. virtual int GetImageIndex(BOOL bOpenImage);
  65. ITFSQueryObject* OnCreateQuery(ITFSNode * pNode);
  66. public:
  67. // implementation specific
  68. HRESULT InitData(ISpdInfo * pSpdInfo);
  69. HRESULT UpdateStatus(ITFSNode * pNode);
  70. CIkeStatistics m_IkeStats;
  71. // Implementation
  72. private:
  73. // Command handlers
  74. HRESULT OnDelete(ITFSNode * pNode);
  75. private:
  76. SPISpdInfo m_spSpdInfo;
  77. //CIkeStatistics m_IkeStats;
  78. //CIpsecStatistics mIpsecStats;
  79. };
  80. /*---------------------------------------------------------------------------
  81. Class: CIpsecStatsHandler
  82. ---------------------------------------------------------------------------*/
  83. class CIpsecStatsHandler : public CIpsmHandler
  84. {
  85. public:
  86. CIpsecStatsHandler(ITFSComponentData* pTFSComponentData);
  87. virtual ~CIpsecStatsHandler();
  88. // Interface
  89. public:
  90. // base handler functionality we override
  91. OVERRIDE_NodeHandler_HasPropertyPages();
  92. OVERRIDE_NodeHandler_CreatePropertyPages();
  93. OVERRIDE_NodeHandler_OnAddMenuItems();
  94. OVERRIDE_NodeHandler_OnCommand();
  95. OVERRIDE_NodeHandler_GetString()
  96. { return (nCol == 0) ? GetDisplayName() : NULL; }
  97. // Base handler notifications we handle
  98. OVERRIDE_BaseHandlerNotify_OnExpand();
  99. OVERRIDE_BaseHandlerNotify_OnDelete();
  100. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  101. // Result handler functionality we override
  102. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  103. OVERRIDE_BaseResultHandlerNotify_OnResultUpdateView();
  104. OVERRIDE_ResultHandler_OnGetResultViewType();
  105. OVERRIDE_ResultHandler_GetVirtualString();
  106. OVERRIDE_ResultHandler_GetVirtualImage();
  107. OVERRIDE_ResultHandler_AddMenuItems();
  108. OVERRIDE_ResultHandler_Command();
  109. OVERRIDE_ResultHandler_HasPropertyPages();
  110. OVERRIDE_ResultHandler_CreatePropertyPages();
  111. STDMETHODIMP CacheHint(int nStartIndex, int nEndIndex);
  112. /*STDMETHODIMP SortItems(int nColumn,
  113. DWORD dwSortOptions,
  114. LPARAM lUserParam);*/
  115. // base handler overrides
  116. virtual HRESULT LoadColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  117. // CHandler overridden
  118. virtual HRESULT OnRefresh(ITFSNode *, LPDATAOBJECT, DWORD, LPARAM, LPARAM);
  119. // multi select support
  120. virtual const GUID * GetVirtualGuid(int nIndex)
  121. {
  122. return &GUID_IpsmMmIpsecStatsNodeType;
  123. }
  124. public:
  125. // CMTIpsmHandler functionality
  126. virtual HRESULT InitializeNode(ITFSNode * pNode);
  127. virtual int GetImageIndex(BOOL bOpenImage);
  128. ITFSQueryObject* OnCreateQuery(ITFSNode * pNode);
  129. public:
  130. // implementation specific
  131. HRESULT InitData(ISpdInfo * pSpdInfo);
  132. HRESULT UpdateStatus(ITFSNode * pNode);
  133. CIpsecStatistics m_IpsecStats;
  134. // Implementation
  135. private:
  136. // Command handlers
  137. HRESULT OnDelete(ITFSNode * pNode);
  138. private:
  139. SPISpdInfo m_spSpdInfo;
  140. //CIkeStatistics m_IkeStats;
  141. //CIpsecStatistics mIpsecStats;
  142. };
  143. #endif _IKESTATS_H