blob: 9142348b771bf6e2f45a13fc70d5d7748c0bffea [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// 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 teama6ef0a62019-03-07 20:34:33 -050010#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"
13#include "net/third_party/quiche/src/quic/platform/api/quic_string_piece.h"
14
15namespace quic {
16
17class QuicStream;
18class QuicSession;
19
20namespace test {
21
22class QuicStreamPeer {
23 public:
24 QuicStreamPeer() = delete;
25
26 static void SetWriteSideClosed(bool value, QuicStream* stream);
27 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written,
28 QuicStream* stream);
QUICHE teama6ef0a62019-03-07 20:34:33 -050029 static bool read_side_closed(QuicStream* stream);
30 static void CloseReadSide(QuicStream* stream);
31
QUICHE teama6ef0a62019-03-07 20:34:33 -050032 static bool StreamContributesToConnectionFlowControl(QuicStream* stream);
33
QUICHE teama6ef0a62019-03-07 20:34:33 -050034 static QuicStreamSequencer* sequencer(QuicStream* stream);
35 static QuicSession* session(QuicStream* stream);
36
37 static QuicStreamSendBuffer& SendBuffer(QuicStream* stream);
38};
39
40} // namespace test
41
42} // namespace quic
43
44#endif // QUICHE_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_