libzypp  12.16.5
zypp::repo::PluginPackageProvider Class Reference

Plugin PackageProvider implementation. More...

Inheritance diagram for zypp::repo::PluginPackageProvider:
zypp::repo::PackageProvider::Impl NonCopyable

Public Member Functions

 PluginPackageProvider (const std::string &stem_r, 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.
 
virtual ~Impl ()
 
ManagedFile providePackage () const
 Provide the package.
 

Protected Member Functions

virtual ManagedFile providePackageFromCache () const
 Lookup the final rpm in cache.
 
virtual ManagedFile doProvidePackage () const
 Actually provide the final rpm.
 
- Protected Member Functions inherited from zypp::repo::PackageProvider::Impl
Reportreport () 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.
 

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.
 
- 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

Plugin PackageProvider implementation.

Basically downloads the default package and calls a 'stem'2rpm plugin to cteate the final .rpm package.

Definition at line 414 of file PackageProvider.cc.

Constructor & Destructor Documentation

zypp::repo::PluginPackageProvider::PluginPackageProvider ( const std::string &  stem_r,
RepoMediaAccess access_r,
const Package::constPtr package_r,
const DeltaCandidates deltas_r,
const PackageProviderPolicy policy_r 
)
inline

Definition at line 417 of file PackageProvider.cc.

Member Function Documentation

virtual ManagedFile zypp::repo::PluginPackageProvider::providePackageFromCache ( ) const
inlineprotectedvirtual

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.

Note
The provoided default implementation returns an empty ManagedFile (cache miss).

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

Definition at line 426 of file PackageProvider.cc.

virtual ManagedFile zypp::repo::PluginPackageProvider::doProvidePackage ( ) const
inlineprotectedvirtual

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 431 of file PackageProvider.cc.


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