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.

191 lines
4.5 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: lfn.h
  4. //
  5. // Description: logical filter node classes
  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 LFN_FLAGS_CONNECT_CAPTURE 0x00000001
  29. #define LFN_FLAGS_CONNECT_RENDER 0x00000002
  30. #define LFN_FLAGS_CONNECT_NORMAL_TOPOLOGY 0x00000004
  31. #define LFN_FLAGS_CONNECT_MIXER_TOPOLOGY 0x00000008
  32. #define LFN_FLAGS_TOP_DOWN 0x00000010
  33. #define LFN_FLAGS_NO_BYPASS 0x00000020
  34. #define LFN_FLAGS_NOT_SELECT 0x00000040
  35. #define LFN_FLAGS_REFLECT_DATARANGE 0x00000080
  36. //---------------------------------------------------------------------------
  37. // Classes
  38. //---------------------------------------------------------------------------
  39. typedef class CLogicalFilterNode : public CListMultiItem
  40. {
  41. private:
  42. CLogicalFilterNode(
  43. PFILTER_NODE pFilterNode
  44. );
  45. public:
  46. ~CLogicalFilterNode(
  47. );
  48. static NTSTATUS
  49. Create(
  50. PLOGICAL_FILTER_NODE *ppLogicalFilterNode,
  51. PFILTER_NODE pFilterNode
  52. );
  53. ENUMFUNC
  54. Destroy(
  55. )
  56. {
  57. Assert(this);
  58. delete this;
  59. return(STATUS_CONTINUE);
  60. };
  61. static NTSTATUS
  62. CreateAll(
  63. PFILTER_NODE pFilterNode
  64. );
  65. static NTSTATUS
  66. EnumerateFilterTopology(
  67. IN PTOPOLOGY_CONNECTION pTopologyConnection,
  68. IN BOOL fToDirection,
  69. IN OUT PLOGICAL_FILTER_NODE *ppLogicalFilterNode
  70. );
  71. ULONG
  72. GetFlags(
  73. )
  74. {
  75. return(ulFlags);
  76. };
  77. BOOL
  78. IsRenderAndCapture(
  79. )
  80. {
  81. return(
  82. (GetFlags() & LFN_FLAGS_CONNECT_CAPTURE) &&
  83. (GetFlags() & LFN_FLAGS_CONNECT_RENDER));
  84. };
  85. VOID
  86. SetRenderOnly(
  87. )
  88. {
  89. ulFlags |= LFN_FLAGS_CONNECT_RENDER;
  90. ulFlags &= ~LFN_FLAGS_CONNECT_CAPTURE;
  91. };
  92. VOID
  93. SetCaptureOnly(
  94. )
  95. {
  96. ulFlags |= LFN_FLAGS_CONNECT_CAPTURE;
  97. ulFlags &= ~LFN_FLAGS_CONNECT_RENDER;
  98. };
  99. ULONG
  100. GetOverhead(
  101. )
  102. {
  103. return(ulOverhead);
  104. };
  105. ULONG
  106. GetOrder(
  107. )
  108. {
  109. return(ulOrder);
  110. };
  111. VOID
  112. SetOrder(
  113. ULONG ulOrder
  114. )
  115. {
  116. this->ulOrder = ulOrder;
  117. };
  118. ULONG
  119. GetType( // see fn.h
  120. );
  121. VOID
  122. SetType(
  123. ULONG fulType
  124. );
  125. PFILTER_NODE pFilterNode;
  126. LIST_DATA_PIN_NODE lstPinNode;
  127. LIST_DATA_TOPOLOGY_NODE lstTopologyNode;
  128. LIST_MULTI_TOPOLOGY_CONNECTION lstTopologyConnection;
  129. LIST_FILTER_NODE_INSTANCE lstFilterNodeInstance;
  130. private:
  131. ULONG ulOverhead;
  132. ULONG ulFlags;
  133. ULONG ulOrder;
  134. public:
  135. DefineSignature(0x204e464c); // LFN
  136. } LOGICAL_FILTER_NODE, *PLOGICAL_FILTER_NODE;
  137. //---------------------------------------------------------------------------
  138. typedef ListMultiDestroy<LOGICAL_FILTER_NODE> LIST_DESTROY_LOGICAL_FILTER_NODE;
  139. //---------------------------------------------------------------------------
  140. typedef ListMulti<CLogicalFilterNode> LIST_MULTI_LOGICAL_FILTER_NODE;
  141. typedef LIST_MULTI_LOGICAL_FILTER_NODE *PLIST_MULTI_LOGICAL_FILTER_NODE;
  142. //---------------------------------------------------------------------------
  143. // Inline functions
  144. //---------------------------------------------------------------------------
  145. inline ULONG
  146. CPinNode::GetType(
  147. )
  148. {
  149. return(pLogicalFilterNode->GetType());
  150. }
  151. //---------------------------------------------------------------------------
  152. // Globals
  153. //---------------------------------------------------------------------------
  154. extern ULONG gcMixers;
  155. extern ULONG gcSplitters;
  156. extern ULONG gcLogicalFilterNodes;
  157. extern PLIST_MULTI_LOGICAL_FILTER_NODE gplstLogicalFilterNode;
  158. //---------------------------------------------------------------------------
  159. // Local prototypes
  160. //---------------------------------------------------------------------------