18#include <zypp/base/Flags.h>
19#include <zypp/base/PtrTypes.h>
20#include <zypp/Pathname.h>
22#include <zypp-core/OnMediaLocation>
23#include <zypp/Digest.h>
26#include <zypp-core/ui/ProgressData>
253 bool recursive =
false,
297 bool recursive =
false,
This class allows to retrieve a group of files in a confortable way, providing some smartness that do...
void start(const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
start the transfer to a destination directory dest_dir The media has to be provides with setMediaSetA...
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
void addIndex(const OnMediaLocation &resource)
Adds an index containing metadata (for example checksums ) that will be retrieved and read before the...
Options options() const
Get current options.
friend std::ostream & operator<<(std::ostream &str, const Fetcher &obj)
void reset()
Reset the transfer (jobs) list.
ZYPP_DECLARE_FLAGS(Options, Option)
void enqueue(const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
Enqueue a object for transferal, they will not be transferred until start() is called.
void enqueueDir(const OnMediaLocation &resource, bool recursive=false, const FileChecker &checker=FileChecker())
Enqueue a directory.
void setOptions(Options options)
Set the Fetcher options.
Option
Various option flags to change behavior.
@ AutoAddIndexes
If a content or CHECKSUMS file is found, it is downloaded and read.
@ AutoAddChecksumsIndexes
If a CHECKSUMS file is found, it is downloaded and read.
@ AutoAddContentFileIndexes
If a content file is found, it is downloaded and read.
void enqueueDigestedDir(const OnMediaLocation &resource, bool recursive=false, const FileChecker &checker=FileChecker())
Enqueue a directory and always check for checksums.
void enqueueDigested(const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
Enqueue a object for transferal, they will not be transferred until start() is called.
void addCachePath(const Pathname &cache_dir)
adds a directory to the list of directories where to look for cached files
void setMediaSetAccess(MediaSetAccess &media)
Sets the media set access that will be used to precache and to download the files when start is calle...
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
RW_pointer supporting 'copy on write' functionality.
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3....
#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)