QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2015 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_SPDY_SESSION_PEER_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ |
| 7 | |
renjietang | 3a1bb80 | 2019-06-11 10:42:41 -0700 | [diff] [blame] | 8 | #include "net/third_party/quiche/src/quic/core/http/quic_receive_control_stream.h" |
renjietang | 7498c8c | 2019-07-02 19:28:42 -0700 | [diff] [blame] | 9 | #include "net/third_party/quiche/src/quic/core/http/quic_send_control_stream.h" |
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_write_blocked_list.h" |
| 12 | #include "net/third_party/quiche/src/spdy/core/spdy_framer.h" |
| 13 | |
| 14 | namespace quic { |
| 15 | |
| 16 | class QuicHeadersStream; |
| 17 | class QuicSpdySession; |
| 18 | class QuicHpackDebugVisitor; |
| 19 | |
| 20 | namespace test { |
| 21 | |
| 22 | class QuicSpdySessionPeer { |
| 23 | public: |
| 24 | QuicSpdySessionPeer() = delete; |
| 25 | |
| 26 | static QuicHeadersStream* GetHeadersStream(QuicSpdySession* session); |
renjietang | fbeb5bf | 2019-04-19 15:06:20 -0700 | [diff] [blame] | 27 | static void SetUnownedHeadersStream(QuicSpdySession* session, |
| 28 | QuicHeadersStream* headers_stream); |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 29 | static const spdy::SpdyFramer& GetSpdyFramer(QuicSpdySession* session); |
| 30 | static void SetHpackEncoderDebugVisitor( |
| 31 | QuicSpdySession* session, |
| 32 | std::unique_ptr<QuicHpackDebugVisitor> visitor); |
| 33 | static void SetHpackDecoderDebugVisitor( |
| 34 | QuicSpdySession* session, |
| 35 | std::unique_ptr<QuicHpackDebugVisitor> visitor); |
bnc | 30d610c | 2019-07-08 18:39:59 -0700 | [diff] [blame] | 36 | // Must be called before Initialize(). |
| 37 | static void SetMaxInboundHeaderListSize(QuicSpdySession* session, |
| 38 | size_t max_inbound_header_size); |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 39 | static size_t WriteHeadersOnHeadersStream( |
| 40 | QuicSpdySession* session, |
| 41 | QuicStreamId id, |
| 42 | spdy::SpdyHeaderBlock headers, |
| 43 | bool fin, |
| 44 | spdy::SpdyPriority priority, |
| 45 | QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); |
renjietang | fee2cc3 | 2019-04-05 11:32:07 -0700 | [diff] [blame] | 46 | // |session| can't be nullptr. |
| 47 | static QuicStreamId GetNextOutgoingUnidirectionalStreamId( |
| 48 | QuicSpdySession* session); |
renjietang | 3a1bb80 | 2019-06-11 10:42:41 -0700 | [diff] [blame] | 49 | static QuicReceiveControlStream* GetReceiveControlStream( |
| 50 | QuicSpdySession* session); |
renjietang | 7498c8c | 2019-07-02 19:28:42 -0700 | [diff] [blame] | 51 | static QuicSendControlStream* GetSendControlStream(QuicSpdySession* session); |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | } // namespace test |
| 55 | |
| 56 | } // namespace quic |
| 57 | |
| 58 | #endif // QUICHE_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ |