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.

120 lines
5.1 KiB

  1. #ifndef _INFO_H_
  2. #define _INFO_H_
  3. #include "router.h"
  4. /*!--------------------------------------------------------------------------
  5. Smart pointers for the various control blocks.
  6. ---------------------------------------------------------------------------*/
  7. DeclareSP(RouterCB, RouterCB)
  8. DeclareSP(RtrMgrCB, RtrMgrCB)
  9. DeclareSP(RtrMgrProtocolCB, RtrMgrProtocolCB)
  10. DeclareSP(InterfaceCB, InterfaceCB)
  11. DeclareSP(RtrMgrInterfaceCB, RtrMgrInterfaceCB)
  12. DeclareSP(RtrMgrProtocolInterfaceCB, RtrMgrProtocolInterfaceCB)
  13. /*---------------------------------------------------------------------------
  14. Smart pointers for the set of enumerations and objects
  15. ---------------------------------------------------------------------------*/
  16. typedef ComSmartPointer<IEnumRtrMgrCB, &IID_IEnumRtrMgrCB> SPIEnumRtrMgrCB;
  17. typedef ComSmartPointer<IEnumRtrMgrProtocolCB, &IID_IEnumRtrMgrProtocolCB> SPIEnumRtrMgrProtocolCB;
  18. typedef ComSmartPointer<IEnumInterfaceCB, &IID_IEnumInterfaceCB> SPIEnumInterfaceCB;
  19. typedef ComSmartPointer<IEnumRtrMgrInterfaceCB, &IID_IEnumRtrMgrInterfaceCB> SPIEnumRtrMgrInterfaceCB;
  20. typedef ComSmartPointer<IEnumRtrMgrProtocolInterfaceCB, &IID_IEnumRtrMgrProtocolInterfaceCB> SPIEnumRtrMgrProtocolInterfaceCB;
  21. typedef ComSmartPointer<IRtrMgrProtocolInfo, &IID_IRtrMgrProtocolInfo> SPIRtrMgrProtocolInfo;
  22. typedef ComSmartPointer<IEnumRtrMgrProtocolInfo, &IID_IEnumRtrMgrProtocolInfo> SPIEnumRtrMgrProtocolInfo;
  23. typedef ComSmartPointer<IRtrMgrInfo, &IID_IRtrMgrInfo> SPIRtrMgrInfo;
  24. typedef ComSmartPointer<IEnumRtrMgrInfo, &IID_IEnumRtrMgrInfo> SPIEnumRtrMgrInfo;
  25. typedef ComSmartPointer<IRtrMgrProtocolInterfaceInfo, &IID_IRtrMgrProtocolInterfaceInfo> SPIRtrMgrProtocolInterfaceInfo;
  26. typedef ComSmartPointer<IEnumRtrMgrProtocolInterfaceInfo, &IID_IEnumRtrMgrProtocolInterfaceInfo> SPIEnumRtrMgrProtocolInterfaceInfo;
  27. typedef ComSmartPointer<IRtrMgrInterfaceInfo, &IID_IRtrMgrInterfaceInfo> SPIRtrMgrInterfaceInfo;
  28. typedef ComSmartPointer<IEnumRtrMgrInterfaceInfo, &IID_IEnumRtrMgrInterfaceInfo> SPIEnumRtrMgrInterfaceInfo;
  29. typedef ComSmartPointer<IInterfaceInfo, &IID_IInterfaceInfo> SPIInterfaceInfo;
  30. typedef ComSmartPointer<IEnumInterfaceInfo, &IID_IEnumInterfaceInfo> SPIEnumInterfaceInfo;
  31. typedef ComSmartPointer<IRouterInfo, &IID_IRouterInfo> SPIRouterInfo;
  32. typedef ComSmartPointer<IRouterRefresh, &IID_IRouterRefresh> SPIRouterRefresh;
  33. typedef ComSmartPointer<IRouterRefreshModify, &IID_IRouterRefreshModify> SPIRouterRefreshModify;
  34. /*---------------------------------------------------------------------------
  35. Creation APIs
  36. ---------------------------------------------------------------------------*/
  37. TFSCORE_API(HRESULT) CreateRouterInfo(IRouterInfo **ppRouterInfo, HWND hWndSync, LPCWSTR szMachine);
  38. TFSCORE_API(HRESULT) CreateInterfaceInfo(IInterfaceInfo **ppInterfaceInfo,
  39. LPCWSTR pszInterfaceId,
  40. DWORD dwInterfaceType);
  41. TFSCORE_API(HRESULT) CreateRtrMgrInterfaceInfo(
  42. IRtrMgrInterfaceInfo **ppRmIfInfo,
  43. LPCWSTR pszId,
  44. DWORD dwTransportId,
  45. LPCWSTR pszInterfaceId,
  46. DWORD dwInterfaceType);
  47. TFSCORE_API(HRESULT) CreateRtrMgrProtocolInterfaceInfo(
  48. IRtrMgrProtocolInterfaceInfo **ppRmProtIfInfo,
  49. const RtrMgrProtocolInterfaceCB *pRmProtIfCB);
  50. TFSCORE_API(HRESULT) CreateRtrMgrProtocolInfo(
  51. IRtrMgrProtocolInfo **ppRmProtInfo,
  52. const RtrMgrProtocolCB *pRmProtCB);
  53. /*---------------------------------------------------------------------------
  54. Aggregation helpers
  55. ---------------------------------------------------------------------------*/
  56. TFSCORE_API(HRESULT) CreateRouterInfoAggregation(IRouterInfo *pInfo,
  57. IUnknown *punkOuter, IUnknown **ppNonDelgatingIUnknown);
  58. TFSCORE_API(HRESULT) CreateInterfaceInfoAggregation(IInterfaceInfo *pInfo,
  59. IUnknown *punkOuter, IUnknown **ppNonDelgatingIUnknown);
  60. TFSCORE_API(HRESULT) CreateRtrMgrInfoAggregation(IRtrMgrInfo *pRmInfo,
  61. IUnknown *punkOuter, IUnknown **ppNonDelegatingIUnknown);
  62. TFSCORE_API(HRESULT) CreateRtrMgrProtocolInfoAggregation(IRtrMgrProtocolInfo *pRmProtInfo,
  63. IUnknown *punkOuter, IUnknown **ppNonDelegatingIUnknown);
  64. TFSCORE_API(HRESULT) CreateRtrMgrInterfaceInfoAggregation(IRtrMgrInterfaceInfo *pRmIfInfo,
  65. IUnknown *punkOuter, IUnknown **ppNonDelegatingIUnknown);
  66. TFSCORE_API(HRESULT) CreateRtrMgrProtocolInterfaceInfoAggregation(IRtrMgrProtocolInterfaceInfo *pRmProtIfInfo,
  67. IUnknown *punkOuter, IUnknown **ppNonDelegatingIUnknown);
  68. /*---------------------------------------------------------------------------
  69. Useful utilities
  70. ---------------------------------------------------------------------------*/
  71. TFSCORE_API(HRESULT) LookupRtrMgr(IRouterInfo *pRouter,
  72. DWORD dwTransportId,
  73. IRtrMgrInfo **ppRm);
  74. TFSCORE_API(HRESULT) LookupRtrMgrProtocol(IRouterInfo *pRouter,
  75. DWORD dwTransportId,
  76. DWORD dwProtocolId,
  77. IRtrMgrProtocolInfo **ppRmProt);
  78. TFSCORE_API(HRESULT) LookupRtrMgrInterface(IRouterInfo *pRouter,
  79. LPCOLESTR pszInterfaceId,
  80. DWORD dwTransportId,
  81. IRtrMgrInterfaceInfo **ppRmIf);
  82. TFSCORE_API(HRESULT) LookupRtrMgrProtocolInterface(IInterfaceInfo *pIf,
  83. DWORD dwTransportId, DWORD dwProtocolId,
  84. IRtrMgrProtocolInterfaceInfo **pRmProtIf);
  85. #endif