chromium/net/third_party/quiche/src/quiche/quic/core/http/http_frames.h

// Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_QUIC_CORE_HTTP_HTTP_FRAMES_H_
#define QUICHE_QUIC_CORE_HTTP_HTTP_FRAMES_H_

#include <algorithm>
#include <cstdint>
#include <map>
#include <ostream>
#include <sstream>

#include "absl/container/flat_hash_map.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "quiche/quic/core/http/http_constants.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/spdy/core/spdy_protocol.h"

namespace quic {

enum class HttpFrameType {};

// 7.2.1.  DATA
//
//   DATA frames (type=0x0) convey arbitrary, variable-length sequences of
//   octets associated with an HTTP request or response payload.
struct QUICHE_EXPORT DataFrame {};

// 7.2.2.  HEADERS
//
//   The HEADERS frame (type=0x1) is used to carry a header block,
//   compressed using QPACK.
struct QUICHE_EXPORT HeadersFrame {};

// 7.2.4.  SETTINGS
//
//   The SETTINGS frame (type=0x4) conveys configuration parameters that
//   affect how endpoints communicate, such as preferences and constraints
//   on peer behavior

SettingsMap;

struct QUICHE_EXPORT SettingsFrame {};

// 7.2.6.  GOAWAY
//
//   The GOAWAY frame (type=0x7) is used to initiate shutdown of a connection by
//   either endpoint.
struct QUICHE_EXPORT GoAwayFrame {};

// https://www.rfc-editor.org/rfc/rfc9412.html
// The ORIGIN HTTP/3 frame allows a server to indicate what origin or origins
// [RFC6454] the server would like the client to consider as one or more
// members of the Origin Set (Section 2.3 of [ORIGIN]) for the connection
// within which it occurs
struct QUICHE_EXPORT OriginFrame {};

// https://httpwg.org/http-extensions/draft-ietf-httpbis-priority.html
//
// The PRIORITY_UPDATE frame specifies the sender-advised priority of a stream.
// Frame type 0xf0700 (called PRIORITY_UPDATE_REQUEST_STREAM in the
// implementation) is used for for request streams.
// Frame type 0xf0701 would be used for push streams but it is not implemented;
// incoming 0xf0701 frames are treated as frames of unknown type.

// Length of a priority frame's first byte.
inline constexpr QuicByteCount kPriorityFirstByteLength =;

struct QUICHE_EXPORT PriorityUpdateFrame {};

// ACCEPT_CH
// https://tools.ietf.org/html/draft-davidben-http-client-hint-reliability-02
//
struct QUICHE_EXPORT AcceptChFrame {};

}  // namespace quic

#endif  // QUICHE_QUIC_CORE_HTTP_HTTP_FRAMES_H_