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 {
100 Signal<void( ProvideItem &item, ProvideItem::State oldState, ProvideItem::State newState )>
_sigStateChanged;
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;
static ProvideFileItemRef create(const std::vector< zypp::Url > &urls, const ProvideFileSpec &request, ProvidePrivate &parent)
std::vector< zypp::Url > _pastRedirects
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
ProvideQueueWeakRef _myQueue
Store and operate with byte count.
ProvidePromiseRef< ProvideRes > promise()
void setUrls(const std::vector< zypp::Url > &urls)
std::weak_ptr< ProvidePromise< T > > ProvidePromiseWeakRef
ProvideRequest(ProvideItem *owner, const std::vector< zypp::Url > &urls, ProvideMessage &&msg)
std::chrono::steady_clock::time_point _itemFinished
std::optional< zypp::Url > _activeUrl
virtual void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg)
std::shared_ptr< ProvidePromise< T > > ProvidePromiseRef
std::optional< ProvideItem::ItemStats > _prevStats
void initialize() override
const std::optional< zypp::Url > activeUrl() const
ProvideFileSpec _initialSpec
void informalMessage(ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg) override
ProvideMessage & provideMessage()
Signal< void(ProvideItem &item, ProvideItem::State oldState, ProvideItem::State newState)> _sigStateChanged
void cancelWithError(std::exception_ptr error) override
ItemStats makeStats() override
std::optional< ProvideItem::ItemStats > _currStats
ProvideFileItem(const std::vector< zypp::Url > &urls, const ProvideFileSpec &request, ProvidePrivate &parent)
static expected< ProvideRequestRef > create(ProvideItem &owner, const std::vector< zypp::Url > &urls, const std::string &id, ProvideMediaSpec &spec)
zypp::ByteCount bytesExpected() const override
const std::vector< zypp::Url > & urls() const
void setCurrentQueue(ProvideQueueRef ref)
zypp::Pathname _targetFile
const ProvideMessage & provideMessage() const
ProvidePromise(ProvideItemRef provideItem)
ProvideItem::State _itemState
void setActiveUrl(const zypp::Url &urlToUse)
std::vector< zypp::Url > _mirrors
static expected< ProvideRequestRef > createDetach(const zypp::Url &url)
ProvideItemPrivate(ProvidePrivate &parent, ProvideItem &pub)
zypp::ByteCount _expectedBytes
ProvideQueueRef currentQueue()
Provide::MediaHandle _handleRef
Provide::MediaHandle & mediaRef()
void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg) override
std::vector< zypp::Url > _mirrorList
std::chrono::steady_clock::time_point _itemStarted
void setMediaRef(Provide::MediaHandle &&hdl)
void setUrl(const zypp::Url &url)
ProvidePromiseWeakRef< ProvideRes > _promise
zypp::Pathname _stagingFile
ProvideItemWeakRef _myProvide