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.

117 lines
3.7 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. FltrNode.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _LOGDATA_NODE_H
  10. #define _LOGDATA_NODE_H
  11. #ifndef _IPSMHAND_H
  12. #include "ipsmhand.h"
  13. #endif
  14. #ifndef _SPDDB_H
  15. #include "spddb.h"
  16. #endif
  17. /*
  18. This value indicates the size in bytes of each summary at the maximum. It
  19. must mirror the value in layer2svc\monitor\inc\database.h
  20. */
  21. #define MAX_SUMMARY_MESSAGE_SIZE 80
  22. /*---------------------------------------------------------------------------
  23. Class: CFilterHandler
  24. ---------------------------------------------------------------------------*/
  25. class CLogDataHandler : public CIpsmHandler
  26. {
  27. public:
  28. CLogDataHandler(ITFSComponentData* pTFSComponentData);
  29. virtual ~CLogDataHandler();
  30. // Interface
  31. public:
  32. // base handler functionality we override
  33. OVERRIDE_NodeHandler_HasPropertyPages();
  34. OVERRIDE_NodeHandler_CreatePropertyPages();
  35. OVERRIDE_NodeHandler_OnAddMenuItems();
  36. OVERRIDE_NodeHandler_OnCommand();
  37. OVERRIDE_NodeHandler_GetString()
  38. { return (nCol == 0) ? GetDisplayName() : NULL; }
  39. // Base handler notifications we handle
  40. OVERRIDE_BaseHandlerNotify_OnExpand();
  41. OVERRIDE_BaseHandlerNotify_OnDelete();
  42. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  43. // Result handler functionality we override
  44. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  45. OVERRIDE_BaseResultHandlerNotify_OnResultUpdateView();
  46. OVERRIDE_BaseResultHandlerNotify_OnResultColumnClick();
  47. OVERRIDE_ResultHandler_OnGetResultViewType();
  48. OVERRIDE_ResultHandler_GetVirtualString();
  49. OVERRIDE_ResultHandler_GetVirtualImage();
  50. OVERRIDE_ResultHandler_AddMenuItems();
  51. OVERRIDE_ResultHandler_Command();
  52. OVERRIDE_ResultHandler_HasPropertyPages();
  53. OVERRIDE_ResultHandler_CreatePropertyPages();
  54. OVERRIDE_ResultHandler_SortItems();
  55. STDMETHODIMP CacheHint(int nStartIndex, int nEndIndex);
  56. /*
  57. STDMETHODIMP SortItems(int nColumn,
  58. DWORD dwSortOptions,
  59. LPARAM lUserParam);
  60. */
  61. // base handler overrides
  62. virtual HRESULT LoadColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  63. // CHandler overridden
  64. virtual HRESULT OnRefresh(ITFSNode *, LPDATAOBJECT, DWORD, LPARAM, LPARAM);
  65. // multi select support
  66. virtual const GUID * GetVirtualGuid(int nIndex)
  67. {
  68. return &GUID_IpfmLogDataNodeType;
  69. }
  70. public:
  71. // CMTIpsmHandler functionality
  72. virtual HRESULT InitializeNode(ITFSNode * pNode);
  73. virtual int GetImageIndex(BOOL bOpenImage);
  74. ITFSQueryObject* OnCreateQuery(ITFSNode * pNode);
  75. public:
  76. // implementation specific
  77. HRESULT InitData(ISpdInfo * pSpdInfo);
  78. HRESULT UpdateStatus(ITFSNode * pNode);
  79. // Implementation
  80. private:
  81. // Command handlers
  82. HRESULT OnDelete(ITFSNode * pNode);
  83. //HRESULT UpdateViewType(ITFSNode * pNode, FILTER_TYPE NewFltrType);
  84. HRESULT GetSelectedItem(int *pnIndex, CLogDataInfo *pLogData,
  85. IResultData *pResultData);
  86. HRESULT GetSelectedItemState(UINT *puiState, IResultData *pResultData);
  87. HRESULT MaintainSelection();
  88. private:
  89. SPISpdInfo m_spSpdInfo;
  90. int m_nSelIndex; //Virtual index of selected item
  91. CLogDataInfo m_SelLogData; //The selected item
  92. ITFSComponent *m_pComponent;
  93. };
  94. #endif _LOGDATA_NODE_H