OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ | 5 #ifndef NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ |
6 #define NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ | 6 #define NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ |
7 | 7 |
8 // HpackDecoderInterface is the base class for HPACK block decoders. | 8 // HpackDecoderInterface is the base class for HPACK block decoders. |
9 // HPACK is defined in http://tools.ietf.org/html/rfc7541 | 9 // HPACK is defined in http://tools.ietf.org/html/rfc7541 |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 size_t headers_data_length) = 0; | 37 size_t headers_data_length) = 0; |
38 | 38 |
39 // Called after a HPACK block has been completely delivered via | 39 // Called after a HPACK block has been completely delivered via |
40 // HandleControlFrameHeadersData(). Returns false if an error occurred. | 40 // HandleControlFrameHeadersData(). Returns false if an error occurred. |
41 // |compressed_len| if non-null will be set to the size of the encoded | 41 // |compressed_len| if non-null will be set to the size of the encoded |
42 // buffered block that was accumulated in HandleControlFrameHeadersData(), | 42 // buffered block that was accumulated in HandleControlFrameHeadersData(), |
43 // to support subsequent calculation of compression percentage. | 43 // to support subsequent calculation of compression percentage. |
44 // Discards the handler supplied at the start of decoding the block. | 44 // Discards the handler supplied at the start of decoding the block. |
45 // TODO(jamessynge): Determine if compressed_len is needed; it is used to | 45 // TODO(jamessynge): Determine if compressed_len is needed; it is used to |
46 // produce UUMA stat Net.SpdyHpackDecompressionPercentage, but only for | 46 // produce UUMA stat Net.SpdyHpackDecompressionPercentage, but only for |
47 // SPDY3, not HTTP2. | 47 // deprecated SPDY3. |
48 virtual bool HandleControlFrameHeadersComplete(size_t* compressed_len) = 0; | 48 virtual bool HandleControlFrameHeadersComplete(size_t* compressed_len) = 0; |
49 | 49 |
50 // Accessor for the most recently decoded headers block. Valid until the next | 50 // Accessor for the most recently decoded headers block. Valid until the next |
51 // call to HandleControlFrameHeadersData(). | 51 // call to HandleControlFrameHeadersData(). |
52 // TODO(birenroy): Remove this method when all users of HpackDecoder specify | 52 // TODO(birenroy): Remove this method when all users of HpackDecoder specify |
53 // a SpdyHeadersHandlerInterface. | 53 // a SpdyHeadersHandlerInterface. |
54 virtual const SpdyHeaderBlock& decoded_block() const = 0; | 54 virtual const SpdyHeaderBlock& decoded_block() const = 0; |
55 | 55 |
56 virtual void SetHeaderTableDebugVisitor( | 56 virtual void SetHeaderTableDebugVisitor( |
57 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) = 0; | 57 std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) = 0; |
58 | 58 |
59 // Set how much encoded data this decoder is willing to buffer. | 59 // Set how much encoded data this decoder is willing to buffer. |
60 virtual void set_max_decode_buffer_size_bytes( | 60 virtual void set_max_decode_buffer_size_bytes( |
61 size_t max_decode_buffer_size_bytes) = 0; | 61 size_t max_decode_buffer_size_bytes) = 0; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace net | 64 } // namespace net |
65 | 65 |
66 #endif // NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ | 66 #endif // NET_SPDY_HPACK_HPACK_DECODER_INTERFACE_H_ |
OLD | NEW |