MOQ track handler for subscribed track.
More...
#include <subscribe_track_handler.h>
|
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.
|
|
|
| SubscribeTrackHandler (const FullTrackName &full_track_name, messages::ObjectPriority priority, messages::GroupOrder group_order, messages::FilterType filter_type) |
| Subscribe track handler constructor.
|
|
void | SetStatus (Status status) noexcept |
| Set the subscribe status.
|
|
MOQ track handler for subscribed track.
MOQ subscribe track handler defines all track related callbacks and functions for subscribe. Track handler operates on a single track (namespace + name).
This extends the base track handler to add subscribe handling
- Examples
- client.cpp, and server.cpp.
◆ Error
Receive status codes.
Enumerator |
---|
kOk | |
kNotAuthorized | |
kNotSubscribed | |
kNoData | |
◆ Status
Status codes for the subscribe track.
Enumerator |
---|
kOk | |
kNotConnected | |
kError | |
kNotAuthorized | |
kNotSubscribed | |
kPendingResponse | |
kSendingUnsubscribe | In this state, callbacks will not be called.
|
◆ SubscribeTrackHandler()
quicr::SubscribeTrackHandler::SubscribeTrackHandler |
( |
const FullTrackName & | full_track_name, |
|
|
messages::ObjectPriority | priority, |
|
|
messages::GroupOrder | group_order, |
|
|
messages::FilterType | filter_type ) |
|
inlineprotected |
Subscribe track handler constructor.
- Parameters
-
full_track_name | Full track name struct |
◆ Create()
static std::shared_ptr< SubscribeTrackHandler > quicr::SubscribeTrackHandler::Create |
( |
const FullTrackName & | full_track_name, |
|
|
messages::ObjectPriority | priority, |
|
|
messages::GroupOrder | group_order = messages::GroupOrder::kAscending, |
|
|
messages::FilterType | filter_type = messages::FilterType::kLatestObject ) |
|
inlinestatic |
Create shared Subscribe track handler.
- Parameters
-
full_track_name | Full track name struct |
priority | Subscription priority, if omitted, publisher priority is considered |
group_order | Order for group delivery |
◆ DgramDataRecv()
virtual void quicr::SubscribeTrackHandler::DgramDataRecv |
( |
std::shared_ptr< const std::vector< uint8_t > > | data | ) |
|
|
virtual |
Notification of received datagram data.
Event notification to provide the caller the raw data received as a datagram
- Parameters
-
data | Shared pointer to the data received |
◆ GetFilterType()
messages::FilterType quicr::SubscribeTrackHandler::GetFilterType |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get subscription filter type.
- Returns
- FilterType value
◆ GetGroupOrder()
messages::GroupOrder quicr::SubscribeTrackHandler::GetGroupOrder |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get subscription group order.
- Returns
- GroupOrder value
◆ GetLatestGroupID()
std::optional< messages::GroupId > quicr::SubscribeTrackHandler::GetLatestGroupID |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ GetLatestObjectID()
std::optional< messages::ObjectId > quicr::SubscribeTrackHandler::GetLatestObjectID |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ GetPriority()
messages::ObjectPriority quicr::SubscribeTrackHandler::GetPriority |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get subscription priority.
- Returns
- Priority value
◆ GetStatus()
Status quicr::SubscribeTrackHandler::GetStatus |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Get the status of the subscribe.
- Returns
- Status of the subscribe
◆ MetricsSampled()
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.
- Parameters
-
metrics | Copy of the subscribed metrics for the sample period |
◆ ObjectReceived()
virtual void quicr::SubscribeTrackHandler::ObjectReceived |
( |
const ObjectHeaders & | object_headers, |
|
|
BytesSpan | data ) |
|
virtual |
Notification of received [full] data object.
Event notification to provide the caller the received full data object
- Warning
- This data will be invalided after return of this method
- Parameters
-
- Examples
- client.cpp, and server.cpp.
◆ PartialObjectReceived()
virtual void quicr::SubscribeTrackHandler::PartialObjectReceived |
( |
const ObjectHeaders & | object_headers, |
|
|
BytesSpan | data ) |
|
inlinevirtual |
Notification of a partial object received data object.
Event notification to provide the caller the received data object
- Warning
- This data will be invalided after return of this method
- Parameters
-
◆ RequestNewGroup()
void quicr::SubscribeTrackHandler::RequestNewGroup |
( |
| ) |
|
|
noexcept |
◆ SetLatestGroupID()
void quicr::SubscribeTrackHandler::SetLatestGroupID |
( |
messages::GroupId | new_id | ) |
|
|
inlineconstexprnoexcept |
◆ SetLatestObjectID()
void quicr::SubscribeTrackHandler::SetLatestObjectID |
( |
messages::ObjectId | new_id | ) |
|
|
inlineconstexprnoexcept |
◆ SetPriority()
void quicr::SubscribeTrackHandler::SetPriority |
( |
uint8_t | priority | ) |
|
|
inlinenoexcept |
Set the priority of received data.
- Parameters
-
priority | Priority value of received data |
◆ SetStatus()
void quicr::SubscribeTrackHandler::SetStatus |
( |
Status | status | ) |
|
|
inlineprotectednoexcept |
Set the subscribe status.
- Parameters
-
status | Status of the subscribe |
◆ StatusChanged()
virtual void quicr::SubscribeTrackHandler::StatusChanged |
( |
Status | status | ) |
|
|
inlinevirtual |
Notification of subscribe status.
Notification of the subscribe status
- Parameters
-
status | Indicates status of the subscribe |
- Examples
- client.cpp, and server.cpp.
◆ StreamDataRecv()
virtual void quicr::SubscribeTrackHandler::StreamDataRecv |
( |
bool | is_start, |
|
|
uint64_t | stream_id, |
|
|
std::shared_ptr< const std::vector< uint8_t > > | data ) |
|
virtual |
Notification of received stream data slice.
Event notification to provide the caller the raw data received on a stream
- Parameters
-
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 |
◆ new_group_request_callback_
std::function<void(messages::SubscribeId, messages::TrackAlias)> quicr::SubscribeTrackHandler::new_group_request_callback_ |
◆ subscribe_track_metrics_
Subscribe metrics for the track.
Subscribe metrics are updated real-time and transport quic metrics on metrics_sample_ms period.
The documentation for this class was generated from the following file: