QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_ |
| 7 | |
| 8 | #include <cstdint> |
| 9 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 10 | #include "net/third_party/quiche/src/quic/core/quic_packets.h" |
| 11 | #include "net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h" |
| 12 | #include "net/third_party/quiche/src/quic/core/quic_stream_sequencer.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 13 | |
| 14 | namespace quic { |
| 15 | |
| 16 | class QuicStream; |
| 17 | class QuicSession; |
| 18 | |
| 19 | namespace test { |
| 20 | |
| 21 | class QuicStreamPeer { |
| 22 | public: |
| 23 | QuicStreamPeer() = delete; |
| 24 | |
| 25 | static void SetWriteSideClosed(bool value, QuicStream* stream); |
| 26 | static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written, |
| 27 | QuicStream* stream); |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 28 | static bool read_side_closed(QuicStream* stream); |
| 29 | static void CloseReadSide(QuicStream* stream); |
| 30 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 31 | static bool StreamContributesToConnectionFlowControl(QuicStream* stream); |
| 32 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 33 | static QuicStreamSequencer* sequencer(QuicStream* stream); |
| 34 | static QuicSession* session(QuicStream* stream); |
| 35 | |
| 36 | static QuicStreamSendBuffer& SendBuffer(QuicStream* stream); |
| 37 | }; |
| 38 | |
| 39 | } // namespace test |
| 40 | |
| 41 | } // namespace quic |
| 42 | |
| 43 | #endif // QUICHE_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_ |