spdy_utils.h revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
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 NET_TOOLS_QUIC_SPDY_UTILS_H_
6#define NET_TOOLS_QUIC_SPDY_UTILS_H_
7
8#include <string>
9
10#include "net/spdy/spdy_header_block.h"
11#include "net/spdy/spdy_protocol.h"
12#include "net/tools/flip_server/balsa_headers.h"
13
14namespace net {
15namespace tools {
16
17class SpdyUtils {
18 public:
19  static std::string SerializeRequestHeaders(
20      const BalsaHeaders& request_headers);
21
22  static std::string SerializeResponseHeaders(
23      const BalsaHeaders& response_headers);
24
25  static bool FillBalsaRequestHeaders(const SpdyHeaderBlock& header_block,
26                                      BalsaHeaders* request_headers);
27
28  static bool FillBalsaResponseHeaders(const SpdyHeaderBlock& header_block,
29                                       BalsaHeaders* response_headers);
30};
31
32}  // namespace tools
33}  // namespace net
34
35#endif  // NET_TOOLS_QUIC_SPDY_UTILS_H_
36