#ifndef QUICHE_COMMON_CAPSULE_H_
#define QUICHE_COMMON_CAPSULE_H_
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "absl/types/variant.h"
#include "quiche/common/platform/api/quiche_export.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/quiche_buffer_allocator.h"
#include "quiche/common/quiche_ip_address.h"
#include "quiche/web_transport/web_transport.h"
namespace quiche {
enum class CapsuleType : uint64_t { … };
QUICHE_EXPORT std::string CapsuleTypeToString(CapsuleType capsule_type);
QUICHE_EXPORT std::ostream& operator<<(std::ostream& os,
const CapsuleType& capsule_type);
struct QUICHE_EXPORT DatagramCapsule { … };
struct QUICHE_EXPORT LegacyDatagramCapsule { … };
struct QUICHE_EXPORT LegacyDatagramWithoutContextCapsule { … };
struct QUICHE_EXPORT CloseWebTransportSessionCapsule { … };
struct QUICHE_EXPORT DrainWebTransportSessionCapsule { … };
struct QUICHE_EXPORT PrefixWithId { … };
struct QUICHE_EXPORT IpAddressRange { … };
struct QUICHE_EXPORT AddressAssignCapsule { … };
struct QUICHE_EXPORT AddressRequestCapsule { … };
struct QUICHE_EXPORT RouteAdvertisementCapsule { … };
struct QUICHE_EXPORT UnknownCapsule { … };
struct QUICHE_EXPORT WebTransportStreamDataCapsule { … };
struct QUICHE_EXPORT WebTransportResetStreamCapsule { … };
struct QUICHE_EXPORT WebTransportStopSendingCapsule { … };
struct QUICHE_EXPORT WebTransportMaxStreamDataCapsule { … };
struct QUICHE_EXPORT WebTransportMaxStreamsCapsule { … };
class QUICHE_EXPORT Capsule { … };
namespace test {
class CapsuleParserPeer;
}
class QUICHE_EXPORT CapsuleParser { … };
QUICHE_EXPORT quiche::QuicheBuffer SerializeCapsule(
const Capsule& capsule, quiche::QuicheBufferAllocator* allocator);
QUICHE_EXPORT QuicheBuffer SerializeDatagramCapsuleHeader(
uint64_t datagram_size, QuicheBufferAllocator* allocator);
QUICHE_EXPORT QuicheBuffer SerializeWebTransportStreamCapsuleHeader(
webtransport::StreamId stream_id, bool fin, uint64_t write_size,
QuicheBufferAllocator* allocator);
}
#endif