libzypp 17.31.23
|
#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-media/ng/private/provideitem_p.h>
Public Member Functions | |
void | initialize () override |
ProvidePromiseRef< ProvideRes > | promise () |
void | setMediaRef (Provide::MediaHandle &&hdl) |
Provide::MediaHandle & | mediaRef () |
ItemStats | makeStats () override |
zypp::ByteCount | bytesExpected () const override |
Public Member Functions inherited from zyppng::ProvideItem | |
ProvideItem (ProvidePrivate &parent) | |
~ProvideItem () | |
virtual void | initialize ()=0 |
virtual void | released () |
State | state () const |
SignalProxy< void(ProvideItem &item, State oldState, State newState)> | sigStateChanged () |
ProvidePrivate & | provider () |
virtual bool | canRedirectTo (ProvideRequestRef startedReq, const zypp::Url &url) |
const std::optional< ItemStats > & | currentStats () const |
const std::optional< ItemStats > & | previousStats () const |
virtual std::chrono::steady_clock::time_point | startTime () const |
virtual std::chrono::steady_clock::time_point | finishedTime () const |
void | pulse () |
virtual zypp::ByteCount | bytesExpected () const |
Static Public Member Functions | |
static ProvideFileItemRef | create (const std::vector< zypp::Url > &urls, const ProvideFileSpec &request, ProvidePrivate &parent) |
Protected Member Functions | |
ProvideFileItem (const std::vector< zypp::Url > &urls, const ProvideFileSpec &request, ProvidePrivate &parent) | |
void | informalMessage (ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg) override |
void | finishReq (ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg) override |
void | cancelWithError (std::exception_ptr error) override |
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 |
virtual void | finishReq (ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg) |
virtual void | finishReq (ProvideQueue *queue, ProvideRequestRef finishedReq, const std::exception_ptr excpt) |
Protected Member Functions inherited from zyppng::ProvideItem | |
virtual ItemStats | makeStats () |
virtual void | informalMessage (ProvideQueue &, ProvideRequestRef req, const ProvideMessage &msg) |
virtual void | cacheMiss (ProvideRequestRef req) |
virtual void | finishReq (ProvideQueue &queue, ProvideRequestRef finishedReq, const ProvideMessage &msg) |
virtual void | finishReq (ProvideQueue *queue, ProvideRequestRef finishedReq, const std::exception_ptr excpt) |
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) |
bool | safeRedirectTo (ProvideRequestRef startedReq, const zypp::Url &url) |
void | redirectTo (ProvideRequestRef startedReq, const zypp::Url &url) |
virtual bool | enqueueRequest (ProvideRequestRef request) |
virtual void | cancelWithError (std::exception_ptr error)=0 |
bool | dequeue () |
void | updateState (const State newState) |
void | setFinished () |
Private Attributes | |
Provide::MediaHandle | _handleRef |
bool | _promiseCreated = false |
std::vector< zypp::Url > | _mirrorList |
ProvideFileSpec | _initialSpec |
zypp::Pathname | _targetFile |
zypp::Pathname | _stagingFile |
zypp::ByteCount | _expectedBytes |
ProvidePromiseWeakRef< ProvideRes > | _promise |
Additional Inherited Members | |
Public Types inherited from zyppng::ProvideItem | |
enum | State { Uninitialized , Pending , Downloading , Processing , Cancelling , Finalizing , Finished } |
Protected Attributes inherited from zyppng::ProvideItem | |
ProvideRequestRef | _runningReq |
Item downloading and providing a file
Definition at line 130 of file provideitem_p.h.
|
protected |
Definition at line 558 of file provideitem.cc.
|
static |
Definition at line 564 of file provideitem.cc.
|
overridevirtual |
Called by the controller when the item is supposed to start fetching / processing
Implements zyppng::ProvideItem.
Definition at line 569 of file provideitem.cc.
ProvidePromiseRef< ProvideRes > zyppng::ProvideFileItem::promise | ( | ) |
Definition at line 591 of file provideitem.cc.
void zyppng::ProvideFileItem::setMediaRef | ( | Provide::MediaHandle && | hdl | ) |
Definition at line 602 of file provideitem.cc.
Provide::MediaHandle & zyppng::ProvideFileItem::mediaRef | ( | ) |
Definition at line 607 of file provideitem.cc.
|
overridevirtual |
Reimplemented from zyppng::ProvideItem.
Definition at line 776 of file provideitem.cc.
|
overridevirtual |
Returns the bytes the item expects to provide, the default impl returns 0
Reimplemented from zyppng::ProvideItem.
Definition at line 801 of file provideitem.cc.
|
overrideprotectedvirtual |
Request received a informal message, e.g. ProvideStarted
Reimplemented from zyppng::ProvideItem.
Definition at line 612 of file provideitem.cc.
|
overrideprotectedvirtual |
Request was finished by the queue Base implementation handles redirect, metalink and error messages. If a different message is received, cancelWithError is called.
A subclass has to overload this function to handle success messages
Reimplemented from zyppng::ProvideItem.
|
overrideprotectedvirtual |
Cancels all running requests and immediately moves to error state
Implements zyppng::ProvideItem.
Definition at line 738 of file provideitem.cc.
|
overrideprotectedvirtual |
Request needs authentication data, the function is supposed to return the AuthData to use for the response, or an error The default implementation simply uses the given URL to look for a Auth match in the zypp::media::CredentialManager.
Reimplemented from zyppng::ProvideItem.
Definition at line 760 of file provideitem.cc.
|
protectedvirtual |
Request was finished by the queue Base implementation handles redirect, metalink and error messages. If a different message is received, cancelWithError is called.
A subclass has to overload this function to handle success messages
Reimplemented from zyppng::ProvideItem.
Definition at line 135 of file provideitem.cc.
|
protectedvirtual |
Request was finished with a error The base implementation simply calls cancelWithError
Reimplemented from zyppng::ProvideItem.
Definition at line 143 of file provideitem.cc.
|
private |
Definition at line 157 of file provideitem_p.h.
|
private |
Definition at line 158 of file provideitem_p.h.
|
private |
Definition at line 159 of file provideitem_p.h.
|
private |
Definition at line 160 of file provideitem_p.h.
|
private |
Definition at line 161 of file provideitem_p.h.
|
private |
Definition at line 162 of file provideitem_p.h.
|
private |
Definition at line 163 of file provideitem_p.h.
|
private |
Definition at line 164 of file provideitem_p.h.