LibQuicR
joining_fetch_handler.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 
8 
9 namespace quicr {
18  {
19  public:
26  explicit JoiningFetchHandler(std::shared_ptr<SubscribeTrackHandler> joining_subscribe,
28  : SubscribeTrackHandler(joining_subscribe->GetFullTrackName(),
29  joining_subscribe->GetSubscriberPriority(),
30  group_order,
31  joining_subscribe->GetFilter())
32  , joining_subscribe_(std::move(joining_subscribe))
33  {
34  }
35 
45  void ObjectReceived(const ObjectHeaders& object_headers,
46  BytesSpan data,
47  std::optional<messages::StreamHeaderProperties> stream_mode = std::nullopt) override;
48 
49  private:
50  std::shared_ptr<SubscribeTrackHandler> joining_subscribe_;
51 
52  friend class Session;
53  };
54 
55 } // namespace moq
Adapts a joining-fetch stream to an existing subscription.
Definition: joining_fetch_handler.h:18
void ObjectReceived(const ObjectHeaders &object_headers, BytesSpan data, std::optional< messages::StreamHeaderProperties > stream_mode=std::nullopt) override
Forwards a fetched object to the joined subscription.
JoiningFetchHandler(std::shared_ptr< SubscribeTrackHandler > joining_subscribe, messages::GroupOrder group_order=messages::GroupOrder::kAscending)
Constructs an adapter for a subscription's joining fetch.
Definition: joining_fetch_handler.h:26
MoQ Session endpoint supporting connection-explicit operations.
Definition: session.h:68
MOQ track handler for subscribed track.
Definition: subscribe_track_handler.h:25
constexpr std::uint8_t GetSubscriberPriority() const noexcept
Get subscription priority.
Definition: subscribe_track_handler.h:141
constexpr const messages::Filter & GetFilter() const noexcept
Definition: subscribe_track_handler.h:172
FullTrackName GetFullTrackName() const noexcept
Get the full track name.
Definition: track_handler.h:125
GroupOrder
Requested group traversal order.
Definition: ctrl_message_types.h:532
@ kAscending
Increasing group identifiers.
Definition: attributes.h:13
std::span< const Byte > BytesSpan
Non-owning, read-only view of contiguous bytes.
Definition: bytes.h:21
Object headers struct.
Definition: object.h:49