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.

196 lines
4.4 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: sn.h
  4. //
  5. // Description: start 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. //---------------------------------------------------------------------------
  29. // Classes
  30. //---------------------------------------------------------------------------
  31. #define STARTNODE_FLAGS_SECONDPASS 0x01
  32. #define STARTNODE_SPECIALFLAG_NONE 0
  33. // StartNode must connect with the same format bottom up.
  34. // Use this information to optimize graph building.
  35. #define STARTNODE_SPECIALFLAG_STRICT 0x00000001
  36. // StartNode contains Aec filter.
  37. #define STARTNODE_SPECIALFLAG_AEC 0x00000002
  38. typedef class CStartNode : public CListDoubleItem
  39. {
  40. friend class CStartInfo;
  41. private:
  42. CStartNode(
  43. PPIN_NODE pPinNode,
  44. PCONNECT_NODE pConnectNode,
  45. ULONG ulOverhead,
  46. PGRAPH_NODE pGraphNode
  47. );
  48. ~CStartNode(
  49. );
  50. public:
  51. static NTSTATUS
  52. Create(
  53. PPIN_NODE pPinNode,
  54. PCONNECT_NODE pConnectNode,
  55. PGRAPH_PIN_INFO pGraphPinInfo,
  56. ULONG ulFlagsCurrent,
  57. ULONG ulOverhead,
  58. PGRAPH_NODE pGraphNode
  59. );
  60. ENUMFUNC
  61. Destroy()
  62. {
  63. Assert(this);
  64. delete this;
  65. return(STATUS_CONTINUE);
  66. };
  67. PGRAPH_PIN_INFO
  68. GetGraphPinInfo(
  69. )
  70. {
  71. Assert(this);
  72. return(pStartInfo->GetGraphPinInfo());
  73. };
  74. ENUMFUNC
  75. RemoveBypassPaths(
  76. PVOID pGraphNode
  77. );
  78. ENUMFUNC
  79. RemoveConnectedStartNode(
  80. PVOID pReference
  81. );
  82. PKSPIN_CINSTANCES
  83. GetPinInstances(
  84. )
  85. {
  86. Assert(this);
  87. return(pStartInfo->GetPinInstances());
  88. };
  89. VOID
  90. AddPinInstance(
  91. )
  92. {
  93. Assert(this);
  94. pStartInfo->AddPinInstance();
  95. };
  96. VOID
  97. RemovePinInstance(
  98. )
  99. {
  100. Assert(this);
  101. pStartInfo->RemovePinInstance();
  102. };
  103. BOOL
  104. IsPinInstances(
  105. )
  106. {
  107. Assert(this);
  108. return(pStartInfo->IsPinInstances());
  109. };
  110. BOOL
  111. IsPossibleInstances(
  112. )
  113. {
  114. Assert(this);
  115. return(pStartInfo->IsPossibleInstances());
  116. };
  117. PCONNECT_NODE
  118. GetFirstConnectNode(
  119. )
  120. {
  121. return(pConnectNodeHead);
  122. };
  123. PSTART_INFO
  124. GetStartInfo(
  125. )
  126. {
  127. Assert(this);
  128. return(pStartInfo);
  129. };
  130. BOOL
  131. IsCaptureFormatStrict(
  132. )
  133. {
  134. return ulSpecialFlags & STARTNODE_SPECIALFLAG_STRICT;
  135. };
  136. BOOL
  137. IsAecIncluded(
  138. )
  139. {
  140. return ulSpecialFlags & STARTNODE_SPECIALFLAG_AEC;
  141. };
  142. private:
  143. void
  144. SetSpecialFlags();
  145. private:
  146. PSTART_INFO pStartInfo;
  147. PCONNECT_NODE pConnectNodeHead;
  148. ULONG ulSpecialFlags;
  149. public:
  150. BOOL fRender;
  151. ULONG ulOverhead;
  152. ULONG ulFlags;
  153. PPIN_NODE pPinNode;
  154. DefineSignature(0x20204e53); // SN
  155. } START_NODE, *PSTART_NODE;
  156. //---------------------------------------------------------------------------
  157. typedef ListDoubleDestroy<START_NODE> LIST_START_NODE;
  158. //---------------------------------------------------------------------------
  159. typedef ListData<START_NODE> LIST_DATA_START_NODE, *PLIST_DATA_START_NODE;
  160. //---------------------------------------------------------------------------
  161. // Globals
  162. //---------------------------------------------------------------------------
  163. //---------------------------------------------------------------------------
  164. // Local prototypes
  165. //---------------------------------------------------------------------------