blob: 9b26d330741662cdaa8e7f0aaf4f2f15b7a88927 [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
QUICHE team5be974e2020-12-29 18:35:24 -050010#include "http2/decoder/decode_buffer.h"
11#include "http2/http2_structures.h"
12#include "common/platform/api/quiche_export.h"
QUICHE teamfd50a402018-12-07 22:54:05 -050013
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
bnc641ace72020-01-21 12:24:57 -080020QUICHE_EXPORT_PRIVATE void DoDecode(Http2FrameHeader* out, DecodeBuffer* b);
21QUICHE_EXPORT_PRIVATE void DoDecode(Http2PriorityFields* out, DecodeBuffer* b);
22QUICHE_EXPORT_PRIVATE void DoDecode(Http2RstStreamFields* out, DecodeBuffer* b);
23QUICHE_EXPORT_PRIVATE void DoDecode(Http2SettingFields* out, DecodeBuffer* b);
24QUICHE_EXPORT_PRIVATE void DoDecode(Http2PushPromiseFields* out,
25 DecodeBuffer* b);
26QUICHE_EXPORT_PRIVATE void DoDecode(Http2PingFields* out, DecodeBuffer* b);
27QUICHE_EXPORT_PRIVATE void DoDecode(Http2GoAwayFields* out, DecodeBuffer* b);
28QUICHE_EXPORT_PRIVATE void DoDecode(Http2WindowUpdateFields* out,
29 DecodeBuffer* b);
30QUICHE_EXPORT_PRIVATE void DoDecode(Http2AltSvcFields* out, DecodeBuffer* b);
bncbea13b82021-01-08 08:46:09 -080031QUICHE_EXPORT_PRIVATE void DoDecode(Http2PriorityUpdateFields* out,
32 DecodeBuffer* b);
QUICHE teamfd50a402018-12-07 22:54:05 -050033
34} // namespace http2
35
36#endif // QUICHE_HTTP2_DECODER_DECODE_HTTP2_STRUCTURES_H_