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_TOOLS_QUIC_SPDY_BALSA_UTILS_H_
6 #define NET_TOOLS_QUIC_SPDY_BALSA_UTILS_H_
10 #include "net/quic/quic_protocol.h"
11 #include "net/spdy/spdy_framer.h"
12 #include "net/spdy/spdy_header_block.h"
13 #include "net/spdy/spdy_protocol.h"
14 #include "net/tools/balsa/balsa_headers.h"
19 class SpdyBalsaUtils
{
21 static std::string
SerializeResponseHeaders(
22 const BalsaHeaders
& response_headers
,
23 QuicVersion quic_version
);
25 static SpdyHeaderBlock
RequestHeadersToSpdyHeaders(
26 const BalsaHeaders
& request_headers
,
27 QuicVersion quic_version
);
29 static SpdyHeaderBlock
ResponseHeadersToSpdyHeaders(
30 const BalsaHeaders
& response_headers
,
31 QuicVersion quic_version
);
33 static void SpdyHeadersToResponseHeaders(const SpdyHeaderBlock
& block
,
34 BalsaHeaders
* headers
,
35 QuicVersion quic_version
);
37 static void SpdyHeadersToRequestHeaders(const SpdyHeaderBlock
& block
,
38 BalsaHeaders
* headers
,
39 QuicVersion quic_version
);
42 DISALLOW_COPY_AND_ASSIGN(SpdyBalsaUtils
);
48 #endif // NET_TOOLS_QUIC_SPDY_BALSA_UTILS_H_