9#ifndef ZYPP_MEDIA_PROVIDEITEM_H_INCLUDED
10#define ZYPP_MEDIA_PROVIDEITEM_H_INCLUDED
12#include <zypp-core/zyppng/base/zyppglobal.h>
13#include <zypp-core/zyppng/base/Base>
14#include <zypp-media/ng/ProvideFwd>
15#include <zypp-core/ByteCount.h>
20 class ProvideItemPrivate;
96 virtual std::chrono::steady_clock::time_point
startTime()
const;
102 virtual std::chrono::steady_clock::time_point
finishedTime()
const;
126 virtual void cacheMiss ( ProvideRequestRef req );
143 virtual void finishReq (
ProvideQueue *queue, ProvideRequestRef finishedReq,
const std::exception_ptr excpt );
149 virtual expected<zypp::media::AuthData>
authenticationRequired (
ProvideQueue &queue, ProvideRequestRef req,
const zypp::Url &effectiveUrl, int64_t lastTimestamp,
const std::map<std::string, std::string> &extraFields );
Store and operate with byte count.
bool safeRedirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
virtual std::chrono::steady_clock::time_point startTime() const
virtual void cacheMiss(ProvideRequestRef req)
ProvidePrivate & provider()
virtual expected< zypp::media::AuthData > authenticationRequired(ProvideQueue &queue, ProvideRequestRef req, const zypp::Url &effectiveUrl, int64_t lastTimestamp, const std::map< std::string, std::string > &extraFields)
virtual ItemStats makeStats()
virtual void initialize()=0
virtual bool canRedirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
ZYPP_DECLARE_PRIVATE(ProvideItem)
virtual std::chrono::steady_clock::time_point finishedTime() const
virtual zypp::ByteCount bytesExpected() const
ProvideRequestRef _runningReq
void redirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
virtual void informalMessage(ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg)
const std::optional< ItemStats > & previousStats() const
virtual void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg)
virtual void cancelWithError(std::exception_ptr error)=0
const std::optional< ItemStats > & currentStats() const
void updateState(const State newState)
virtual bool enqueueRequest(ProvideRequestRef request)
SignalProxy< void(ProvideItem &item, State oldState, State newState)> sigStateChanged()
zypp::ByteCount _bytesProvided
zypp::ByteCount _bytesExpected
std::chrono::steady_clock::time_point _pulseTime