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;
70 SignalProxy<void( ProvideItem &item, State oldState, State newState )>
sigStateChanged();
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 );
192 #endif // ZYPP_MEDIA_PROVIDEITEM_H_INCLUDED
bool safeRedirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
virtual bool enqueueRequest(ProvideRequestRef request)
Store and operate with byte count.
virtual void cacheMiss(ProvideRequestRef req)
virtual void finishReq(ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg)
virtual ItemStats makeStats()
std::chrono::steady_clock::time_point _pulseTime
ProvideItem(ProvidePrivate &parent)
void updateState(const State newState)
zypp::ByteCount _bytesProvided
void redirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
virtual void initialize()=0
virtual void informalMessage(ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg)
const std::optional< ItemStats > & currentStats() const
ProvidePrivate & provider()
virtual bool canRedirectTo(ProvideRequestRef startedReq, const zypp::Url &url)
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)
ZYPP_DECLARE_PRIVATE(ProvideItem)
virtual void cancelWithError(std::exception_ptr error)=0
zypp::ByteCount _bytesExpected
virtual zypp::ByteCount bytesExpected() const
const std::optional< ItemStats > & previousStats() const
SignalProxy< void(ProvideItem &item, State oldState, State newState)> sigStateChanged()
virtual std::chrono::steady_clock::time_point startTime() const
virtual std::chrono::steady_clock::time_point finishedTime() const
ProvideRequestRef _runningReq