blob: fdecd224e3868de2b0dc10638ae6ef5b4e707d4f [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_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 "net/third_party/quiche/src/http2/platform/api/http2_export.h"
14
15namespace http2 {
16
17enum 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};
28HTTP2_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
29 DecodeStatus v);
30
31} // namespace http2
32
33#endif // QUICHE_HTTP2_DECODER_DECODE_STATUS_H_