LibQuicR
attributes.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) 2025 Cisco Systems
2 // SPDX-License-Identifier: BSD-2-Clause
3 
4 #pragma once
5 
7 #include "quicr/track_name.h"
9 
10 #include <chrono>
11 #include <optional>
12 
13 namespace quicr {
18  {
20  std::optional<messages::Location> largest_location{};
21 
23  };
24 
31  {
32  std::uint64_t request_id{ 0 };
33  };
34 
39  {
41  std::string endpoint_id;
42  };
43 
44  // TODO: Maybe split base attributes out from SUBSCRIBE / PUBLISH?
45  // TODO: E.g priority, new_group_request_id.
46 
49  {
51  const std::optional<std::uint8_t> subscriber_priority;
52 
54  const std::optional<messages::GroupOrder> group_order;
55 
57 
59  const std::optional<bool> forward;
60 
62  const std::optional<std::chrono::milliseconds> subgroup_delivery_timeout;
63 
65  const std::optional<std::chrono::milliseconds> object_delivery_timeout;
66 
68  const std::optional<std::uint64_t> new_group_request_id;
69  };
70 
75  {
76  std::uint8_t priority{ 0 };
77  std::optional<messages::GroupOrder> group_order;
80  };
81  std::chrono::milliseconds delivery_timeout{ 0 };
82  std::chrono::milliseconds expires{ 0 };
83  messages::Filter filter{ std::monostate{} };
84  std::uint8_t forward{ 0 };
85  std::optional<uint64_t> new_group_request_id;
86  bool is_publisher_initiated{ false };
88  std::chrono::milliseconds rendezvous_timeout{ 0 };
89  };
90 
93  {
95 
96  const std::uint64_t track_alias;
97 
98  const std::vector<messages::Token> auth_tokens;
99 
101  const std::optional<std::uint64_t> expires;
102 
104  const std::optional<messages::Location> largest_object;
105 
106  const bool forward;
107 
109 
110  const bool dynamic_groups;
111 
113  const std::uint8_t publisher_priority;
114 
116  const std::optional<std::uint64_t> max_cache_duration;
117 
119  const std::optional<std::uint64_t> delivery_timeout;
120 
122  };
123 
126  {
127  std::uint8_t priority{ 0 };
128  std::optional<messages::GroupOrder> group_order;
131  };
134  };
135 
138  {
139  std::uint8_t priority{ 0 };
140  std::optional<messages::GroupOrder> group_order;
143  };
144  std::uint64_t joining_request_id{ 0 };
145  bool relative{ false };
146  std::uint64_t joining_start{ 0 };
147  };
148 
151  {
152  uint64_t request_id{ 0 };
153 
156  };
157 
158  messages::Filter filter{ std::monostate{} };
159  };
160 
168  struct Redirect
169  {
170  std::string uri;
172  std::optional<Bytes> track_name;
173  std::optional<std::uint64_t> request_id;
174  };
175 
176 }
An N-tuple representation of a MOQ namespace.
Definition: track_name.h:22
Mutable and immutable track-scoped extension maps.
Definition: ctrl_message_types.h:1006
std::variant< std::monostate, SubscriptionFilter, TrackFilter > Filter
Any supported filter representation; monostate means no/unsupported filter.
Definition: ctrl_message_types.h:677
FilterType
In-memory filter discriminator.
Definition: ctrl_message_types.h:546
@ kTrackFilter
Track-selection constraints.
GroupOrder
Requested group traversal order.
Definition: ctrl_message_types.h:532
@ kAscending
Increasing group identifiers.
Definition: attributes.h:13
Full track name struct.
Definition: track_name.h:436
Attributes of an inbound joining FETCH request.
Definition: attributes.h:138
std::uint64_t joining_start
Absolute group identifier or relative group offset.
Definition: attributes.h:146
messages::GroupOrder publisher_default_group_order
Publisher's default group order.
Definition: attributes.h:141
bool relative
Whether joining_start is relative to the largest available group.
Definition: attributes.h:145
std::uint8_t priority
Fetch priority; lower values are higher priority.
Definition: attributes.h:139
std::uint64_t joining_request_id
Request identifier of the subscription being joined.
Definition: attributes.h:144
std::optional< messages::GroupOrder > group_order
Requested group order, if specified.
Definition: attributes.h:140
Attributes of an inbound PUBLISH request.
Definition: attributes.h:93
const FullTrackName track_full_name
Fully qualified name of the offered track.
Definition: attributes.h:94
const bool dynamic_groups
Whether the publisher may create groups dynamically.
Definition: attributes.h:110
const std::optional< std::uint64_t > delivery_timeout
Object delivery timeout in milliseconds, when supplied.
Definition: attributes.h:119
const std::vector< messages::Token > auth_tokens
Authorization tokens carried by the request.
Definition: attributes.h:98
const messages::GroupOrder default_publisher_group_order
Publisher's default group delivery order.
Definition: attributes.h:108
const std::optional< messages::Location > largest_object
Largest object currently available, when advertised.
Definition: attributes.h:104
const std::uint64_t track_alias
Connection-scoped alias assigned to the track by its publisher.
Definition: attributes.h:96
const messages::TrackExtensions track_properties
Additional track properties carried by the request.
Definition: attributes.h:121
const std::uint8_t publisher_priority
Publisher priority; lower values are higher priority.
Definition: attributes.h:113
const bool forward
Whether the publisher requests immediate object forwarding.
Definition: attributes.h:106
const std::optional< std::uint64_t > expires
Publish lifetime in milliseconds, when supplied.
Definition: attributes.h:101
const std::optional< std::uint64_t > max_cache_duration
Maximum cache duration in milliseconds, when supplied.
Definition: attributes.h:116
Publish namespace attributes.
Definition: attributes.h:31
std::uint64_t request_id
Request identifier assigned to the inbound PUBLISH_NAMESPACE request.
Definition: attributes.h:32
Attributes received in response to a successful PUBLISH request.
Definition: attributes.h:49
const messages::Filter filter
Object filter selected by the peer.
Definition: attributes.h:56
const std::optional< std::chrono::milliseconds > object_delivery_timeout
Maximum object delivery time requested by the peer, when supplied.
Definition: attributes.h:65
const std::optional< std::uint8_t > subscriber_priority
Subscriber priority requested by the peer, when supplied.
Definition: attributes.h:51
const std::optional< std::chrono::milliseconds > subgroup_delivery_timeout
Maximum subgroup delivery time requested by the peer, when supplied.
Definition: attributes.h:62
const std::optional< bool > forward
Whether object forwarding is enabled, when explicitly supplied.
Definition: attributes.h:59
const std::optional< messages::GroupOrder > group_order
Delivery order requested by the peer, when supplied.
Definition: attributes.h:54
const std::optional< std::uint64_t > new_group_request_id
Requested next group identifier, when the peer asks to start a new group.
Definition: attributes.h:68
Alternate endpoint and Full Track Name carried by a Redirect.
Definition: attributes.h:169
std::string uri
Definition: attributes.h:170
std::optional< Bytes > track_name
Definition: attributes.h:172
std::optional< std::uint64_t > request_id
Definition: attributes.h:173
TrackNamespace track_namespace
Definition: attributes.h:171
Peer setup attributes.
Definition: attributes.h:39
std::string endpoint_id
Endpoint identifier advertised by the peer, or an empty string if absent.
Definition: attributes.h:41
Attributes of an inbound standalone FETCH request.
Definition: attributes.h:126
messages::FetchEndLocation end_location
Inclusive end of the requested range.
Definition: attributes.h:133
messages::GroupOrder publisher_default_group_order
Publisher's default group order.
Definition: attributes.h:129
messages::Location start_location
Inclusive start of the requested range.
Definition: attributes.h:132
std::uint8_t priority
Fetch priority; lower values are higher priority.
Definition: attributes.h:127
std::optional< messages::GroupOrder > group_order
Requested group order, if specified.
Definition: attributes.h:128
Subscribe attributes.
Definition: attributes.h:75
std::chrono::milliseconds delivery_timeout
Requested object delivery timeout.
Definition: attributes.h:81
messages::Location start_location
First group and object selected by the filter.
Definition: attributes.h:87
std::uint8_t forward
Nonzero to forward objects; zero to pause forwarding.
Definition: attributes.h:84
std::chrono::milliseconds rendezvous_timeout
Maximum time to wait for a matching publisher.
Definition: attributes.h:88
std::chrono::milliseconds expires
Requested subscription lifetime.
Definition: attributes.h:82
std::optional< uint64_t > new_group_request_id
Requested next group identifier, if present.
Definition: attributes.h:85
std::uint8_t priority
Subscriber priority; lower values are higher priority.
Definition: attributes.h:76
messages::GroupOrder publisher_default_group_order
Publisher's default group order.
Definition: attributes.h:78
messages::Filter filter
Filter selecting the requested object range.
Definition: attributes.h:83
bool is_publisher_initiated
Whether the subscription originated from a PUBLISH exchange.
Definition: attributes.h:86
std::optional< messages::GroupOrder > group_order
Subscriber-requested group order, if specified.
Definition: attributes.h:77
Attributes of an inbound namespace subscription request.
Definition: attributes.h:151
uint64_t request_id
Request identifier assigned by the peer.
Definition: attributes.h:152
messages::Filter filter
Filter supplied with the request.
Definition: attributes.h:158
messages::FilterType filter_type
Whether the request subscribes to namespace announcements or matching tracks.
Definition: attributes.h:154
Response to a received TRACK_STATUS.
Definition: attributes.h:18
messages::TrackExtensions track_properties
Track extension properties returned by the publisher.
Definition: attributes.h:22
std::optional< messages::Location > largest_location
Largest object location known for the track, when available.
Definition: attributes.h:20
Inclusive terminal location for a fetch range.
Definition: ctrl_message_types.h:208
Absolute group/object location ordered lexicographically by group then object.
Definition: ctrl_message_types.h:171