Add missing mandoline build deps caught by the new GN version.
[chromium-blink-merge.git] / net / quic / test_tools / quic_session_peer.h
blob9e06411f61dfe5c5176a6f071a466c07cb99818e
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.
5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
8 #include <map>
10 #include "net/quic/quic_protocol.h"
11 #include "net/quic/quic_write_blocked_list.h"
13 namespace net {
15 class QuicCryptoStream;
16 class QuicDataStream;
17 class QuicHeadersStream;
18 class QuicSession;
19 class ReliableQuicStream;
21 namespace test {
23 class QuicSessionPeer {
24 public:
25 static void SetNextStreamId(QuicSession* session, QuicStreamId id);
26 static void SetMaxOpenStreams(QuicSession* session, uint32 max_streams);
27 static QuicCryptoStream* GetCryptoStream(QuicSession* session);
28 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session);
29 static ReliableQuicStream* GetIncomingDynamicStream(QuicSession* session,
30 QuicStreamId stream_id);
31 static std::map<QuicStreamId, QuicStreamOffset>&
32 GetLocallyClosedStreamsHighestOffset(QuicSession* session);
34 // Discern the state of a stream. Exactly one of these should be true at a
35 // time for any stream id > 0 (other than the special streams 1 and 3).
36 static bool IsStreamClosed(QuicSession* session, QuicStreamId id);
37 static bool IsStreamCreated(QuicSession* session, QuicStreamId id);
38 static bool IsStreamImplicitlyCreated(QuicSession* session, QuicStreamId id);
39 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id);
41 private:
42 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer);
45 } // namespace test
46 } // namespace net
48 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_