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. ipxface.h
  7. Interface administration
  8. FILE HISTORY:
  9. */
  10. #ifndef _IPXFACE_H
  11. #define _IPXFACE_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 IPXConnection;
  22. #define IPXCONTAINER_MAX_COLUMNS 32
  23. struct _BaseIPXResultData
  24. {
  25. DWORD m_dwData;
  26. CString m_stData;
  27. };
  28. struct BaseIPXResultNodeData
  29. {
  30. BaseIPXResultNodeData();
  31. ~BaseIPXResultNodeData();
  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. _BaseIPXResultData m_rgData[IPXCONTAINER_MAX_COLUMNS];
  40. SPIInterfaceInfo m_spIf;
  41. // TRUE if this is a client interface
  42. BOOL m_fClient;
  43. DWORD m_dwInterfaceIndex;
  44. // Used by Mark/Release algorithms
  45. DWORD m_dwMark;
  46. IPXConnection * m_pIPXConnection;
  47. static HRESULT Init(ITFSNode *pNode, IInterfaceInfo *pIf,
  48. IPXConnection *pIPXConn);
  49. static HRESULT Free(ITFSNode *pNode);
  50. };
  51. #define GET_BASEIPXRESULT_NODEDATA(pNode) \
  52. ((BaseIPXResultNodeData *) pNode->GetData(TFS_DATA_USER))
  53. #define SET_BASEIPXRESULT_NODEDATA(pNode, pData) \
  54. pNode->SetData(TFS_DATA_USER, (DWORD_PTR) pData)
  55. #ifdef DEBUG
  56. #define ASSERT_BASEIPXRESULT_NODEDATA(pData) \
  57. Assert(lstrcmp(pData->m_szDebug, _T("BaseIPXResultNodeData")) == 0);
  58. #else
  59. #define ASSERT_BASEIPXRESULT_NODEDATA(x)
  60. #endif
  61. /*---------------------------------------------------------------------------
  62. Class: BaseIPXResultHandler
  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 BaseIPXResultHandler :
  68. public BaseRouterHandler
  69. {
  70. public:
  71. BaseIPXResultHandler(ITFSComponentData *pCompData, ULONG ulId)
  72. : BaseRouterHandler(pCompData), m_ulColumnId(ulId)
  73. { DEBUG_INCREMENT_INSTANCE_COUNTER(BaseIPXResultHandler); };
  74. ~BaseIPXResultHandler()
  75. { DEBUG_DECREMENT_INSTANCE_COUNTER(BaseIPXResultHandler); }
  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(BaseIPXResultNodeData *pNodeData, UINT iIndex,
  91. DWORD dwData);
  92. #endif _IPXFACE_H