|  | // Copyright 2024 The Chromium Authors. All rights reserved. | 
|  | // Use of this source code is governed by a BSD-style license that can be | 
|  | // found in the LICENSE file. | 
|  |  | 
|  | #ifndef QUICHE_QUIC_MOQT_MOQT_CACHED_OBJECT_H_ | 
|  | #define QUICHE_QUIC_MOQT_MOQT_CACHED_OBJECT_H_ | 
|  |  | 
|  | #include <memory> | 
|  |  | 
|  | #include "quiche/quic/core/quic_time.h" | 
|  | #include "quiche/quic/moqt/moqt_messages.h" | 
|  | #include "quiche/quic/moqt/moqt_priority.h" | 
|  | #include "quiche/quic/moqt/moqt_publisher.h" | 
|  | #include "quiche/common/quiche_mem_slice.h" | 
|  |  | 
|  | namespace moqt { | 
|  |  | 
|  | // CachedObject is a version of PublishedObject with a reference counted | 
|  | // payload. | 
|  | struct CachedObject { | 
|  | Location sequence; | 
|  | MoqtObjectStatus status; | 
|  | MoqtPriority publisher_priority; | 
|  | std::shared_ptr<quiche::QuicheMemSlice> payload; | 
|  | quic::QuicTime arrival_time; | 
|  | bool fin_after_this;  // This is the last object before FIN. | 
|  | }; | 
|  |  | 
|  | // Transforms a CachedObject into a PublishedObject. | 
|  | PublishedObject CachedObjectToPublishedObject(const CachedObject& object); | 
|  |  | 
|  | }  // namespace moqt | 
|  |  | 
|  | #endif  // QUICHE_QUIC_MOQT_MOQT_CACHED_OBJECT_H_ |