xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/http2/decoder/decode_status.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_STATUS_H_
6 #define QUICHE_HTTP2_DECODER_DECODE_STATUS_H_
7 
8 // Enum DecodeStatus is used to report the status of decoding of many
9 // types of HTTP/2 and HPACK objects.
10 
11 #include <ostream>
12 
13 #include "quiche/common/platform/api/quiche_export.h"
14 
15 namespace http2 {
16 
17 enum class DecodeStatus {
18   // Decoding is done.
19   kDecodeDone,
20 
21   // Decoder needs more input to be able to make progress.
22   kDecodeInProgress,
23 
24   // Decoding failed (e.g. HPACK variable length integer is too large, or
25   // an HTTP/2 frame has padding declared to be larger than the payload).
26   kDecodeError,
27 };
28 QUICHE_EXPORT std::ostream& operator<<(std::ostream& out, DecodeStatus v);
29 
30 }  // namespace http2
31 
32 #endif  // QUICHE_HTTP2_DECODER_DECODE_STATUS_H_
33