libzypp
12.16.5
|
PackageProvider implementation. More...
Public Member Functions | |
Impl (RepoMediaAccess &access_r, const Package::constPtr &package_r, const DeltaCandidates &deltas_r, const PackageProviderPolicy &policy_r) | |
Ctor taking the Package to provide. | |
virtual | ~Impl () |
ManagedFile | providePackage () const |
Provide the package. | |
Static Public Member Functions | |
static Impl * | factoryMake (RepoMediaAccess &access_r, const Package::constPtr &package_r, const DeltaCandidates &deltas_r, const PackageProviderPolicy &policy_r) |
Factory method providing the appropriate implementation. | |
Protected Types | |
typedef PackageProvider::Impl | Base |
typedef callback::SendReport < repo::DownloadResolvableReport > | Report |
Protected Member Functions | |
virtual ManagedFile | providePackageFromCache () const =0 |
Lookup the final rpm in cache. | |
virtual ManagedFile | doProvidePackage () const =0 |
Actually provide the final rpm. | |
Report & | report () const |
Access to the DownloadResolvableReport. | |
bool | progressPackageDownload (int value) const |
Redirect ProvideFilePolicy package download progress to this. | |
bool | failOnChecksumError () const |
Redirect ProvideFilePolicy failOnChecksumError to this if needed. | |
Protected Attributes | |
PackageProviderPolicy | _policy |
Package::constPtr | _package |
DeltaCandidates | _deltas |
RepoMediaAccess & | _access |
Private Types | |
typedef shared_ptr< void > | ScopedGuard |
Private Member Functions | |
ScopedGuard | newReport () const |
Private Attributes | |
bool | _retry |
shared_ptr< Report > | _report |
PackageProvider implementation.
Definition at line 53 of file PackageProvider.cc.
|
protected |
Definition at line 87 of file PackageProvider.cc.
|
protected |
Definition at line 88 of file PackageProvider.cc.
|
private |
Definition at line 158 of file PackageProvider.cc.
|
inline |
Ctor taking the Package to provide.
Definition at line 57 of file PackageProvider.cc.
|
inlinevirtual |
Definition at line 68 of file PackageProvider.cc.
|
static |
Factory method providing the appropriate implementation.
Called by PackageProvider ctor. Returned pointer should be immediately wrapped into a smartpointer.
Definition at line 443 of file PackageProvider.cc.
ManagedFile zypp::repo::PackageProvider::Impl::providePackage | ( | ) | const |
Provide the package.
The basic workflow.
Exception. |
Definition at line 194 of file PackageProvider.cc.
|
protectedpure virtual |
Lookup the final rpm in cache.
Default implementation (cache miss).
A non empty ManagedFile will be returned to the caller. File disposal depending on the repos keepPackages setting are handled in providePackage.
Implemented in zypp::repo::PluginPackageProvider, and zypp::repo::RpmPackageProvider.
Definition at line 177 of file PackageProvider.cc.
|
protectedpure virtual |
Actually provide the final rpm.
Default implementation (provide full package)
Report start/problem/finish and retry loop are hadled by providePackage. Here you trigger just progress and delta/plugin callbacks as needed.
Proxy methods for progressPackageDownload and failOnChecksum are provided here. Create similar proxies for other progress callbacks in derived classes and link it to ProvideFilePolicy for download:
Implemented in zypp::repo::PluginPackageProvider, and zypp::repo::RpmPackageProvider.
Definition at line 181 of file PackageProvider.cc.
|
inlineprotected |
Access to the DownloadResolvableReport.
Definition at line 121 of file PackageProvider.cc.
|
inlineprotected |
Redirect ProvideFilePolicy package download progress to this.
Definition at line 125 of file PackageProvider.cc.
|
inlineprotected |
Redirect ProvideFilePolicy failOnChecksumError to this if needed.
Definition at line 129 of file PackageProvider.cc.
|
inlineprivate |
Definition at line 160 of file PackageProvider.cc.
|
protected |
Definition at line 152 of file PackageProvider.cc.
|
protected |
Definition at line 153 of file PackageProvider.cc.
|
protected |
Definition at line 154 of file PackageProvider.cc.
|
protected |
Definition at line 155 of file PackageProvider.cc.
|
mutableprivate |
Definition at line 171 of file PackageProvider.cc.
|
mutableprivate |
Definition at line 172 of file PackageProvider.cc.