xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/http2/decoder/decode_http2_structures.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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
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 "quiche/http2/decoder/decode_buffer.h"
11 #include "quiche/http2/http2_structures.h"
12 #include "quiche/common/platform/api/quiche_export.h"
13 
14 namespace 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 
20 QUICHE_EXPORT void DoDecode(Http2FrameHeader* out, DecodeBuffer* b);
21 QUICHE_EXPORT void DoDecode(Http2PriorityFields* out, DecodeBuffer* b);
22 QUICHE_EXPORT void DoDecode(Http2RstStreamFields* out, DecodeBuffer* b);
23 QUICHE_EXPORT void DoDecode(Http2SettingFields* out, DecodeBuffer* b);
24 QUICHE_EXPORT void DoDecode(Http2PushPromiseFields* out, DecodeBuffer* b);
25 QUICHE_EXPORT void DoDecode(Http2PingFields* out, DecodeBuffer* b);
26 QUICHE_EXPORT void DoDecode(Http2GoAwayFields* out, DecodeBuffer* b);
27 QUICHE_EXPORT void DoDecode(Http2WindowUpdateFields* out, DecodeBuffer* b);
28 QUICHE_EXPORT void DoDecode(Http2AltSvcFields* out, DecodeBuffer* b);
29 QUICHE_EXPORT void DoDecode(Http2PriorityUpdateFields* out, DecodeBuffer* b);
30 
31 }  // namespace http2
32 
33 #endif  // QUICHE_HTTP2_DECODER_DECODE_HTTP2_STRUCTURES_H_
34