LibQuicR
|
#include <fetch_track_handler.h>
Public Types | |
enum class | Error : uint8_t { kOk = 0 , kNotAuthorized , kNotSubscribed , kNoData } |
Receive status codes. More... | |
enum class | Status : uint8_t { kOk = 0 , kNotConnected , kError , kNotAuthorized , kNotSubscribed , kPendingResponse , kSendingUnsubscribe } |
Status codes for the subscribe track. More... | |
Public Member Functions | |
constexpr const messages::GroupId & | GetStartGroup () const noexcept |
Get the starting group id of the Fetch range. | |
constexpr const messages::GroupId & | GetEndGroup () const noexcept |
Get the id of the group one past the end of the Fetch range. | |
constexpr const messages::GroupId & | GetStartObject () const noexcept |
Get the starting object id of the Group range. | |
constexpr const messages::GroupId & | GetEndObject () const noexcept |
Get the id of the object one past the end of the group range. | |
constexpr Status | GetStatus () const noexcept |
Get the status of the subscribe. | |
void | SetPriority (uint8_t priority) noexcept |
Set the priority of received data. | |
constexpr messages::ObjectPriority | GetPriority () const noexcept |
Get subscription priority. | |
constexpr messages::GroupOrder | GetGroupOrder () const noexcept |
Get subscription group order. | |
constexpr messages::FilterType | GetFilterType () const noexcept |
Get subscription filter type. | |
constexpr std::optional< messages::GroupId > | GetLatestGroupID () const noexcept |
constexpr std::optional< messages::ObjectId > | GetLatestObjectID () const noexcept |
constexpr void | SetLatestGroupID (messages::GroupId new_id) noexcept |
constexpr void | SetLatestObjectID (messages::ObjectId new_id) noexcept |
Callbacks | |
virtual void | ObjectReceived (const ObjectHeaders &object_headers, BytesSpan data) |
Notification of received [full] data object. | |
virtual void | StreamDataRecv (bool is_start, uint64_t stream_id, std::shared_ptr< const std::vector< uint8_t > > data) |
Notification of received stream data slice. | |
virtual void | DgramDataRecv (std::shared_ptr< const std::vector< uint8_t > > data) |
Notification of received datagram data. | |
virtual void | PartialObjectReceived (const ObjectHeaders &object_headers, BytesSpan data) |
Notification of a partial object received data object. | |
virtual void | StatusChanged (Status status) |
Notification of subscribe status. | |
virtual void | MetricsSampled (const SubscribeTrackMetrics &metrics) |
Notification callback to provide sampled metrics. | |
void | RequestNewGroup () noexcept |
Static Public Member Functions | |
static std::shared_ptr< FetchTrackHandler > | Create (const FullTrackName &full_track_name, messages::ObjectPriority priority, messages::GroupOrder group_order, messages::GroupId start_group, messages::GroupId end_group, messages::GroupId start_object, messages::GroupId end_object) |
Create shared Fetch track handler. | |
static std::shared_ptr< SubscribeTrackHandler > | Create (const FullTrackName &full_track_name, messages::ObjectPriority priority, messages::GroupOrder group_order=messages::GroupOrder::kAscending, messages::FilterType filter_type=messages::FilterType::kLatestObject) |
Create shared Subscribe track handler. | |
Public Attributes | |
SubscribeTrackMetrics | subscribe_track_metrics_ |
Subscribe metrics for the track. | |
std::function< void(messages::SubscribeId, messages::TrackAlias)> | new_group_request_callback_ |
Protected Member Functions | |
FetchTrackHandler (const FullTrackName &full_track_name, messages::ObjectPriority priority, messages::GroupOrder group_order, messages::GroupId start_group, messages::GroupId end_group, messages::GroupId start_object, messages::GroupId end_object) | |
Fetch track handler constructor. | |
void | SetStatus (Status status) noexcept |
Set the subscribe status. | |
|
stronginherited |
|
stronginherited |
|
inlineprotected |
Fetch track handler constructor.
full_track_name | Full track name struct. |
priority | The priority of the track. |
group_order | The group order to use. |
start_group | The starting group of the range. |
end_group | The final group in the range. |
start_object | The starting object in a group. |
end_object | The final object in a group. |
|
inlinestatic |
Create shared Fetch track handler.
full_track_name | Full track name struct. |
priority | The priority of the track. |
group_order | The group order to use. |
start_group | The starting group of the range. |
start_object | The starting object in a group. |
end_group | The final group in the range. |
end_object | The final object in a group. |
|
inlinestaticinherited |
Create shared Subscribe track handler.
full_track_name | Full track name struct |
priority | Subscription priority, if omitted, publisher priority is considered |
group_order | Order for group delivery |
|
virtualinherited |
Notification of received datagram data.
Event notification to provide the caller the raw data received as a datagram
data | Shared pointer to the data received |
|
inlineconstexprnoexcept |
Get the id of the group one past the end of the Fetch range.
|
inlineconstexprnoexcept |
Get the id of the object one past the end of the group range.
|
inlineconstexprnoexceptinherited |
Get subscription filter type.
|
inlineconstexprnoexceptinherited |
Get subscription group order.
|
inlineconstexprnoexceptinherited |
|
inlineconstexprnoexceptinherited |
|
inlineconstexprnoexceptinherited |
Get subscription priority.
|
inlineconstexprnoexcept |
Get the starting group id of the Fetch range.
|
inlineconstexprnoexcept |
Get the starting object id of the Group range.
|
inlineconstexprnoexceptinherited |
Get the status of the subscribe.
|
inlinevirtualinherited |
Notification callback to provide sampled metrics.
Callback will be triggered on Config::metrics_sample_ms to provide the sampled data based on the sample period. After this callback, the period/sample based metrics will reset and start over for the new period.
metrics | Copy of the subscribed metrics for the sample period |
|
virtualinherited |
Notification of received [full] data object.
Event notification to provide the caller the received full data object
object_headers | Object headers, must include group and object Ids |
data | Object payload data received, MUST match ObjectHeaders::payload_length. |
|
inlinevirtualinherited |
Notification of a partial object received data object.
Event notification to provide the caller the received data object
object_headers | Object headers, must include group and object Ids |
data | Object payload data received, can be <= ObjectHeaders::payload_length |
|
noexceptinherited |
|
inlineconstexprnoexceptinherited |
|
inlineconstexprnoexceptinherited |
|
inlinenoexceptinherited |
Set the priority of received data.
priority | Priority value of received data |
|
inlineprotectednoexceptinherited |
Set the subscribe status.
status | Status of the subscribe |
|
inlinevirtualinherited |
Notification of subscribe status.
Notification of the subscribe status
status | Indicates status of the subscribe |
|
virtualinherited |
Notification of received stream data slice.
Event notification to provide the caller the raw data received on a stream
is_start | True to indicate if this data is the start of a new stream |
stream_id | Stream ID data was received on |
data | Shared pointer to the data received |
|
inherited |
|
inherited |
Subscribe metrics for the track.
Subscribe metrics are updated real-time and transport quic metrics on metrics_sample_ms period.