libzypp
12.16.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
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/ZYppCallbacks.h
"
18
#include "
zypp/Package.h
"
19
#include "
zypp/ManagedFile.h
"
20
#include "
zypp/repo/DeltaCandidates.h
"
21
#include "
zypp/repo/RepoProvideFile.h
"
22
24
namespace
zypp
25
{
27
namespace
repo
28
{
29
34
class
PackageProviderPolicy
35
{
36
public
:
38
typedef
function<bool ( const std::string &, const Edition &, const Arch & )>
QueryInstalledCB
;
39
41
PackageProviderPolicy
&
queryInstalledCB
(
QueryInstalledCB
queryInstalledCB_r )
42
{
_queryInstalledCB
= queryInstalledCB_r;
return
*
this
; }
43
45
bool
queryInstalled
(
const
std::string & name_r,
46
const
Edition
& ed_r,
47
const
Arch
& arch_r )
const
;
48
49
private
:
50
QueryInstalledCB
_queryInstalledCB
;
51
};
53
60
class
PackageProvider
61
{
62
public
:
64
PackageProvider
(
RepoMediaAccess
& access,
65
const
Package::constPtr
& package,
66
const
DeltaCandidates
& deltas,
67
const
PackageProviderPolicy
& policy_r =
PackageProviderPolicy
() );
68
~PackageProvider
();
69
70
public
:
74
ManagedFile
providePackage
()
const
;
75
76
public
:
77
class
Impl
;
78
private
:
79
RW_pointer<Impl>
_pimpl
;
80
};
82
83
}
// namespace repo
85
}
// namespace zypp
87
#endif // ZYPP_SOURCE_PACKAGEPROVIDER_H
zypp
repo
PackageProvider.h
Generated by
1.8.2