libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
susetags
yum
Applydeltarpm.cc
Applydeltarpm.h
DeltaCandidates.cc
DeltaCandidates.h
Downloader.cc
Downloader.h
MediaInfoDownloader.cc
MediaInfoDownloader.h
PackageDelta.cc
PackageDelta.h
PackageProvider.cc
PackageProvider.h
PluginServices.cc
PluginServices.h
RepoException.cc
RepoException.h
RepoInfoBase.cc
RepoInfoBase.h
RepoInfoBaseImpl.h
RepoMirrorList.cc
RepoMirrorList.h
RepoProvideFile.cc
RepoProvideFile.h
RepoType.cc
RepoType.h
RepoVariables.cc
RepoVariables.h
ServiceRepos.cc
ServiceRepos.h
ServiceType.cc
ServiceType.h
SrcPackageProvider.cc
SrcPackageProvider.h
SUSEMediaVerifier.cc
SUSEMediaVerifier.h
sat
solver
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
PackageProvider.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_REPO_PACKAGEPROVIDER_H
13
#define ZYPP_REPO_PACKAGEPROVIDER_H
14
15
#include <iosfwd>
16
17
#include "
zypp/base/NonCopyable.h
"
18
19
#include "
zypp/ZYppCallbacks.h
"
20
#include "
zypp/Package.h
"
21
#include "
zypp/ManagedFile.h
"
22
#include "
zypp/repo/RepoProvideFile.h
"
23
#include "
zypp/repo/DeltaCandidates.h
"
24
26
namespace
zypp
27
{
28
29
namespace
repo
30
{
31
33
//
34
// CLASS NAME : PackageProviderPolicy
35
//
37
class
PackageProviderPolicy
38
{
39
public
:
41
typedef
function<bool ( const std::string &, const Edition &, const Arch & )>
QueryInstalledCB
;
42
44
PackageProviderPolicy
&
queryInstalledCB
(
QueryInstalledCB
queryInstalledCB_r )
45
{
_queryInstalledCB
= queryInstalledCB_r;
return
*
this
; }
46
48
bool
queryInstalled
(
const
std::string & name_r,
49
const
Edition
& ed_r,
50
const
Arch
& arch_r )
const
;
51
52
private
:
53
QueryInstalledCB
_queryInstalledCB
;
54
};
56
58
//
59
// CLASS NAME : PackageProvider
60
//
64
class
PackageProvider
:
private
base::NonCopyable
65
{
66
typedef
shared_ptr<void>
ScopedGuard
;
67
typedef
callback::SendReport<repo::DownloadResolvableReport>
Report
;
68
69
typedef
packagedelta::DeltaRpm
DeltaRpm
;
70
71
public
:
73
PackageProvider
(
RepoMediaAccess
&access,
74
const
Package::constPtr
& package,
75
const
DeltaCandidates
& deltas,
76
const
PackageProviderPolicy
& policy_r =
PackageProviderPolicy
() );
77
~PackageProvider
();
78
79
public
:
83
ManagedFile
providePackage
()
const
;
84
85
private
:
86
ManagedFile
doProvidePackage
()
const
;
87
ManagedFile
tryDelta
(
const
DeltaRpm
& delta_r )
const
;
88
89
private
:
90
ScopedGuard
newReport
()
const
;
91
Report
&
report
()
const
;
92
bool
progressDeltaDownload
(
int
value )
const
;
93
void
progressDeltaApply
(
int
value )
const
;
94
bool
progressPackageDownload
(
int
value )
const
;
95
bool
failOnChecksumError
()
const
;
96
bool
queryInstalled
(
const
Edition
& ed_r =
Edition
() )
const
;
97
98
private
:
99
PackageProviderPolicy
_policy
;
100
Package::constPtr
_package
;
101
mutable
bool
_retry
;
102
mutable
shared_ptr<Report>
_report
;
103
DeltaCandidates
_deltas
;
104
RepoMediaAccess
&
_access
;
105
};
107
109
}
// namespace repo
112
}
// namespace zypp
114
#endif // ZYPP_SOURCE_PACKAGEPROVIDER_H
zypp
repo
PackageProvider.h
Generated by
1.8.1