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.

124 lines
3.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. ipface.h
  7. Interface administration
  8. FILE HISTORY:
  9. */
  10. #ifndef _MSTATUS_H
  11. #define _MSTATUS_H
  12. #ifndef _BASEHAND_H
  13. #include "basehand.h"
  14. #endif
  15. #ifndef _HANDLERS_H
  16. #include "handlers.h"
  17. #endif
  18. #ifndef _BASERTR_H
  19. #include "basertr.h"
  20. #endif
  21. class IPConnection;
  22. #define IPCONTAINER_MAX_COLUMNS 32
  23. struct _BaseIPResultData
  24. {
  25. DWORD m_dwData;
  26. CString m_stData;
  27. };
  28. struct BaseIPResultNodeData
  29. {
  30. BaseIPResultNodeData();
  31. ~BaseIPResultNodeData();
  32. #ifdef DEBUG
  33. TCHAR m_szDebug[32];
  34. #endif
  35. // Each column entry will have a structure that contains
  36. // (1) a string, (2) a DWORD, (3) a Boolean telling us to
  37. // sort by the string or the DWORD. The string is ALWAYS what gets
  38. // displayed!
  39. _BaseIPResultData m_rgData[IPCONTAINER_MAX_COLUMNS];
  40. SPIInterfaceInfo m_spIf;
  41. // Indicates the existence of a global filter, used by IP
  42. BOOL m_fFilters;
  43. DWORD m_dwInterfaceIndex;
  44. // Used by Mark/Release algorithms
  45. DWORD m_dwMark;
  46. IPConnection * m_pIPConnection;
  47. static HRESULT Init(ITFSNode *pNode, IInterfaceInfo *pIf,
  48. IPConnection *pIPConn);
  49. static HRESULT Free(ITFSNode *pNode);
  50. };
  51. #define GET_BASEIPRESULT_NODEDATA(pNode) \
  52. ((BaseIPResultNodeData *) pNode->GetData(TFS_DATA_USER))
  53. #define SET_BASEIPRESULT_NODEDATA(pNode, pData) \
  54. pNode->SetData(TFS_DATA_USER, (LONG_PTR) pData)
  55. #ifdef DEBUG
  56. #define ASSERT_BASEIPRESULT_NODEDATA(pData) \
  57. Assert(lstrcmp(pData->m_szDebug, _T("BaseIPResultNodeData")) == 0);
  58. #else
  59. #define ASSERT_BASEIPRESULT_NODEDATA(x)
  60. #endif
  61. /*---------------------------------------------------------------------------
  62. Class: BaseIPResultHandler
  63. This is a base class to be used by the interface result items. It
  64. will contain some of the core code needed for basic things (like
  65. display of data). It will not do the specifics (like menus/properties).
  66. ---------------------------------------------------------------------------*/
  67. class BaseIPResultHandler :
  68. public BaseRouterHandler
  69. {
  70. public:
  71. BaseIPResultHandler(ITFSComponentData *pCompData, ULONG ulId)
  72. : BaseRouterHandler(pCompData), m_ulColumnId(ulId)
  73. { DEBUG_INCREMENT_INSTANCE_COUNTER(BaseIPResultHandler); };
  74. ~BaseIPResultHandler()
  75. { DEBUG_DECREMENT_INSTANCE_COUNTER(BaseIPResultHandler); }
  76. DeclareIUnknownMembers(IMPL)
  77. OVERRIDE_ResultHandler_GetString();
  78. OVERRIDE_ResultHandler_CompareItems();
  79. OVERRIDE_ResultHandler_DestroyResultHandler();
  80. HRESULT Init(IInterfaceInfo *pInfo, ITFSNode *pParent);
  81. protected:
  82. CString m_stTitle; // holds the title of the node
  83. //
  84. // This is the id of the column set to use. This is used when we
  85. // interact with the ComponentConfigStream.
  86. //
  87. ULONG m_ulColumnId;
  88. DeclareEmbeddedInterface(IRtrAdviseSink, IUnknown)
  89. };
  90. void FillInNumberData(BaseIPResultNodeData *pNodeData, UINT iIndex,
  91. DWORD dwData);
  92. #endif _MSTATUS_H