14#ifndef ZYPP_MEDIA_PRIVATE_PROVIDE_ITEM_P_H_INCLUDED
15#define ZYPP_MEDIA_PRIVATE_PROVIDE_ITEM_P_H_INCLUDED
21#include <zypp-media/ng/Provide>
22#include <zypp-media/ng/ProvideItem>
23#include <zypp-media/ng/ProvideRes>
24#include <zypp-media/ng/ProvideSpec>
25#include <zypp-core/zyppng/base/private/base_p.h>
55 const std::optional<zypp::Url>
activeUrl()
const;
62 const std::vector<zypp::Url> &
urls()
const {
108 template<
typename T >
154 expected<zypp::media::AuthData>
authenticationRequired (
ProvideQueue &queue, ProvideRequestRef req,
const zypp::Url &effectiveUrl, int64_t lastTimestamp,
const std::map<std::string, std::string> &extraFields )
override;
176 SignalProxy< void(
const zyppng::expected<AttachedMediaInfo *> & ) >
sigReady ();
190 expected<zypp::media::AuthData>
authenticationRequired (
ProvideQueue &queue, ProvideRequestRef req,
const zypp::Url &effectiveUrl, int64_t lastTimestamp,
const std::map<std::string, std::string> &extraFields )
override;
195 Signal< void(
const zyppng::expected<AttachedMediaInfo *> & )>
_sigReady;
200 ProvideQueue::Config::WorkerType
_workerType = ProvideQueue::Config::Invalid;
Store and operate with byte count.
expected< zypp::media::AuthData > authenticationRequired(ProvideQueue &queue, ProvideRequestRef req, const zypp::Url &effectiveUrl, int64_t lastTimestamp, const std::map< std::string, std::string > &extraFields) override
zypp::Pathname _stagingFile
void cancelWithError(std::exception_ptr error) override
zypp::ByteCount bytesExpected() const override
void setMediaRef(Provide::MediaHandle &&hdl)
Provide::MediaHandle & mediaRef()
void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg) override
Provide::MediaHandle _handleRef
void initialize() override
static ProvideFileItemRef create(const std::vector< zypp::Url > &urls, const ProvideFileSpec &request, ProvidePrivate &parent)
ProvideFileSpec _initialSpec
ProvidePromiseRef< ProvideRes > promise()
std::vector< zypp::Url > _mirrorList
zypp::ByteCount _expectedBytes
zypp::Pathname _targetFile
ItemStats makeStats() override
void informalMessage(ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg) override
ProvidePromiseWeakRef< ProvideRes > _promise
Signal< void(ProvideItem &item, ProvideItem::State oldState, ProvideItem::State newState)> _sigStateChanged
std::chrono::steady_clock::time_point _itemFinished
std::optional< ProvideItem::ItemStats > _currStats
ProvideItemPrivate(ProvidePrivate &parent, ProvideItem &pub)
ProvideItem::State _itemState
std::chrono::steady_clock::time_point _itemStarted
std::optional< ProvideItem::ItemStats > _prevStats
virtual void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg)
ProvideItemWeakRef _myProvide
ProvidePromise(ProvideItemRef provideItem)
std::vector< zypp::Url > _pastRedirects
void setActiveUrl(const zypp::Url &urlToUse)
ProvideQueueWeakRef _myQueue
const std::vector< zypp::Url > & urls() const
std::optional< zypp::Url > _activeUrl
std::vector< zypp::Url > _mirrors
static expected< ProvideRequestRef > createDetach(const zypp::Url &url)
ProvideMessage & provideMessage()
static expected< ProvideRequestRef > create(ProvideItem &owner, const std::vector< zypp::Url > &urls, const std::string &id, ProvideMediaSpec &spec)
const ProvideMessage & provideMessage() const
void setCurrentQueue(ProvideQueueRef ref)
void setUrls(const std::vector< zypp::Url > &urls)
ProvideQueueRef currentQueue()
const std::optional< zypp::Url > activeUrl() const
void setUrl(const zypp::Url &url)
ProvideRequest(ProvideItem *owner, const std::vector< zypp::Url > &urls, ProvideMessage &&msg)
std::shared_ptr< ProvidePromise< T > > ProvidePromiseRef
std::weak_ptr< ProvidePromise< T > > ProvidePromiseWeakRef