libzypp  13.10.6
zypp::repo::RpmPackageProvider Class Reference

RPM PackageProvider implementation. More...

Inheritance diagram for zypp::repo::RpmPackageProvider:
zypp::repo::PackageProvider::Impl

Public Member Functions

 RpmPackageProvider (RepoMediaAccess &access_r, const Package::constPtr &package_r, const DeltaCandidates &deltas_r, const PackageProviderPolicy &policy_r)
 
- Public Member Functions inherited from zypp::repo::PackageProvider::Impl
 Impl (RepoMediaAccess &access_r, const Package::constPtr &package_r, const DeltaCandidates &deltas_r, const PackageProviderPolicy &policy_r)
 Ctor taking the Package to provide. More...
 
virtual ~Impl ()
 
ManagedFile providePackage () const
 Provide the package. More...
 
ManagedFile providePackageFromCache () const
 Provide the package if it is cached. More...
 
bool isCached () const
 Whether the package is cached. More...
 

Protected Member Functions

virtual ManagedFile doProvidePackageFromCache () const
 Lookup the final rpm in cache. More...
 
virtual ManagedFile doProvidePackage () const
 Actually provide the final rpm. More...
 
- Protected Member Functions inherited from zypp::repo::PackageProvider::Impl
Reportreport () const
 Access to the DownloadResolvableReport. More...
 
bool progressPackageDownload (int value) const
 Redirect ProvideFilePolicy package download progress to this. More...
 
bool failOnChecksumError () const
 Redirect ProvideFilePolicy failOnChecksumError to this if needed. More...
 

Private Types

typedef packagedelta::DeltaRpm DeltaRpm
 

Private Member Functions

ManagedFile tryDelta (const DeltaRpm &delta_r) const
 
bool progressDeltaDownload (int value) const
 
void progressDeltaApply (int value) const
 
bool queryInstalled (const Edition &ed_r=Edition()) const
 

Additional Inherited Members

- Static Public Member Functions inherited from zypp::repo::PackageProvider::Impl
static ImplfactoryMake (RepoMediaAccess &access_r, const Package::constPtr &package_r, const DeltaCandidates &deltas_r, const PackageProviderPolicy &policy_r)
 Factory method providing the appropriate implementation. More...
 
- Protected Types inherited from zypp::repo::PackageProvider::Impl
typedef PackageProvider::Impl Base
 
typedef callback::SendReport
< repo::DownloadResolvableReport
Report
 
- Protected Attributes inherited from zypp::repo::PackageProvider::Impl
PackageProviderPolicy _policy
 
Package::constPtr _package
 
DeltaCandidates _deltas
 
RepoMediaAccess_access
 

Detailed Description

RPM PackageProvider implementation.

Definition at line 287 of file PackageProvider.cc.

Member Typedef Documentation

Constructor & Destructor Documentation

zypp::repo::RpmPackageProvider::RpmPackageProvider ( RepoMediaAccess access_r,
const Package::constPtr package_r,
const DeltaCandidates deltas_r,
const PackageProviderPolicy policy_r 
)
inline

Definition at line 290 of file PackageProvider.cc.

Member Function Documentation

ManagedFile zypp::repo::RpmPackageProvider::doProvidePackageFromCache ( ) const
protectedvirtual

Lookup the final rpm in cache.

Default implementation (cache miss).

A non empty ManagedFile will be returned to the caller.

Note
File disposal depending on the repos keepPackages setting are not set here, but in providePackage or providePackageFromCache.
The provoided default implementation returns an empty ManagedFile (cache miss).

Implements zypp::repo::PackageProvider::Impl.

Definition at line 318 of file PackageProvider.cc.

ManagedFile zypp::repo::RpmPackageProvider::doProvidePackage ( ) const
protectedvirtual

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:

* ProvideFilePolicy policy;
* policy.progressCB( bind( &Base::progressPackageDownload, this, _1 ) );
* policy.failOnChecksumErrorCB( bind( &Base::failOnChecksumError, this ) );
* return _access.provideFile( _package->repoInfo(), loc, policy );
*
Note
The provoided default implementation retrieves the packages default location.

Implements zypp::repo::PackageProvider::Impl.

Definition at line 323 of file PackageProvider.cc.

ManagedFile zypp::repo::RpmPackageProvider::tryDelta ( const DeltaRpm delta_r) const
private

Definition at line 356 of file PackageProvider.cc.

bool zypp::repo::RpmPackageProvider::progressDeltaDownload ( int  value) const
inlineprivate

Definition at line 307 of file PackageProvider.cc.

void zypp::repo::RpmPackageProvider::progressDeltaApply ( int  value) const
inlineprivate

Definition at line 310 of file PackageProvider.cc.

bool zypp::repo::RpmPackageProvider::queryInstalled ( const Edition ed_r = Edition()) const
inlineprivate

Definition at line 313 of file PackageProvider.cc.


The documentation for this class was generated from the following file: