libzypp  17.38.7
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>
22 
24 namespace zypp
25 {
27  namespace repo
28  {
34  {
35  public:
37  typedef function<bool ( const std::string &, const Edition &, const Arch & )> QueryInstalledCB;
38 
41  { _queryInstalledCB = queryInstalledCB_r; return *this; }
42 
44  bool queryInstalled( const std::string & name_r,
45  const Edition & ed_r,
46  const Arch & arch_r ) const;
47 
48  private:
50  };
52 
60  {
61  public:
65  PackageProvider( RepoMediaAccess & access, const PoolItem & pi_r,
67 
71  PackageProvider( RepoMediaAccess & access, const PoolItem & pi_r,
72  DeltaCandidates deltas,
74 
77  Package::constPtr package,
78  DeltaCandidates deltas,
80 
81  ~PackageProvider();
82 
83  public:
87  ManagedFile providePackage() const;
88 
90  ManagedFile providePackageFromCache() const;
91 
93  bool isCached() const;
94 
95  public:
96  struct Impl;
97  private:
99  };
101 
102  } // namespace repo
104 } // namespace zypp
106 #endif // ZYPP_SOURCE_PACKAGEPROVIDER_H
PackageProvider implementation interface.
Candidate delta and patches for a package.
TraitsType::constPtrType constPtr
Definition: Package.h:39
PackageProviderPolicy & queryInstalledCB(QueryInstalledCB queryInstalledCB_r)
Set callback.
Architecture.
Definition: Arch.h:36
Policies and options for PackageProvider.
Edition represents [epoch:]version[-release]
Definition: Edition.h:59
function< bool(const std::string &, const Edition &, const Arch &)> QueryInstalledCB
Get installed Editions callback signature.
RW_pointer< Impl > _pimpl
Implementation class.
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition: Arch.h:173
Provides files from different repos.
Provide a package from a Repo.
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1