libzypp 17.31.23
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>
20#include <zypp/RepoInfo.h>
21#include <zypp/ManagedFile.h>
22#include <zypp-core/OnMediaLocation>
24
26namespace 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
61 {
62 public:
64 RepoMediaAccess( const ProvideFilePolicy & defaultPolicy_r = ProvideFilePolicy() );
66
77 const OnMediaLocation & loc_r,
78 const ProvideFilePolicy & policy_r );
79
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;
94 };
95
97 } // namespace repo
100} // namespace zypp
102#endif // ZYPP_REPO_REPOPROVIDEFILE_H
RepoManager implementation.
Describes a resource file located on a medium.
Policy for provideFile and RepoMediaAccess.
What is known about a repository.
Definition: RepoInfo.h:72
Provides files from different repos.
void setDefaultPolicy(const ProvideFilePolicy &policy_r)
Set a new default ProvideFilePolicy.
RW_pointer< Impl > _impl
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r)
const ProvideFilePolicy & defaultPolicy() const
Get the current default ProvideFilePolicy.
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r, const ProvideFilePolicy &policy_r)
Provide a file from a Repository.
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r, const ProvideFilePolicy &policy_r)
Provide a file from a Repository.
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
AutoDispose< const Pathname > ManagedFile
A Pathname plus associated cleanup code to be executed when path is no longer needed.
Definition: ManagedFile.h:27
Wrapper for const correct access via Smart pointer types.
Definition: PtrTypes.h:286