103 std::optional<Error<ErrorCode>>
GetError() const noexcept {
return error_; }
192 std::optional<Error<ErrorCode>> error_{};
The reply to a callback, which may be answered immediately or deferred.
Definition: reply.h:31
MoQ Session endpoint supporting connection-explicit operations.
Definition: session.h:68
Receives namespace or track publication notifications below a prefix.
Definition: subscribe_namespace_handler.h:25
Mode
Selects which notification family the peer sends for the prefix.
Definition: subscribe_namespace_handler.h:29
@ kNamespaces
Receive NAMESPACE notifications for matching namespaces.
@ kTracks
Receive PUBLISH notifications for matching tracks.
virtual void StatusChanged(Status status)
Notification of subscribe status.
static auto Create(const TrackNamespace &prefix, const Mode mode, const messages::Filter &filter=std::monostate{})
Creates a namespace subscription with shared ownership.
Definition: subscribe_namespace_handler.h:63
std::optional< Error< ErrorCode > > GetError() const noexcept
Get the error code and reason for the subscribe namespace, if any.
Definition: subscribe_namespace_handler.h:103
virtual void NamespaceReceived([[maybe_unused]] const TrackNamespace &name_space)
Reports a NAMESPACE notification in kNamespaces mode.
Definition: subscribe_namespace_handler.h:124
messages::FilterType GetFilterType() const noexcept
Definition: subscribe_namespace_handler.h:87
void RequestError(ErrorCode error_code, std::string reason) override
Stores a request error and enters kError.
Definition: subscribe_namespace_handler.h:178
constexpr const messages::Filter & GetFilter() const noexcept
Definition: subscribe_namespace_handler.h:90
Reply< messages::Parameters, ErrorCode > RequestUpdateReceived(const messages::Parameters ¶ms) override
Rejects updates to a namespace subscription.
void SetStatus(const Status status) noexcept
Set the subscribe status.
Definition: subscribe_namespace_handler.h:139
void SetError(const Error< ErrorCode > &error)
Stores an error and transitions to kError.
Definition: subscribe_namespace_handler.h:152
virtual void NamespaceDoneReceived([[maybe_unused]] const TrackNamespace &name_space)
Reports a NAMESPACE_DONE notification in kNamespaces mode.
Definition: subscribe_namespace_handler.h:131
Status
Status codes for the subscribe track.
Definition: subscribe_namespace_handler.h:38
@ kNotSubscribed
Initial state; no active namespace subscription.
@ kError
The peer or library rejected the request; inspect GetError().
@ kOk
The peer accepted the subscription.
const TrackNamespace & GetPrefix() const noexcept
Definition: subscribe_namespace_handler.h:84
void RequestOkReceived(const messages::Parameters ¶ms) override
Handles acceptance by validating empty parameters and entering kOk.
constexpr Mode GetMode() const noexcept
Get the mode this handler is operating in.
Definition: subscribe_namespace_handler.h:109
constexpr Status GetStatus() const noexcept
Get the status of the subscribe.
Definition: subscribe_namespace_handler.h:97
SubscribeNamespaceHandler(const TrackNamespace &prefix, Mode mode, const messages::Filter &filter=std::monostate{})
Constructs a namespace subscription.
TrackNamespace ExpandSuffix(const TrackNamespace &suffix) const
Fully qualifies a NAMESPACE suffix relative to the subscribed prefix.
virtual ~SubscribeNamespaceHandler()
Destroys the handler; destruction currently sends no protocol message.
Common request state for track-related handlers.
Definition: track_handler.h:36
An N-tuple representation of a MOQ namespace.
Definition: track_name.h:22
Definition: parameters.h:185
FilterType GetFilterType(const Filter &filter)
Definition: ctrl_message_types.h:681
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
Definition: attributes.h:13
ErrorCode
MOQT error code, as carried by REQUEST_ERROR.
Definition: errors.h:33
@ kInternalError
The endpoint encountered an unspecified internal failure.
A rejected result, holding why the request was rejected.
Definition: errors.h:21