QUIC - wait for disk cache to load server config if the server is among
[chromium-blink-merge.git] / net / spdy / spdy_headers_handler_interface.h
blobff5648adde1f5af355b9fd13a94b7734000c6f21
1 // Copyright 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.
5 #ifndef NET_SPDY_SPDY_HEADERS_HANDLER_INTERFACE_H_
6 #define NET_SPDY_SPDY_HEADERS_HANDLER_INTERFACE_H_
8 #include "base/strings/string_piece.h"
10 namespace net {
12 // This interface defines how an object that accepts header data should behave.
13 // It is used by both SpdyHeadersBlockParser and HpackDecoder.
14 class SpdyHeadersHandlerInterface {
15 public:
16 virtual ~SpdyHeadersHandlerInterface() {}
18 // A callback method which notifies when the parser starts handling a new
19 // header block fragment.
20 virtual void OnHeaderBlockStart() = 0;
22 // A callback method which notifies on a header key value pair. Multiple
23 // values for a given key will be emitted as multiple calls to OnHeader.
24 virtual void OnHeader(base::StringPiece key, base::StringPiece value) = 0;
26 // A callback method which notifies when the parser finishes handling a
27 // header block fragment. Also indicates the total number of bytes in this
28 // block.
29 virtual void OnHeaderBlockEnd(size_t header_bytes_parsed) = 0;
32 } // namespace net
34 #endif // NET_SPDY_SPDY_HEADERS_HANDLER_INTERFACE_H_