blob: 3f6a317231e34838294138bbaa207ac85dea5ee2 [file] [log] [blame]
QUICHE teamfd50a402018-12-07 22:54:05 -05001// Copyright 2016 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 QUICHE_HTTP2_DECODER_DECODE_HTTP2_STRUCTURES_H_
6#define QUICHE_HTTP2_DECODER_DECODE_HTTP2_STRUCTURES_H_
7
8// Provides functions for decoding the fixed size structures in the HTTP/2 spec.
9
10#include "net/third_party/quiche/src/http2/decoder/decode_buffer.h"
11#include "net/third_party/quiche/src/http2/http2_structures.h"
12#include "net/third_party/quiche/src/http2/platform/api/http2_export.h"
13
14namespace http2 {
15
16// DoDecode(STRUCTURE* out, DecodeBuffer* b) decodes the structure from start
17// to end, advancing the cursor by STRUCTURE::EncodedSize(). The decode buffer
18// must be large enough (i.e. b->Remaining() >= STRUCTURE::EncodedSize()).
19
20HTTP2_EXPORT_PRIVATE void DoDecode(Http2FrameHeader* out, DecodeBuffer* b);
21HTTP2_EXPORT_PRIVATE void DoDecode(Http2PriorityFields* out, DecodeBuffer* b);
22HTTP2_EXPORT_PRIVATE void DoDecode(Http2RstStreamFields* out, DecodeBuffer* b);
23HTTP2_EXPORT_PRIVATE void DoDecode(Http2SettingFields* out, DecodeBuffer* b);
24HTTP2_EXPORT_PRIVATE void DoDecode(Http2PushPromiseFields* out,
25 DecodeBuffer* b);
26HTTP2_EXPORT_PRIVATE void DoDecode(Http2PingFields* out, DecodeBuffer* b);
27HTTP2_EXPORT_PRIVATE void DoDecode(Http2GoAwayFields* out, DecodeBuffer* b);
28HTTP2_EXPORT_PRIVATE void DoDecode(Http2WindowUpdateFields* out,
29 DecodeBuffer* b);
30HTTP2_EXPORT_PRIVATE void DoDecode(Http2AltSvcFields* out, DecodeBuffer* b);
31
32} // namespace http2
33
34#endif // QUICHE_HTTP2_DECODER_DECODE_HTTP2_STRUCTURES_H_