|
LibQuicR
|
Classes | |
| struct | ProtocolViolationException |
| Exception indicating that received or constructed data violates the MoQ protocol. More... | |
| struct | Location |
| Absolute group/object location ordered lexicographically by group then object. More... | |
| struct | FetchEndLocation |
| Inclusive terminal location for a fetch range. More... | |
| struct | KeyValuePair |
| struct | Token |
| struct | SubscriptionFilter |
| struct | TrackFilter |
| Selects tracks by property, count, and timeout constraints. More... | |
| class | KeyValuePairs |
| Draft 18 flat key-value pairs: a bounded, sorted KVP sequence without a leading count. More... | |
| class | TrackExtensions |
| Mutable and immutable track-scoped extension maps. More... | |
| class | Message |
| Generic message buffer formatting class. More... | |
| struct | StreamHeaderProperties |
| struct | DatagramHeaderProperties |
| struct | FetchHeader |
| Header opening a fetch data stream. More... | |
| struct | FetchSerializationProperties |
| Fetch data-plane serialization flag. More... | |
| struct | FetchObject |
| One wire-level object or end-of-range marker on a fetch stream. More... | |
| struct | ResolvedFetchObject |
| Fetch object after stateful delta resolution. More... | |
| class | FetchObjectSerializationState |
| Fetch data-plane (de)serializer. More... | |
| struct | ObjectDatagram |
| Payload-bearing object datagram. More... | |
| struct | ObjectDatagramStatus |
| Object-status datagram without payload. More... | |
| struct | StreamHeaderSubGroup |
| Header opening a subgroup object stream. More... | |
| struct | StreamSubGroupObject |
| One object record carried after a StreamHeaderSubGroup. More... | |
| class | ParameterList |
Typedefs | |
| using | Filter = std::variant< std::monostate, SubscriptionFilter, TrackFilter > |
| Any supported filter representation; monostate means no/unsupported filter. More... | |
| using | Parameter = KeyValuePair< ParameterType > |
| A message parameter key/value pair. More... | |
| using | SetupParameter = KeyValuePair< SetupOptionType > |
| A setup-option key/value pair. More... | |
| using | Parameters = quicr::messages::ParameterList< quicr::messages::ParameterType > |
| Standard message-parameter list. More... | |
Functions | |
| Bytes & | operator<< (Bytes &buffer, const Bytes &bytes) |
| Bytes & | operator<< (Bytes &buffer, const BytesSpan &bytes) |
| BytesSpan | operator>> (BytesSpan buffer, Bytes &value) |
| Bytes & | operator<< (Bytes &buffer, std::uint64_t value) |
| BytesSpan | operator>> (BytesSpan buffer, std::uint64_t &value) |
| Bytes & | operator<< (Bytes &buffer, std::uint8_t value) |
| BytesSpan | operator>> (BytesSpan buffer, uint8_t &value) |
| Bytes & | operator<< (Bytes &buffer, std::uint16_t value) |
| BytesSpan | operator>> (BytesSpan buffer, std::uint16_t &value) |
| Bytes & | operator<< (Bytes &buffer, const UintVar &value) |
| Bytes & | operator<< (Bytes &buffer, const Location &location) |
| BytesSpan | operator>> (BytesSpan buffer, Location &location) |
| template<KeyType T> | |
| Bytes & | operator<< (Bytes &buffer, const T value) |
| template<KeyType T> | |
| BytesSpan | operator>> (BytesSpan buffer, T &value) |
| template<KeyType T> | |
| void | SerializeKvp (Bytes &buffer, const KeyValuePair< T > &kvp, const T prev_type) |
| template<KeyType T> | |
| void | ParseKvp (BytesSpan &buffer, KeyValuePair< T > &kvp, const T prev_type) |
| Bytes & | operator<< (Bytes &buffer, const Token &token) |
| BytesSpan | operator>> (BytesSpan buffer, Token &token) |
| Bytes & | operator<< (Bytes &buffer, GroupOrder value) |
| BytesSpan | operator>> (BytesSpan buffer, GroupOrder &value) |
| Bytes & | operator<< (Bytes &bytes, const SubscriptionFilter &filter) |
| BytesSpan | operator>> (BytesSpan bytes, SubscriptionFilter &filter) |
| Bytes & | operator<< (Bytes &bytes, const TrackFilter &filter) |
| BytesSpan | operator>> (BytesSpan bytes, TrackFilter &filter) |
| FilterType | GetFilterType (const Filter &filter) |
| Bytes & | operator<< (Bytes &bytes, const Filter &filter) |
| BytesSpan | operator>> (BytesSpan, Filter &) |
| Filter | DeserializeFilter (FilterType filter_type, BytesSpan bytes) |
| Bytes & | operator<< (Bytes &buffer, PublishDoneStatusCode value) |
| BytesSpan | operator>> (BytesSpan buffer, PublishDoneStatusCode &value) |
| Bytes & | operator<< (Bytes &buffer, FetchType value) |
| BytesSpan | operator>> (BytesSpan buffer, FetchType &value) |
| BytesSpan | operator>> (BytesSpan buffer, KeyValuePairs &msg) |
| Bytes & | operator<< (Bytes &buffer, const KeyValuePairs &msg) |
| BytesSpan | operator>> (BytesSpan buffer, TrackExtensions &msg) |
| Bytes & | operator<< (Bytes &buffer, const TrackExtensions &msg) |
| Bytes & | operator<< (Bytes &buffer, const std::optional< Extensions > &extensions) |
| Bytes & | operator<< (Bytes &buffer, const Extensions &extensions) |
| BytesSpan | operator>> (BytesSpan buffer, Extensions &extensions) |
| void | SerializeExtensions (Bytes &buffer, const std::optional< Extensions > &extensions, const std::optional< Extensions > &immutable_extensions) |
| template<class StreamBufferType > | |
| bool | ParseExtensions (StreamBufferType &buffer, std::optional< std::size_t > &extension_headers_length, std::optional< Extensions > &extensions, std::optional< Extensions > &immutable_extensions, std::size_t &extension_bytes_remaining, std::optional< std::uint64_t > ¤t_header, std::uint64_t &prev_extension_type) |
| BytesSpan | operator>> (BytesSpan buffer, FetchHeader &msg) |
| Bytes & | operator<< (Bytes &buffer, const FetchHeader &msg) |
| bool | operator>> (Bytes &buffer, FetchObject &msg) |
| Bytes & | operator<< (Bytes &buffer, const FetchObject &msg) |
| Bytes & | operator<< (Bytes &buffer, const ObjectDatagram &msg) |
| Bytes & | operator<< (Bytes &buffer, const ObjectDatagramStatus &msg) |
| bool | operator>> (Bytes &buffer, StreamHeaderSubGroup &msg) |
| Bytes & | operator<< (Bytes &buffer, const StreamHeaderSubGroup &msg) |
| bool | operator>> (Bytes &buffer, StreamSubGroupObject &msg) |
| Bytes & | operator<< (Bytes &buffer, const StreamSubGroupObject &msg) |
| constexpr ParameterType | ToParameterFilterType (FilterType type) |
| constexpr FilterType | ToFilterType (ParameterType type) |
| ParameterType | GetFilterParameterType (const Filter &filter) |
| Parameter | SerializeFilter (FilterType filter_type, const Filter &filter) |
| ParameterEncoding | GetParameterEncoding (ParameterType type) |
| template<typename Type = ParameterType> | |
| BytesSpan | operator>> (BytesSpan buffer, ParameterList< Type > &msg) |
| template<typename Type = ParameterType> | |
| Bytes & | operator<< (Bytes &buffer, const ParameterList< Type > &msg) |
| void | ValidateParameters (const Parameters ¶ms, std::initializer_list< ParameterType > allowed) |
| std::vector< Token > | CollectAuthTokens (const Parameters ¶ms) |
| bool | ResolveForward (const Parameters ¶ms, bool default_value) |
| std::optional< GroupOrder > | ResolveGroupOrder (const Parameters ¶ms) |
| std::optional< std::uint64_t > | ResolveExpires (const Parameters ¶ms) |
| bool | ContainsAnyFilter (const Parameters ¶ms) |
| Filter | ResolveFilter (const Parameters ¶ms) |
Variables | |
| template<typename T > | |
| concept | KeyType |
| template<class T > | |
| concept | HasByteStreamOperators |
| template<class T > | |
| concept | ByteParameter |
| template<typename T > | |
| concept | ParameterValueType |
| constexpr FilterType | kFilterTypes [] |
| Filter kinds searched by ContainsAnyFilter() and ResolveFilter(), in precedence order. More... | |
| using quicr::messages::Filter = typedef std::variant<std::monostate, SubscriptionFilter, TrackFilter> |
Any supported filter representation; monostate means no/unsupported filter.
| using quicr::messages::Parameter = typedef KeyValuePair<ParameterType> |
A message parameter key/value pair.
| using quicr::messages::Parameters = typedef quicr::messages::ParameterList<quicr::messages::ParameterType> |
Standard message-parameter list.
| using quicr::messages::SetupParameter = typedef KeyValuePair<SetupOptionType> |
A setup-option key/value pair.
|
strong |
MoQ control-message wire type codes.
|
strong |
Possible datagram object header types.
|
strong |
|
strong |
Known track/object extension type codes.
|
strong |
|
strong |
|
strong |
|
strong |
Requested group traversal order.
| Enumerator | |
|---|---|
| kAscending | Increasing group identifiers. |
| kDescending | Decreasing group identifiers. |
|
strong |
|
strong |
Message-parameter type codes used as delta-encoded map keys on the wire.
|
strong |
Publish-done status codes.
|
strong |
SETUP option type codes.
|
strong |
|
strong |
Data-stream reset error codes.
| Enumerator | |
|---|---|
| kInternalError | Internal failure. |
| kCancelled | Delivery was cancelled. |
| kDeliveryTimeout | Delivery timed out. |
| kSessionClosed | Session closed. |
| kUnknownObjectStatus | Unknown object status. |
| kMalformedTrack | Track data is malformed. |
|
strong |
|
strong |
|
strong |
Session termination reason codes.
|
inline |
Decodes authorization-token values.
| params | Source parameters. |
| ProtocolViolationException | for an invalid token alias discriminator. |
|
inline |
| params | Parameters to inspect. |
|
inline |
Decodes a concrete filter body.
| filter_type | Expected filter type. |
| bytes | Span bounded to the filter body. |
|
inline |
| filter | Filter to inspect. |
filter.
|
inline |
| filter | Filter to inspect. |
filter alternative.
|
inline |
Look up the wire encoding for a Message Parameter type.
| type | The parameter type. |
| ProtocolViolationException | if the type is unknown. |
Appends a varint length and copied bytes.
| buffer | Destination bytes. |
| bytes | Bytes to copy. |
buffer. Appends a varint length and copied span bytes.
| buffer | Destination bytes. |
| bytes | Bytes to copy. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const Extensions & | extensions | ||
| ) |
Appends a length-prefixed, sorted, delta-keyed extension block.
| buffer | Destination bytes. |
| extensions | Extensions to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const FetchHeader & | msg | ||
| ) |
Serializes type and request ID as UintVars.
| buffer | Destination bytes. |
| msg | Header to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const FetchObject & | msg | ||
| ) |
Serializes one fetch object.
| buffer | Destination bytes. |
| msg | Object to serialize. |
buffer. | std::invalid_argument | if an end marker has payload. |
| ProtocolViolationException | for nested immutable extensions. |
| Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const KeyValuePairs & | msg | ||
| ) |
Appends sorted, delta-keyed KVPs without a count or outer length.
| buffer | Destination bytes. |
| msg | KVPs to serialize. |
buffer. Appends a location as two UintVars.
| buffer | Destination bytes. |
| location | Location to encode. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const ObjectDatagram & | msg | ||
| ) |
Serializes header fields followed by raw payload bytes.
| buffer | Destination bytes. |
| msg | Datagram to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const ObjectDatagramStatus & | msg | ||
| ) |
Serializes a status datagram.
| buffer | Destination bytes. |
| msg | Datagram to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const ParameterList< Type > & | msg | ||
| ) |
Appends a counted, sorted, delta-keyed parameter list.
| Type | Parameter-key type. |
| buffer | Destination byte vector. |
| msg | List to serialize. |
buffer. | ProtocolViolationException | for unknown parameter types. |
| Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const std::optional< Extensions > & | extensions | ||
| ) |
Appends a length-prefixed extension block, or a zero length when absent.
| buffer | Destination bytes. |
| extensions | Optional extensions to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const StreamHeaderSubGroup & | msg | ||
| ) |
Serializes a subgroup header.
| buffer | Destination bytes. |
| msg | Header to serialize. |
buffer. | std::invalid_argument | for subgroup-ID fields inconsistent with the selected mode. |
| Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const StreamSubGroupObject & | msg | ||
| ) |
Serializes one subgroup object.
| buffer | Destination bytes. |
| msg | Object to serialize. |
buffer. Serializes a uint64-compatible key as UintVar.
| T | Key type. |
| buffer | Destination bytes. |
| value | Value to encode. |
buffer. Serializes a token body without an enclosing length.
| buffer | Destination bytes. |
| token | Token to serialize. |
buffer. | std::bad_optional_access | when fields required by alias_type are absent. |
| Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| const TrackExtensions & | msg | ||
| ) |
Appends mutable KVPs plus an immutable container KVP.
| buffer | Destination bytes. |
| msg | Extensions to serialize. |
buffer. Appends the stored UintVar encoding verbatim.
| buffer | Destination bytes. |
| value | Encoding to append. |
buffer. Serializes a FetchType as UintVar.
| buffer | Destination bytes. |
| value | Fetch type to serialize. |
buffer. | Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| GroupOrder | value | ||
| ) |
Serializes a validated GroupOrder as UintVar.
| ProtocolViolationException | for another value. |
| Bytes& quicr::messages::operator<< | ( | Bytes & | buffer, |
| PublishDoneStatusCode | value | ||
| ) |
Serializes a PublishDoneStatusCode as UintVar.
| buffer | Destination bytes. |
| value | Status code to serialize. |
buffer. Appends a two-byte big-endian integer.
| buffer | Destination bytes. |
| value | Value to append. |
buffer. Appends a value as UintVar.
| buffer | Destination bytes. |
| value | Value to encode. |
buffer. Appends one raw byte.
| buffer | Destination bytes. |
| value | Byte to append. |
buffer. Serializes the active filter body without a discriminator.
| bytes | Destination bytes. |
| filter | Filter to serialize. |
bytes.
|
inline |
|
inline |
Serializes three UintVars.
| bytes | Destination bytes. |
| filter | Filter to serialize. |
bytes. | bool quicr::messages::operator>> | ( | Bytes & | buffer, |
| FetchObject & | msg | ||
| ) |
Declared byte-vector fetch-object decoder.
| buffer | Input bytes. |
| msg | Destination object. |
| bool quicr::messages::operator>> | ( | Bytes & | buffer, |
| StreamHeaderSubGroup & | msg | ||
| ) |
Declared byte-vector subgroup-header decoder.
| buffer | Input bytes. |
| msg | Destination header. |
| bool quicr::messages::operator>> | ( | Bytes & | buffer, |
| StreamSubGroupObject & | msg | ||
| ) |
Declared byte-vector subgroup-object decoder.
| buffer | Input bytes. |
| msg | Destination object. |
Parses length-prefixed bytes.
| buffer | Input span. |
| value | Destination for the parsed bytes. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| Extensions & | extensions | ||
| ) |
Parses one length-prefixed extension block.
| buffer | Input span. |
| extensions | Destination extensions. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| FetchHeader & | msg | ||
| ) |
Declared contiguous-span fetch-header decoder.
| buffer | Input span. |
| msg | Destination header. |
Parses one raw byte as FetchType without range validation.
| buffer | Input span. |
| value | Destination fetch type. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| GroupOrder & | value | ||
| ) |
Parses and validates a GroupOrder.
| ProtocolViolationException | for another value. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| KeyValuePairs & | msg | ||
| ) |
Parses KVPs through the end of the input span.
| buffer | Input span. |
| msg | Destination replaced with parsed KVPs. |
Parses two UintVars as a location.
| buffer | Input span. |
| location | Destination for the parsed location. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| ParameterList< Type > & | msg | ||
| ) |
Parses a counted, delta-keyed parameter list and advances the span. Existing entries are not cleared; decoded bytes append to matching keys.
| Type | Parameter-key type. |
| buffer | Input span passed by value. |
| msg | Destination list. |
buffer. | ProtocolViolationException | for unknown parameter types. |
| UintVarInvalidArgException | or std::invalid_argument for truncated input. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| PublishDoneStatusCode & | value | ||
| ) |
Parses a PublishDoneStatusCode without range validation.
| buffer | Input span. |
| value | Destination status code. |
Parses a two-byte big-endian integer.
| buffer | Input span. |
| value | Destination for the parsed value. |
| std::invalid_argument | on truncation. |
Parses one UintVar.
| buffer | Input span. |
| value | Destination for the decoded value. |
Parses a UintVar key and advances the span.
| T | Key type. |
| buffer | Input span. |
| value | Decoded value. |
Parses a token body.
Register and use-value consume every byte remaining in buffer as the token value, so callers must pass a span bounded to one token parameter.
| buffer | Input span bounded to one token parameter. |
| token | Destination token. |
| ProtocolViolationException | for an unknown alias operation. |
| BytesSpan quicr::messages::operator>> | ( | BytesSpan | buffer, |
| TrackExtensions & | msg | ||
| ) |
Parses KVPs through the end of the input span.
| buffer | Input span. |
| msg | Destination whose extension maps are replaced. |
Parses one raw byte.
| buffer | Input span. |
| value | Destination for the parsed byte. |
| std::invalid_argument | on truncation. |
|
inline |
Resets and parses a location filter.
| bytes | Input span. |
| filter | Destination filter. |
|
inline |
Parses three UintVars.
| bytes | Input span. |
| filter | Destination filter. |
Rejects decoding without a concrete filter type.
| std::runtime_error | unconditionally. |
| bool quicr::messages::ParseExtensions | ( | StreamBufferType & | buffer, |
| std::optional< std::size_t > & | extension_headers_length, | ||
| std::optional< Extensions > & | extensions, | ||
| std::optional< Extensions > & | immutable_extensions, | ||
| std::size_t & | extension_bytes_remaining, | ||
| std::optional< std::uint64_t > & | current_header, | ||
| std::uint64_t & | prev_extension_type | ||
| ) |
Parse extensions from MoQ encoded format.
| StreamBufferType | Incremental buffer providing UintVar and byte reads. |
| buffer | Buffer to parse from. |
| extension_headers_length | Extract length of all extension headers. |
| extensions | Parsed mutable extensions, if any. |
| immutable_extensions | Parsed immutable extensions, if any. |
| extension_bytes_remaining | Total bytes of extension headers left to parse. |
| current_header | Current header key being parsed (absolute type, after delta decoding). |
| prev_extension_type | Previous extension type for delta decoding. |
| ProtocolViolationException | on delta overflow or nested immutable extensions. |
buffer even when false is returned. | void quicr::messages::ParseKvp | ( | BytesSpan & | buffer, |
| KeyValuePair< T > & | kvp, | ||
| const T | prev_type | ||
| ) |
Deserialize KVP.
| buffer | Buffer to read from. |
| kvp | The KeyValuePair to read into. |
| prev_type | The previous type value to unwrap the delta. |
buffer is mutated to its unconsumed suffix. | ProtocolViolationException | if delta causes overflow past 2^64-1. |
|
inline |
| params | Parameters to inspect. |
|
inline |
Resolves the first present filter according to kFilterTypes order.
| params | Parameters to inspect. |
|
inline |
Resolves the optional FORWARD byte.
| params | Parameters to inspect. |
| default_value | Value to return when FORWARD is absent. |
default_value when absent; otherwise the encoded Boolean. | ProtocolViolationException | unless the encoded value is zero or one. |
|
inline |
Resolves and validates GROUP_ORDER.
| params | Parameters to inspect. |
| ProtocolViolationException | for any other byte value. |
| void quicr::messages::SerializeExtensions | ( | Bytes & | buffer, |
| const std::optional< Extensions > & | extensions, | ||
| const std::optional< Extensions > & | immutable_extensions | ||
| ) |
Serialize extensions to MoQ encoding.
| buffer | Buffer to serialize to. |
| extensions | Optionally, mutable extensions. |
| immutable_extensions | Optionally, immutable extensions. |
| ProtocolViolationException | if immutable extensions contain kImmutable. |
|
inline |
Serializes a filter into a parameter value.
| filter_type | Wire discriminator used for the parameter key. |
| filter | Active filter value. No validation ensures it matches filter_type. |
| void quicr::messages::SerializeKvp | ( | Bytes & | buffer, |
| const KeyValuePair< T > & | kvp, | ||
| const T | prev_type | ||
| ) |
Serialize KVP.
| buffer | Buffer to write into. |
| kvp | The KeyValuePair to write. |
| prev_type | The previous type value so we can do the delta. |
| std::invalid_argument | if an even-key value exceeds eight bytes. |
kvp.type must not be less than prev_type; this function does not validate underflow.
|
constexpr |
Converts a filter parameter key to its filter discriminator.
| type | Parameter key to convert. |
| std::invalid_argument | if type is not a filter parameter. |
|
constexpr |
| type | Filter type to convert. |
type, or kInvalid for kNone.
|
inline |
Ensures every stored key is allowed.
| params | Parameters to inspect. |
| allowed | Allowed parameter types. |
| ProtocolViolationException | for a disallowed key or duplicate non-token key. |
| concept quicr::messages::ByteParameter |
Types representable by one raw parameter byte.
| T | Candidate integral or byte-backed enum type. |
| concept quicr::messages::HasByteStreamOperators |
Types with matching insertion into Bytes and extraction from BytesSpan.
| T | Candidate type. |
| concept quicr::messages::KeyType |
Types usable as delta-encoded KVP keys.
| T | Either uint64_t or an enum with uint64_t underlying type. |
|
inlineconstexpr |
Filter kinds searched by ContainsAnyFilter() and ResolveFilter(), in precedence order.
| concept quicr::messages::ParameterValueType |
Types accepted by typed parameter insertion and retrieval.
| T | Candidate value type. |