libzypp: zypp/repo/RepoProvideFile.h Source File

libzypp 17.25.10

RepoProvideFile.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_REPO_REPOPROVIDEFILE_H
13 #define ZYPP_REPO_REPOPROVIDEFILE_H
14
15 #include <iosfwd>
16
17 #include <zypp/base/PtrTypes.h>
18 #include <zypp/base/Function.h>
19 #include <zypp/base/Functional.h>
20 #include <zypp/RepoInfo.h>
21 #include <zypp/ManagedFile.h>
22 #include <zypp/OnMediaLocation.h>
23 #include <zypp/ProvideFilePolicy.h>
24
26 namespace zypp
27 {
29 namespace repo
30 {
31
33 //
34 // provideFile
35 //
37
46 ManagedFile provideFile( RepoInfo repo_r,
47 const OnMediaLocation & loc_r,
48 const ProvideFilePolicy & policy_r = ProvideFilePolicy() );
49
60 class RepoMediaAccess
61 {
62 public:
64 RepoMediaAccess( const ProvideFilePolicy & defaultPolicy_r = ProvideFilePolicy() );
65 ~RepoMediaAccess();
66
76 ManagedFile provideFile( RepoInfo repo_r,
77 const OnMediaLocation & loc_r,
78 const ProvideFilePolicy & policy_r );
79
81 ManagedFile provideFile( RepoInfo repo_r, const OnMediaLocation & loc_r )
82 { return provideFile( repo_r, loc_r, defaultPolicy() ); }
83
84 public:
86 void setDefaultPolicy( const ProvideFilePolicy & policy_r );
87
89 const ProvideFilePolicy & defaultPolicy() const;
90
91 private:
92 class Impl;
93 RW_pointer<Impl> _impl;
94 };
95
97 } // namespace repo
100 } // namespace zypp
102 #endif // ZYPP_REPO_REPOPROVIDEFILE_H
Function.h
Functional.h
ManagedFile.h
OnMediaLocation.h
ProvideFilePolicy.h
PtrTypes.h
RepoInfo.h
Impl
zypp::AutoDispose
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition: AutoDispose.h:93
zypp::OnMediaLocation
Describes a resource file located on a medium.
Definition: OnMediaLocation.h:39
zypp::ProvideFilePolicy
Policy for provideFile and RepoMediaAccess.
Definition: ProvideFilePolicy.h:30
zypp::RepoInfo
What is known about a repository.
Definition: RepoInfo.h:72
zypp::repo::RepoMediaAccess
Provides files from different repos.
Definition: RepoProvideFile.h:61
zypp::repo::RepoMediaAccess::setDefaultPolicy
void setDefaultPolicy(const ProvideFilePolicy &policy_r)
Set a new default ProvideFilePolicy.
Definition: RepoProvideFile.cc:229
zypp::repo::RepoMediaAccess::_impl
RW_pointer< Impl > _impl
Definition: RepoProvideFile.h:92
zypp::repo::RepoMediaAccess::~RepoMediaAccess
~RepoMediaAccess()
Definition: RepoProvideFile.cc:226
zypp::repo::RepoMediaAccess::provideFile
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r)
Definition: RepoProvideFile.h:81
zypp::repo::RepoMediaAccess::defaultPolicy
const ProvideFilePolicy & defaultPolicy() const
Get the current default ProvideFilePolicy.
Definition: RepoProvideFile.cc:232
zypp::repo::RepoMediaAccess::provideFile
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r, const ProvideFilePolicy &policy_r)
Provide a file from a Repository.
Definition: RepoProvideFile.cc:235
zypp::repo::RepoMediaAccess::RepoMediaAccess
RepoMediaAccess(const ProvideFilePolicy &defaultPolicy_r=ProvideFilePolicy())
Ctor taking the default ProvideFilePolicy.
Definition: RepoProvideFile.cc:222
zypp::repo::provideFile
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r, const ProvideFilePolicy &policy_r)
Provide a file from a Repository.
Definition: RepoProvideFile.cc:112
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::ManagedFile
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
Definition: ManagedFile.h:27
zypp::RW_pointer
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:286