libzypp 17.38.5
CommitPackageCache.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_TARGET_COMMITPACKAGECACHE_H
13#define ZYPP_TARGET_COMMITPACKAGECACHE_H
14
15#include <iosfwd>
16
19
20#include <zypp/PoolItem.h>
21#include <zypp-core/Pathname.h>
22#include <zypp/ManagedFile.h>
23
25namespace zypp
26{
28 namespace target
29 {
30
39 {
40 public:
43
45 ManagedFile operator()( const PoolItem & pi, bool fromCache_r );
46
47 private:
48 struct Impl;
50 };
51
53 //
54 // CLASS NAME : CommitPackageCache
55 //
59 {
60 friend std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
61
62 public:
63 using PackageProvider = function<ManagedFile (const PoolItem &, bool)>;
64
65 public:
68
71
72 public:
74 void setCommitList( std::vector<sat::Solvable> commitList_r );
76 template <class TIterator>
77 void setCommitList( TIterator begin_r, TIterator end_r )
78 { setCommitList( std::vector<sat::Solvable>( begin_r, end_r ) ); }
79
81 ManagedFile get( const PoolItem & citem_r );
84 { return get( PoolItem(citem_r) ); }
85
90 bool preloaded() const;
92 void preloaded( bool newval_r );
93
94 public:
96 class Impl;
98 explicit CommitPackageCache( Impl * pimpl_r );
99 private:
102 };
103
104
106 std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
107
109 } // namespace target
112} // namespace zypp
114#endif // ZYPP_TARGET_COMMITPACKAGECACHE_H
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Combining sat::Solvable and ResStatus.
Definition PoolItem.h:51
A Solvable object within the sat Pool.
Definition Solvable.h:54
Target::commit helper optimizing package provision.
CommitPackageCache(PackageProvider packageProvider_r=RepoProvidePackage())
Ctor.
ManagedFile get(sat::Solvable citem_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setCommitList(std::vector< sat::Solvable > commitList_r)
Download(commit) sequence of solvables to compute read ahead.
void setCommitList(TIterator begin_r, TIterator end_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
function< ManagedFile(const PoolItem &, bool)> PackageProvider
RW_pointer< Impl > _pimpl
Pointer to implementation.
ManagedFile get(const PoolItem &citem_r)
Provide a package.
Default PackageProvider for CommitPackageCache.
ManagedFile operator()(const PoolItem &pi, bool fromCache_r)
Provide package optionally fron cache only.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const CommitPackageCache &obj)
Easy-to use interface to the ZYPP dependency resolver.
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
Definition ManagedFile.h:27
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
Wrapper for const correct access via Smart pointer types.
Definition PtrTypes.h:293