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.

151 lines
4.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. ipxadmin.h
  7. Interface administration
  8. FILE HISTORY:
  9. */
  10. #ifndef _IPXADMIN_H
  11. #define _IPXADMIN_H
  12. #ifndef _BASEHAND_H
  13. #include "basehand.h"
  14. #endif
  15. #ifndef _HANDLERS_H
  16. #include "handlers.h"
  17. #endif
  18. #ifndef _INFO_H
  19. #include "info.h"
  20. #endif
  21. #ifndef _RTRUTIL_H
  22. #include "rtrutil.h"
  23. #endif
  24. #ifndef _BASERTR_H
  25. #include "basertr.h"
  26. #endif
  27. #ifndef _IPXSTATS_H
  28. #include "ipxstats.h" // IPX statistics dialogs
  29. #endif
  30. #define MPR_INTERFACE_NOT_LOADED 0x00010000
  31. // forward declarations
  32. class IPXAdminConfigStream;
  33. interface IRouterInfo;
  34. struct ColumnData;
  35. /*---------------------------------------------------------------------------
  36. We store a pointer to the IPXConnection object in our node data
  37. ---------------------------------------------------------------------------*/
  38. #define GET_IPXADMIN_NODEDATA(pNode) \
  39. (IPXConnection *) pNode->GetData(TFS_DATA_USER)
  40. #define SET_IPXADMIN_NODEDATA(pNode, pData) \
  41. pNode->SetData(TFS_DATA_USER, (LONG_PTR) pData)
  42. /*---------------------------------------------------------------------------
  43. Class: IPXAdminNodeHandler
  44. ---------------------------------------------------------------------------*/
  45. class IPXAdminNodeHandler :
  46. public BaseRouterHandler
  47. {
  48. public:
  49. IPXAdminNodeHandler(ITFSComponentData *pCompData);
  50. ~IPXAdminNodeHandler()
  51. { DEBUG_DECREMENT_INSTANCE_COUNTER(IPXAdminNodeHandler) };
  52. HRESULT Init(IRouterInfo *pInfo, IPXAdminConfigStream *pConfigStream);
  53. // Override QI to handle embedded interface
  54. STDMETHOD(QueryInterface)(REFIID iid, LPVOID *ppv);
  55. DeclareEmbeddedInterface(IRtrAdviseSink, IUnknown)
  56. // base handler functionality we override
  57. OVERRIDE_NodeHandler_OnCommand();
  58. OVERRIDE_NodeHandler_GetString();
  59. OVERRIDE_NodeHandler_OnCreateDataObject();
  60. OVERRIDE_NodeHandler_DestroyHandler();
  61. OVERRIDE_NodeHandler_OnAddMenuItems();
  62. OVERRIDE_NodeHandler_CreatePropertyPages();
  63. OVERRIDE_NodeHandler_HasPropertyPages();
  64. // override handler notifications
  65. OVERRIDE_BaseHandlerNotify_OnExpand();
  66. // Initializes the node
  67. HRESULT ConstructNode(ITFSNode *pNode, BOOL fAddedAsLocal);
  68. // User-initiated commands
  69. // Refresh the data for these nodes
  70. HRESULT RefreshInterfaces(ITFSNode *pThisNode);
  71. public:
  72. // Structure used to pass data to callbacks - used as a way of
  73. // avoiding recomputation
  74. struct SMenuData
  75. {
  76. SPITFSNode m_spNode;
  77. };
  78. protected:
  79. SPIRtrMgrInfo m_spRtrMgrInfo;
  80. CString m_stTitle; // holds the title of the node
  81. BOOL m_bExpanded; // is the node expanded?
  82. MMC_COOKIE m_cookie; // cookie for the node
  83. LONG_PTR m_ulStatsConnId; // notification id for stats refresh
  84. LONG_PTR m_ulConnId; // notification id
  85. IPXAdminConfigStream * m_pConfigStream;
  86. IpxInfoStatistics m_IpxStats;
  87. IpxRoutingStatistics m_IpxRoutingStats;
  88. IpxServiceStatistics m_IpxServiceStats;
  89. HRESULT OnNewProtocol();
  90. };
  91. HRESULT CreateDataObjectFromRouterInfo(IRouterInfo *pInfo,
  92. DATA_OBJECT_TYPES type,
  93. MMC_COOKIE cookie,
  94. ITFSComponentData *pTFSCompData,
  95. IDataObject **ppDataObject,
  96. CDynamicExtensions * pDynExt = NULL);
  97. HRESULT CreateDataObjectFromRtrMgrInfo(IRtrMgrInfo *pInfo,
  98. DATA_OBJECT_TYPES type,
  99. MMC_COOKIE cookie,
  100. ITFSComponentData *pTFSCompData,
  101. IDataObject **ppDataObject,
  102. CDynamicExtensions * pDynExt = NULL);
  103. HRESULT CreateDataObjectFromRtrMgrProtocolInfo(IRtrMgrProtocolInfo *pInfo,
  104. DATA_OBJECT_TYPES type,
  105. MMC_COOKIE cookie,
  106. ITFSComponentData *pTFSCompData,
  107. IDataObject **ppDataObject);
  108. HRESULT CreateDataObjectFromInterfaceInfo(IInterfaceInfo *pInfo,
  109. DATA_OBJECT_TYPES type,
  110. MMC_COOKIE cookie,
  111. ITFSComponentData *pTFSCompData,
  112. IDataObject **ppDataObject);
  113. #endif _IPXADMIN_H