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.

128 lines
3.6 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: tc.h
  4. //
  5. // Description: Topology Connection Class
  6. //
  7. //
  8. //@@BEGIN_MSINTERNAL
  9. // Development Team:
  10. // Mike McLaughlin
  11. //
  12. // History: Date Author Comment
  13. //
  14. //@@END_MSINTERNAL
  15. //---------------------------------------------------------------------------
  16. //
  17. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  18. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  19. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  20. // PURPOSE.
  21. //
  22. // Copyright (c) 1996-1999 Microsoft Corporation. All Rights Reserved.
  23. //
  24. //---------------------------------------------------------------------------
  25. //---------------------------------------------------------------------------
  26. // Constants and Macros
  27. //---------------------------------------------------------------------------
  28. #define TOPC_FLAGS_FILTER_CONNECTION_TYPE 0x00000000
  29. #define TOPC_FLAGS_PHYSICAL_CONNECTION_TYPE 0x00000001
  30. #define TOPC_FLAGS_GRAPH_CONNECTION_TYPE 0x00000002
  31. #define TOPC_FLAGS_CONNECTION_TYPE 0x00000003
  32. #define IS_CONNECTION_TYPE(pTopologyConnection, Type) \
  33. (((pTopologyConnection)->ulFlags & TOPC_FLAGS_CONNECTION_TYPE) ==\
  34. TOPC_FLAGS_##Type##_CONNECTION_TYPE)
  35. //---------------------------------------------------------------------------
  36. // Classes
  37. //---------------------------------------------------------------------------
  38. typedef class CTopologyConnection : public CListMultiItem
  39. {
  40. private:
  41. CTopologyConnection(
  42. PTOPOLOGY_PIN pTopologyPinFrom,
  43. PTOPOLOGY_PIN pTopologyPinTo,
  44. PPIN_INFO pPinInfoFrom,
  45. PPIN_INFO pPinInfoTo
  46. );
  47. ~CTopologyConnection(
  48. );
  49. public:
  50. static NTSTATUS
  51. Create(
  52. PTOPOLOGY_CONNECTION *ppTopologyConnection,
  53. PFILTER_NODE pFilterNode,
  54. PGRAPH_NODE pGraphNode,
  55. PTOPOLOGY_PIN pTopologyPinFrom,
  56. PTOPOLOGY_PIN pTopologyPinTo,
  57. PPIN_INFO pPinInfoFrom,
  58. PPIN_INFO pPinInfoTo
  59. );
  60. ENUMFUNC
  61. Destroy()
  62. {
  63. Assert(this);
  64. delete this;
  65. return(STATUS_CONTINUE);
  66. };
  67. ENUMFUNC
  68. CheckDuplicate(
  69. PVOID ppTopologyConnection
  70. );
  71. ENUMFUNC
  72. ProcessTopologyConnection(
  73. PVOID pGraphNodeInstance
  74. );
  75. BOOL
  76. IsTopologyConnectionOnGraphNode(
  77. PGRAPH_NODE pGraphNode
  78. );
  79. ULONG ulFlags;
  80. PTOPOLOGY_PIN pTopologyPinFrom;
  81. PTOPOLOGY_PIN pTopologyPinTo;
  82. PPIN_INFO pPinInfoFrom;
  83. PPIN_INFO pPinInfoTo;
  84. DefineSignature(0x20204354); // TC
  85. } TOPOLOGY_CONNECTION, *PTOPOLOGY_CONNECTION;
  86. //---------------------------------------------------------------------------
  87. typedef ListMultiDestroy<TOPOLOGY_CONNECTION> LIST_DESTROY_TOPOLOGY_CONNECTION;
  88. typedef LIST_DESTROY_TOPOLOGY_CONNECTION *PLIST_DESTROY_TOPOLOGY_CONNECTION;
  89. //---------------------------------------------------------------------------
  90. typedef ListMulti<TOPOLOGY_CONNECTION> LIST_MULTI_TOPOLOGY_CONNECTION;
  91. //---------------------------------------------------------------------------
  92. // Globals
  93. //---------------------------------------------------------------------------
  94. extern ULONG gcTopologyConnections;
  95. //---------------------------------------------------------------------------
  96. // Local prototypes
  97. //---------------------------------------------------------------------------
  98. NTSTATUS
  99. CreatePinInfoConnection(
  100. IN PTOPOLOGY_CONNECTION *ppTopologyConnection,
  101. IN PFILTER_NODE pFilterNode,
  102. IN PGRAPH_NODE pGraphNode,
  103. IN PPIN_INFO pPinInfoSource,
  104. IN PPIN_INFO pPinInfoSink
  105. );
  106. //---------------------------------------------------------------------------