libzypp 17.38.3
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
20#include <zypp/RepoInfo.h>
21#include <zypp/ManagedFile.h>
22#include <utility>
23#include <zypp-core/OnMediaLocation>
25
27namespace zypp
28{
30 namespace repo
31 {
32
34 //
35 // provideFile
36 //
38
47 ManagedFile provideFile( RepoInfo repo_r,
48 const OnMediaLocation & loc_r,
49 const ProvideFilePolicy & policy_r = ProvideFilePolicy() );
50
60 std::vector<Pathname> repositoryCachePaths( RepoInfo repo_r );
61
73 {
74 public:
78
88 ManagedFile provideFile( const RepoInfo& repo_r,
89 const OnMediaLocation & loc_r,
90 const ProvideFilePolicy & policy_r );
91
94 { return provideFile( std::move(repo_r), loc_r, defaultPolicy() ); }
95
96 public:
98 void setDefaultPolicy( const ProvideFilePolicy & policy_r );
99
101 const ProvideFilePolicy & defaultPolicy() const;
102
103 private:
104 class Impl;
106 };
107
109 } // namespace repo
112} // namespace zypp
114#endif // ZYPP_REPO_REPOPROVIDEFILE_H
Describes a resource file located on a medium.
Policy for provideFile and RepoMediaAccess.
What is known about a repository.
Definition RepoInfo.h:72
ManagedFile provideFile(RepoInfo repo_r, const OnMediaLocation &loc_r)
RepoMediaAccess(ProvideFilePolicy defaultPolicy_r=ProvideFilePolicy())
Ctor taking the default ProvideFilePolicy.
const ProvideFilePolicy & defaultPolicy() const
Get the current default ProvideFilePolicy.
ManagedFile provideFile(const 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.
std::vector< Pathname > repositoryCachePaths(RepoInfo repo_r)
returns a set of paths.
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