26 Downloader::Downloader()
29 Downloader::Downloader(
const RepoInfo & repoinfo) : _repoinfo(repoinfo)
38 WAR <<
"Non implemented" << endl;
43 const Pathname &dest_dir,
46 WAR <<
"Non implemented" << endl;
51 Pathname sigpath = masterIndex_r.extend(
".asc" );
52 Pathname keypath = masterIndex_r.extend(
".key" );
57 start( destdir_r, media_r );
61 if ( PathInfo(destdir_r / sigpath).isExist() )
65 start( destdir_r, media_r );
71 if ( PathInfo(destdir_r / keypath).isExist() )
80 WAR <<
"Signature checking disabled in config of repository " <<
repoInfo().
alias() << endl;
84 start( destdir_r, media_r );
Checks for nothing Used as the default checker.
std::string alias() const
unique identifier for this source.
void defaultDownloadMasterIndex(MediaSetAccess &media_r, const Pathname &destdir_r, const Pathname &masterIndex_r)
Common workflow downloading a (signed) master index file.
Checks for the validity of a signature.
What is known about a repository.
const RepoInfo & repoInfo() const
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
void addPublicKey(const PublicKey &publickey, const KeyContext &keycontext=KeyContext())
add a public key to the list of known keys
void reset()
Reset the transfer (jobs) list.
void start(const Pathname &dest_dir, MediaSetAccess &media, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
start the transfer to a destination directory dest_dir You have to provde a media set access media to...
virtual void download(MediaSetAccess &media, const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Download metadata to a local directory.
Track changing files or directories.
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
virtual RepoStatus status(MediaSetAccess &media)
Status of the remote repository.
void setRepoInfo(const RepoInfo &repoinfo)
void enqueue(const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
Enqueue a object for transferal, they will not be transferred until start() is called.
Easy-to use interface to the ZYPP dependency resolver.
void setKeyContext(const KeyContext &keycontext)
Set context for this checker.