libzypp  10.5.0
zypp::Fetcher::Impl Class Reference

Fetcher implementation. More...

List of all members.

Public Member Functions

 Impl ()
 ~Impl ()
void setOptions (Fetcher::Options options)
Fetcher::Options options () const
void addIndex (const OnMediaLocation &resource)
void enqueueDir (const OnMediaLocation &resource, bool recursive, const FileChecker &checker=FileChecker())
void enqueueDigestedDir (const OnMediaLocation &resource, bool recursive, const FileChecker &checker=FileChecker())
void enqueue (const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
void enqueueDigested (const OnMediaLocation &resource, const FileChecker &checker=FileChecker(), const Pathname &deltafile=Pathname())
void addCachePath (const Pathname &cache_dir)
void reset ()
void start (const Pathname &dest_dir, MediaSetAccess &media, const ProgressData::ReceiverFnc &progress_receiver)

Static Public Member Functions

static shared_ptr< Implnullimpl ()
 Offer default Impl.

Private Member Functions

void downloadAndReadIndexList (MediaSetAccess &media, const Pathname &dest_dir)
 download the indexes and reads them
void downloadIndex (MediaSetAccess &media, const OnMediaLocation &resource, const Pathname &dest_dir)
 download the indexes and reads them
void readIndex (const Pathname &index, const Pathname &basedir)
 reads a downloaded index file and updates internal attributes table
void readSha1sumsIndex (const Pathname &index, const Pathname &basedir)
 specific version of readIndex for SHA1SUMS file
void readContentFileIndex (const Pathname &index, const Pathname &basedir)
 specific version of readIndex for SHA1SUMS file
void getDirectoryContent (MediaSetAccess &media, const OnMediaLocation &resource, filesystem::DirContent &content)
 reads the content of a directory but keeps a cache
bool provideFromCache (const OnMediaLocation &resource, const Pathname &dest_dir)
 tries to provide the file represented by job into dest_dir by looking at the cache.
void validate (const OnMediaLocation &resource, const Pathname &dest_dir, const list< FileChecker > &checkers)
 Validates the job against is checkers, by using the file instance on dest_dir.
void addDirJobs (MediaSetAccess &media, const OnMediaLocation &resource, const Pathname &dest_dir, FetcherJob::Flags flags)
 scan the directory and adds the individual jobs
void autoaddIndexes (const filesystem::DirContent &content, MediaSetAccess &media, const OnMediaLocation &resource, const Pathname &dest_dir)
 auto discovery and reading of indexes
void provideToDest (MediaSetAccess &media, const OnMediaLocation &resource, const Pathname &dest_dir, const Pathname &deltafile)
 Provide the resource to dest_dir.
Implclone () const
 clone for RWCOW_pointer

Private Attributes

list< FetcherJob_Ptr_resources
std::set< FetcherIndex_Ptr,
SameFetcherIndex
_indexes
std::set< Pathname > _caches
map< string, CheckSum_checksums
map< string,
filesystem::DirContent
_dircontent
Fetcher::Options _options

Friends

std::ostream & operator<< (std::ostream &str, const Fetcher::Impl &obj)
ImplrwcowClone (const Impl *rhs)

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Fetcher::Impl &obj)

Detailed Description

Fetcher implementation.

Definition at line 128 of file Fetcher.cc.


Constructor & Destructor Documentation

zypp::Fetcher::Impl::Impl ( )

Definition at line 245 of file Fetcher.cc.

zypp::Fetcher::Impl::~Impl ( ) [inline]

Definition at line 135 of file Fetcher.cc.


Member Function Documentation

void zypp::Fetcher::Impl::setOptions ( Fetcher::Options  options)

Definition at line 250 of file Fetcher.cc.

Fetcher::Options zypp::Fetcher::Impl::options ( ) const

Definition at line 253 of file Fetcher.cc.

void zypp::Fetcher::Impl::addIndex ( const OnMediaLocation resource)

Definition at line 297 of file Fetcher.cc.

void zypp::Fetcher::Impl::enqueueDir ( const OnMediaLocation resource,
bool  recursive,
const FileChecker checker = FileChecker() 
)

Definition at line 256 of file Fetcher.cc.

void zypp::Fetcher::Impl::enqueueDigestedDir ( const OnMediaLocation resource,
bool  recursive,
const FileChecker checker = FileChecker() 
)

Definition at line 271 of file Fetcher.cc.

void zypp::Fetcher::Impl::enqueue ( const OnMediaLocation resource,
const FileChecker checker = FileChecker() 
)

Definition at line 288 of file Fetcher.cc.

void zypp::Fetcher::Impl::enqueueDigested ( const OnMediaLocation resource,
const FileChecker checker = FileChecker(),
const Pathname &  deltafile = Pathname() 
)

Definition at line 237 of file Fetcher.cc.

void zypp::Fetcher::Impl::addCachePath ( const Pathname &  cache_dir)

Definition at line 312 of file Fetcher.cc.

void zypp::Fetcher::Impl::reset ( )

Definition at line 304 of file Fetcher.cc.

void zypp::Fetcher::Impl::start ( const Pathname &  dest_dir,
MediaSetAccess media,
const ProgressData::ReceiverFnc progress_receiver 
)

Definition at line 742 of file Fetcher.cc.

static shared_ptr<Impl> zypp::Fetcher::Impl::nullimpl ( ) [inline, static]

Offer default Impl.

Definition at line 154 of file Fetcher.cc.

void zypp::Fetcher::Impl::downloadAndReadIndexList ( MediaSetAccess media,
const Pathname &  dest_dir 
) [private]

download the indexes and reads them

Definition at line 710 of file Fetcher.cc.

void zypp::Fetcher::Impl::downloadIndex ( MediaSetAccess media,
const OnMediaLocation resource,
const Pathname &  dest_dir 
) [private]

download the indexes and reads them

Definition at line 655 of file Fetcher.cc.

void zypp::Fetcher::Impl::readIndex ( const Pathname &  index,
const Pathname &  basedir 
) [private]

reads a downloaded index file and updates internal attributes table

The index lists files relative to a directory, which is normally the same as the index file is located.

Definition at line 610 of file Fetcher.cc.

void zypp::Fetcher::Impl::readSha1sumsIndex ( const Pathname &  index,
const Pathname &  basedir 
) [private]

specific version of readIndex for SHA1SUMS file

Definition at line 634 of file Fetcher.cc.

void zypp::Fetcher::Impl::readContentFileIndex ( const Pathname &  index,
const Pathname &  basedir 
) [private]

specific version of readIndex for SHA1SUMS file

Definition at line 621 of file Fetcher.cc.

void zypp::Fetcher::Impl::getDirectoryContent ( MediaSetAccess media,
const OnMediaLocation resource,
filesystem::DirContent content 
) [private]

reads the content of a directory but keeps a cache

Definition at line 460 of file Fetcher.cc.

bool zypp::Fetcher::Impl::provideFromCache ( const OnMediaLocation resource,
const Pathname &  dest_dir 
) [private]

tries to provide the file represented by job into dest_dir by looking at the cache.

If success, returns true, and the desired file should be available on dest_dir

Definition at line 338 of file Fetcher.cc.

void zypp::Fetcher::Impl::validate ( const OnMediaLocation resource,
const Pathname &  dest_dir,
const list< FileChecker > &  checkers 
) [private]

Validates the job against is checkers, by using the file instance on dest_dir.

Exceptions:
Exception

Definition at line 385 of file Fetcher.cc.

void zypp::Fetcher::Impl::addDirJobs ( MediaSetAccess media,
const OnMediaLocation resource,
const Pathname &  dest_dir,
FetcherJob::Flags  flags 
) [private]

scan the directory and adds the individual jobs

Definition at line 483 of file Fetcher.cc.

void zypp::Fetcher::Impl::autoaddIndexes ( const filesystem::DirContent content,
MediaSetAccess media,
const OnMediaLocation resource,
const Pathname &  dest_dir 
) [private]

auto discovery and reading of indexes

Definition at line 423 of file Fetcher.cc.

void zypp::Fetcher::Impl::provideToDest ( MediaSetAccess media,
const OnMediaLocation resource,
const Pathname &  dest_dir,
const Pathname &  deltafile 
) [private]

Provide the resource to dest_dir.

Definition at line 539 of file Fetcher.cc.

Impl* zypp::Fetcher::Impl::clone ( ) const [inline, private]

clone for RWCOW_pointer

Definition at line 222 of file Fetcher.cc.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const Fetcher::Impl obj 
) [friend]
Impl* rwcowClone ( const Impl rhs) [friend]
std::ostream & operator<< ( std::ostream &  str,
const Fetcher::Impl obj 
) [related]

Stream output

Definition at line 838 of file Fetcher.cc.


Member Data Documentation

Definition at line 225 of file Fetcher.cc.

Definition at line 226 of file Fetcher.cc.

std::set<Pathname> zypp::Fetcher::Impl::_caches [private]

Definition at line 227 of file Fetcher.cc.

map<string, CheckSum> zypp::Fetcher::Impl::_checksums [private]

Definition at line 229 of file Fetcher.cc.

Definition at line 231 of file Fetcher.cc.

Fetcher::Options zypp::Fetcher::Impl::_options [private]

Definition at line 233 of file Fetcher.cc.


The documentation for this class was generated from the following file: