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.

182 lines
3.5 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: cn.h
  4. //
  5. // Description: connect 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. // Class
  30. //---------------------------------------------------------------------------
  31. typedef class CConnectNode : public CListMultiItem
  32. {
  33. friend class CConnectInfo;
  34. private:
  35. CConnectNode(
  36. PCONNECT_NODE pConnectNodeNext
  37. );
  38. ~CConnectNode(
  39. );
  40. public:
  41. static NTSTATUS
  42. Create(
  43. PCONNECT_NODE *ppConnectNode,
  44. PLOGICAL_FILTER_NODE pLogicalFilterNode,
  45. PCONNECT_NODE pConnectNodeNext,
  46. PGRAPH_PIN_INFO pGraphPinInfo,
  47. PPIN_NODE pPinNode1,
  48. PPIN_NODE pPinNode2,
  49. ULONG ulFlagsCurrent,
  50. PGRAPH_NODE pGraphNode
  51. );
  52. ENUMFUNC
  53. Destroy(
  54. )
  55. {
  56. if(this != NULL) {
  57. Assert(this);
  58. ASSERT(cReference > 0);
  59. if(--cReference == 0) {
  60. delete this;
  61. }
  62. }
  63. return(STATUS_CONTINUE);
  64. };
  65. VOID
  66. AddRef(
  67. )
  68. {
  69. if(this != NULL) {
  70. Assert(this);
  71. ++cReference;
  72. }
  73. };
  74. VOID
  75. AddPinInstance(
  76. )
  77. {
  78. Assert(this);
  79. pConnectInfo->AddPinInstance();
  80. };
  81. VOID
  82. RemovePinInstance(
  83. )
  84. {
  85. Assert(this);
  86. pConnectInfo->RemovePinInstance();
  87. };
  88. BOOL
  89. IsPinInstances(
  90. )
  91. {
  92. Assert(this);
  93. return(pConnectInfo->IsPinInstances());
  94. };
  95. BOOL
  96. IsTopDown(
  97. )
  98. {
  99. Assert(this);
  100. return(pConnectInfo->IsTopDown());
  101. };
  102. BOOL
  103. IsLimitFormat(
  104. )
  105. {
  106. Assert(this);
  107. return(pConnectInfo->IsLimitFormat());
  108. };
  109. BOOL
  110. IsReuseFilterInstance(
  111. )
  112. {
  113. Assert(this);
  114. return(pConnectInfo->IsReuseFilterInstance());
  115. };
  116. BOOL
  117. IsPinInstanceReserved(
  118. )
  119. {
  120. Assert(this);
  121. return(pConnectInfo->IsPinInstanceReserved());
  122. };
  123. PCONNECT_NODE
  124. GetNextConnectNode(
  125. )
  126. {
  127. Assert(this);
  128. return(pConnectNodeNext);
  129. };
  130. PCONNECT_NODE_INSTANCE
  131. GetConnectNodeInstance(
  132. )
  133. {
  134. Assert(this);
  135. return(pConnectInfo->pConnectNodeInstance);
  136. };
  137. VOID
  138. SetConnectNodeInstance(
  139. PCONNECT_NODE_INSTANCE pConnectNodeInstance
  140. )
  141. {
  142. Assert(this);
  143. pConnectInfo->pConnectNodeInstance = pConnectNodeInstance;
  144. };
  145. PCONNECT_INFO
  146. GetConnectInfo(
  147. )
  148. {
  149. return(this == NULL ? NULL : this->pConnectInfo);
  150. };
  151. private:
  152. LONG cReference;
  153. PCONNECT_INFO pConnectInfo;
  154. PCONNECT_NODE pConnectNodeNext;
  155. public:
  156. PPIN_NODE pPinNodeSource;
  157. PPIN_NODE pPinNodeSink;
  158. DefineSignature(0x20204e43); // CN
  159. } CONNECT_NODE, *PCONNECT_NODE;
  160. //---------------------------------------------------------------------------