#include "quiche/http2/core/spdy_alt_svc_wire_format.h"
#include <algorithm>
#include <cctype>
#include <cstdint>
#include <limits>
#include <string>
#include <utility>
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "quiche/common/platform/api/quiche_logging.h"
namespace spdy {
namespace {
template <class T>
bool ParsePositiveIntegerImpl(absl::string_view::const_iterator c,
absl::string_view::const_iterator end, T* value) { … }
}
SpdyAltSvcWireFormat::AlternativeService::AlternativeService() = default;
SpdyAltSvcWireFormat::AlternativeService::AlternativeService(
const std::string& protocol_id, const std::string& host, uint16_t port,
uint32_t max_age_seconds, VersionVector version)
: … { … }
SpdyAltSvcWireFormat::AlternativeService::~AlternativeService() = default;
SpdyAltSvcWireFormat::AlternativeService::AlternativeService(
const AlternativeService& other) = default;
bool SpdyAltSvcWireFormat::ParseHeaderFieldValue(
absl::string_view value, AlternativeServiceVector* altsvc_vector) { … }
std::string SpdyAltSvcWireFormat::SerializeHeaderFieldValue(
const AlternativeServiceVector& altsvc_vector) { … }
void SpdyAltSvcWireFormat::SkipWhiteSpace(
absl::string_view::const_iterator* c,
absl::string_view::const_iterator end) { … }
bool SpdyAltSvcWireFormat::PercentDecode(absl::string_view::const_iterator c,
absl::string_view::const_iterator end,
std::string* output) { … }
bool SpdyAltSvcWireFormat::ParseAltAuthority(
absl::string_view::const_iterator c, absl::string_view::const_iterator end,
std::string* host, uint16_t* port) { … }
bool SpdyAltSvcWireFormat::ParsePositiveInteger16(
absl::string_view::const_iterator c, absl::string_view::const_iterator end,
uint16_t* value) { … }
bool SpdyAltSvcWireFormat::ParsePositiveInteger32(
absl::string_view::const_iterator c, absl::string_view::const_iterator end,
uint32_t* value) { … }
char SpdyAltSvcWireFormat::HexDigitToInt(char c) { … }
bool SpdyAltSvcWireFormat::HexDecodeToUInt32(absl::string_view data,
uint32_t* value) { … }
}