#include <SourceImpl.h>
Inheritance diagram for zypp::source::SourceImpl:

Public Member Functions | |
| void | factoryCtor (const media::MediaId &media_r, const Pathname &path_r="/", const std::string &alias_r="", const Pathname cache_dir_r="", const bool base_source=false) |
| Ctor substitute. | |
| const ResStore & | resolvables (Source_Ref) const |
| All resolvables provided by this source. | |
| const ResStore & | resolvables () const |
| const ResStore | resolvables (zypp::Resolvable::Kind kind) const |
| const Pathname | provideFile (const Pathname &file, const unsigned media_nr=1, bool cached=false, bool checkonly=false) |
| Provide a file to local filesystem. | |
| const Pathname | tryToProvideFile (const Pathname &file, const unsigned media_nr=1) |
| Provide a file to local filesystem if the file does not exists, throws an exception, but does not release the media, useful to provide optional files you want to check if they exists. | |
| const Pathname | provideDirTree (const Pathname &path, const unsigned media_nr=1) |
| Provide a directory to local filesystem. | |
| const void | releaseFile (const Pathname &file_r, const unsigned media_nr=1) |
| const void | releaseDir (const Pathname &path_r, const unsigned media_nr=1, const bool recursive=false) |
| const Pathname | providePackage (Package::constPtr package) |
| const Pathname | providePackageInteractive (Package::constPtr package) |
| void | dirInfo (const unsigned media_nr, std::list< std::string > &retlist, const Pathname &path_r, bool dots=true) const |
| Provide info about a directory. | |
| void | changeMedia (const media::MediaId &media_r, const Pathname &path_r) |
| const bool | enabled () const |
| void | enable () |
| void | disable () |
| const bool | autorefresh () const |
| void | setAutorefresh (const bool enable_r) |
| void | refresh () |
| virtual void | storeMetadata (const Pathname &cache_dir_r) |
| std::string | alias (void) const |
| void | setAlias (const std::string &alias) |
| virtual std::string | id (void) const |
| virtual void | setId (const std::string id_r) |
| virtual unsigned | priority (void) const |
| virtual void | setPriority (unsigned p) |
| virtual unsigned | priorityUnsubscribed (void) const |
| virtual void | setPriorityUnsubscribed (unsigned p) |
| virtual bool | subscribed (void) const |
| virtual void | setSubscribed (bool s) |
| virtual const Pathname & | cacheDir (void) |
| virtual const std::list< Pathname > | publicKeys () |
| virtual std::string | type (void) const |
| Url | url (void) const |
| void | setUrl (const Url &url) |
| bool | remote () const |
| bool | baseSource () const |
| const Pathname & | path (void) const |
| virtual unsigned | numberOfMedia (void) const |
| virtual std::string | vendor (void) const |
| virtual std::string | unique_id (void) const |
| virtual std::string | zmdName (void) const |
| ZMD specific stuff. | |
| virtual void | setZmdName (const std::string name_r) |
| virtual std::string | zmdDescription (void) const |
| virtual void | setZmdDescription (const std::string desc_r) |
| virtual void | redirect (unsigned media_nr, const Url &new_url) |
| void | reattach (const Pathname &attach_point) |
| Reattach the source if it is not mounted, but downloaded, to different directory. | |
| void | release () |
| Release all medias attached by the source. | |
| virtual media::MediaVerifierRef | verifier (unsigned media_nr) |
| Get media verifier for the specified medium. | |
Static Public Member Functions | |
| static SourceImpl_Ptr | nullimpl () |
| Offer default Impl. | |
Protected Member Functions | |
| Source_Ref | selfSourceRef () |
Provide Source_Ref back to this. | |
| const Pathname | provideJustFile (const Pathname &path, const unsigned media_nr=1, bool cached=false, bool checkonly=false) |
| Provide a file to local filesystem on the given path, no checking or progress information redirection. | |
| SourceImpl () | |
| Default Ctor. | |
| virtual void | factoryInit () |
| Ctor substitute invoked by factoryCtor. | |
| virtual | ~SourceImpl () |
| Dtor. | |
| virtual std::ostream & | dumpOn (std::ostream &str) const |
| Overload to realize stream output. | |
Protected Attributes | |
| ResStore | _store |
| All resolvables provided by this source. | |
| Url | _url |
| URL of the media. | |
| Pathname | _path |
| Path to the source on the media. | |
| bool | _enabled |
| The source is enabled. | |
| bool | _autorefresh |
| If the source metadata should be autorefreshed. | |
| std::string | _alias |
| (user defined) alias of the source | |
| Pathname | _cache_dir |
| Directory holding metadata cache. | |
| std::string | _id |
| (user defined) id of the source mostly used for ZENworks | |
| unsigned | _priority |
| (user defined) default priority of the source | |
| unsigned | _priority_unsubscribed |
| (user defined) unsubscribed priority of the source | |
| bool | _subscribed |
| subscribed?, solver prefers subscribed sources | |
| bool | _base_source |
| source contains base product? | |
| intrusive_ptr< MediaSet > | _media_set |
| Set of medias of the product. | |
Private Member Functions | |
| virtual void | createResolvables (Source_Ref source_r) |
| Late initialize the ResStore. | |
| virtual ResStore | provideResolvables (Source_Ref source_r, zypp::Resolvable::Kind kind) |
| Provide only resolvable of a certain kind. | |
| SourceImpl (const null &) | |
| Ctor, excl. | |
Private Attributes | |
| media::MediaManager | media_mgr |
| bool | _res_store_initialized |
| Whether the ResStore is initialized. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const SourceImpl &obj) |
Classes | |
| struct | null |
| Helper indicating creation of nullimpl. More... | |
| class | Verifier |
| SourceImpl MediaVerifier. More... | |
Public access via Source interface.
Constructed by SourceFactory, via default ctor to create the object, followed by a call to factoryCtor. factoryCtor initializes the remaining data members and calls factoryInit to let implementations actually retrieve the metadata.
Definition at line 55 of file SourceImpl.h.
|
|
Default Ctor. Just create the object and prepare the data members. Then wait for the factoryCtor call to launch the Source. Definition at line 102 of file SourceImpl.cc. Referenced by nullimpl(). |
|
|
Dtor.
Definition at line 160 of file SourceImpl.cc. References _media_set, media_mgr, and zypp::media::MediaManager::release(). |
|
|
Ctor, excl.
for nullimpl only. Nullimpl has no Id ( Definition at line 332 of file SourceImpl.h. |
|
||||||||||||||||||||||||
|
Ctor substitute. Called by SourceFactory to initialize the Source. Actions performed are too complex for a real ctor. So factoryCtor initializes the appropriate data members and then calls factoryInit to launch the Source. Common cleanup in case factoryInit throws:
Definition at line 118 of file SourceImpl.cc. References _alias, _autorefresh, _base_source, _cache_dir, _media_set, _path, _store, _subscribed, _url, zypp::media::MediaAccess::canBeVolatile(), zypp::ResStore::clear(), factoryInit(), media_mgr, selfSourceRef(), zypp::media::MediaManager::url(), and ZYPP_RETHROW. |
|
|
All resolvables provided by this source.
Definition at line 87 of file SourceImpl.h. References resolvables(). |
|
|
Definition at line 168 of file SourceImpl.cc. References _res_store_initialized, _store, createResolvables(), and selfSourceRef(). Referenced by resolvables(). |
|
|
Definition at line 180 of file SourceImpl.cc. References provideResolvables(), and selfSourceRef(). |
|
||||||||||||||||||||
|
||||||||||||
|
Provide a file to local filesystem if the file does not exists, throws an exception, but does not release the media, useful to provide optional files you want to check if they exists.
Definition at line 277 of file SourceImpl.cc. References _media_set, zypp::media::MediaManager::localPath(), media_mgr, and zypp::media::MediaManager::provideFile(). Referenced by zypp::source::yum::YUMSourceImpl::factoryInit(), and zypp::source::yum::YUMSourceImpl::storeMetadata(). |
|
||||||||||||
|
Provide a directory to local filesystem.
Definition at line 404 of file SourceImpl.cc. References _media_set, zypp::media::MediaChangeReport::ABORT, zypp::media::MediaChangeReport::CHANGE_URL, zypp::SourceFactory::createFrom(), DBG, zypp::media::MediaChangeReport::EJECT, ERR, zypp::media::MediaChangeReport::INVALID, zypp::media::MediaManager::localPath(), media_mgr, MIL, zypp::media::MediaChangeReport::NOT_FOUND, zypp::media::MediaManager::provideDirTree(), zypp::media::MediaManager::release(), zypp::media::MediaChangeReport::RETRY, zypp::SourceManager::sourceManager(), zypp::media::MediaChangeReport::WRONG, ZYPP_CAUGHT, and ZYPP_RETHROW. Referenced by zypp::source::susetags::SuseTagsImpl::storeMetadata(). |
|
||||||||||||
|
Definition at line 505 of file SourceImpl.cc. References _media_set, DBG, media_mgr, and zypp::media::MediaManager::releaseFile(). |
|
||||||||||||||||
|
Definition at line 513 of file SourceImpl.cc. References _media_set, DBG, media_mgr, zypp::media::MediaManager::releaseDir(), and zypp::media::MediaManager::releasePath(). |
|
|
Definition at line 196 of file SourceImpl.cc. References zypp::source::DownloadResolvableReport::ABORT, zypp::filesystem::Pathname::asString(), zypp::CheckSum::checksum(), zypp::Digest::digest(), ERR, zypp::source::DownloadResolvableReport::INVALID, MIL, zypp::source::DownloadResolvableReport::NO_ERROR, provideJustFile(), zypp::source::DownloadResolvableReport::RETRY, zypp::CheckSum::type(), and ZYPP_THROW. |
|
|
|
|
||||||||||||||||||||
|
Provide info about a directory.
Definition at line 186 of file SourceImpl.cc. References _media_set, DBG, zypp::media::MediaManager::dirInfo(), and media_mgr. Referenced by zypp::source::susetags::SuseTagsImpl::providePackages(), zypp::source::susetags::SuseTagsImpl::publicKeys(), zypp::source::susetags::SuseTagsImpl::readContentFile(), and zypp::source::susetags::SuseTagsImpl::storeMetadata(). |
|
||||||||||||
|
Definition at line 525 of file SourceImpl.cc. References _media_set, _path, _url, DBG, media_mgr, and zypp::media::MediaManager::url(). |
|
|
Definition at line 145 of file SourceImpl.h. References _enabled. |
|
|
Definition at line 534 of file SourceImpl.cc. References _enabled. |
|
|
Definition at line 150 of file SourceImpl.h. References _enabled. |
|
|
Definition at line 153 of file SourceImpl.h. References _autorefresh. |
|
|
Definition at line 156 of file SourceImpl.h. References _autorefresh. |
|
|
Definition at line 553 of file SourceImpl.cc. References _cache_dir, zypp::filesystem::clean_dir(), zypp::filesystem::Pathname::empty(), ERR, storeMetadata(), and ZYPP_RETHROW. |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl. Definition at line 550 of file SourceImpl.cc. Referenced by refresh(). |
|
|
Definition at line 163 of file SourceImpl.h. References _alias. Referenced by zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata(). |
|
|
Definition at line 166 of file SourceImpl.h. References _alias. |
|
|
Definition at line 597 of file SourceImpl.cc. References _id. Referenced by zypp::source::SourceImpl::Verifier::isDesiredMedia(). |
|
|
Definition at line 600 of file SourceImpl.cc. References _id. |
|
|
Definition at line 603 of file SourceImpl.cc. References _priority. |
|
|
Definition at line 606 of file SourceImpl.cc. References _priority. |
|
|
Definition at line 609 of file SourceImpl.cc. References _priority_unsubscribed. |
|
|
Definition at line 612 of file SourceImpl.cc. References _priority_unsubscribed. |
|
|
Definition at line 615 of file SourceImpl.cc. References _subscribed. |
|
|
Definition at line 618 of file SourceImpl.cc. References _subscribed. |
|
|
Definition at line 621 of file SourceImpl.cc. References _cache_dir. |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 653 of file SourceImpl.cc. |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl. Definition at line 594 of file SourceImpl.cc. Referenced by dumpOn(). |
|
|
Definition at line 624 of file SourceImpl.cc. References _url. Referenced by zypp::source::yum::YUMSourceImpl::checkMetadataChecksums(), zypp::source::yum::YUMSourceImpl::createResolvables(), zypp::source::susetags::SuseTagsImpl::createResolvables(), provideFile(), zypp::source::susetags::SuseTagsImpl::provideResolvables(), and setUrl(). |
|
|
Definition at line 627 of file SourceImpl.cc. |
|
|
Definition at line 630 of file SourceImpl.cc. References _url, zypp::media::MediaManager::downloads(), and ZYPP_CAUGHT. |
|
|
Definition at line 185 of file SourceImpl.h. References _base_source. |
|
|
Definition at line 644 of file SourceImpl.cc. References _path. Referenced by zypp::source::susetags::SuseTagsImpl::verifyFile(). |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 647 of file SourceImpl.cc. |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 650 of file SourceImpl.cc. Referenced by zypp::source::SourceImpl::Verifier::isDesiredMedia(). |
|
|
Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 656 of file SourceImpl.cc. |
|
|
ZMD specific stuff.
Definition at line 664 of file SourceImpl.cc. |
|
|
Definition at line 667 of file SourceImpl.cc. |
|
|
Definition at line 670 of file SourceImpl.cc. |
|
|
Definition at line 673 of file SourceImpl.cc. |
|
||||||||||||
|
Definition at line 570 of file SourceImpl.cc. References _media_set, DBG, media_mgr, and zypp::media::MediaManager::open(). |
|
|
Reattach the source if it is not mounted, but downloaded, to different directory.
Definition at line 576 of file SourceImpl.cc. References _media_set, and DBG. |
|
|
Release all medias attached by the source.
Definition at line 582 of file SourceImpl.cc. References _media_set. |
|
|
Get media verifier for the specified medium. In the default installation, an instance of media::NoVerifier is returned. The specific implementations of the sources should overload this method to return a proper verifier.
Definition at line 588 of file SourceImpl.cc. |
|
|
Provide Source_Ref back to
Definition at line 232 of file SourceImpl.h. Referenced by factoryCtor(), and resolvables(). |
|
||||||||||||||||||||
|
Provide a file to local filesystem on the given path, no checking or progress information redirection.
used by provideFile and providePackage. If
Definition at line 285 of file SourceImpl.cc. References _media_set, zypp::media::MediaChangeReport::ABORT, zypp::media::MediaChangeReport::CHANGE_URL, zypp::SourceFactory::createFrom(), DBG, zypp::media::MediaChangeReport::EJECT, ERR, zypp::media::MediaChangeReport::IGNORE, zypp::media::MediaChangeReport::INVALID, zypp::media::MediaManager::localPath(), media_mgr, MIL, zypp::media::MediaChangeReport::NOT_FOUND, zypp::media::MediaManager::provideFile(), zypp::media::MediaManager::release(), zypp::media::MediaChangeReport::RETRY, zypp::SourceManager::sourceManager(), zypp::media::MediaChangeReport::WRONG, ZYPP_CAUGHT, ZYPP_RETHROW, and ZYPP_THROW. Referenced by provideFile(), and providePackage(). |
|
|
Ctor substitute invoked by factoryCtor. Derived implementations use this to load the metadata. Baseclass implementation could do tasks which are common to all sources.
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl. Definition at line 152 of file SourceImpl.cc. Referenced by factoryCtor(). |
|
|
Overload to realize stream output.
Reimplemented from zypp::base::ReferenceCounted. Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 678 of file SourceImpl.cc. References _alias, _cache_dir, _path, _url, zypp::filesystem::Pathname::empty(), zypp::base::ProvideNumericId< SourceImpl, Source_Ref::NumericId >::numericId(), and type(). Referenced by zypp::source::susetags::SuseTagsImpl::dumpOn(). |
|
|
Late initialize the ResStore.
Reimplemented in zypp::source::susetags::SuseTagsImpl, and zypp::source::yum::YUMSourceImpl. Definition at line 541 of file SourceImpl.cc. Referenced by resolvables(). |
|
||||||||||||
|
Provide only resolvable of a certain kind.
Reimplemented in zypp::source::susetags::SuseTagsImpl. Definition at line 544 of file SourceImpl.cc. References WAR. Referenced by resolvables(). |
|
|
Offer default Impl.
Definition at line 339 of file SourceImpl.h. References SourceImpl(). |
|
||||||||||||
|
Stream output Definition at line 349 of file SourceImpl.h. |
|
|
Definition at line 59 of file SourceImpl.h. Referenced by changeMedia(), dirInfo(), factoryCtor(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), provideDirTree(), provideJustFile(), redirect(), releaseDir(), releaseFile(), tryToProvideFile(), and ~SourceImpl(). |
|
|
All resolvables provided by this source.
Definition at line 260 of file SourceImpl.h. Referenced by zypp::source::yum::YUMSourceImpl::augmentPackage(), zypp::source::susetags::SuseTagsImpl::createResolvables(), factoryCtor(), zypp::source::susetags::SuseTagsImpl::providePatterns(), and resolvables(). |
|
|
URL of the media.
Definition at line 262 of file SourceImpl.h. Referenced by changeMedia(), dumpOn(), factoryCtor(), remote(), setUrl(), and url(). |
|
|
Path to the source on the media.
Definition at line 264 of file SourceImpl.h. Referenced by changeMedia(), zypp::source::yum::YUMSourceImpl::checkMetadataChecksums(), zypp::source::yum::YUMSourceImpl::createResolvables(), dumpOn(), factoryCtor(), zypp::source::yum::YUMSourceImpl::factoryInit(), path(), zypp::source::susetags::SuseTagsImpl::publicKeys(), zypp::source::susetags::SuseTagsImpl::readContentFile(), zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata(). |
|
|
The source is enabled.
Definition at line 266 of file SourceImpl.h. |
|
|
If the source metadata should be autorefreshed.
Definition at line 268 of file SourceImpl.h. Referenced by autorefresh(), factoryCtor(), and setAutorefresh(). |
|
|
(user defined) alias of the source
Definition at line 270 of file SourceImpl.h. Referenced by alias(), dumpOn(), factoryCtor(), and setAlias(). |
|
|
Directory holding metadata cache.
Definition at line 272 of file SourceImpl.h. Referenced by cacheDir(), zypp::source::yum::YUMSourceImpl::cacheExists(), zypp::source::susetags::SuseTagsImpl::cacheExists(), zypp::source::yum::YUMSourceImpl::checkMetadataChecksums(), zypp::source::yum::YUMSourceImpl::createResolvables(), dumpOn(), factoryCtor(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::publicKeys(), zypp::source::susetags::SuseTagsImpl::readContentFile(), refresh(), zypp::source::yum::YUMSourceImpl::storeMetadata(), and zypp::source::susetags::SuseTagsImpl::storeMetadata(). |
|
|
(user defined) id of the source mostly used for ZENworks
Definition at line 275 of file SourceImpl.h. |
|
|
(user defined) default priority of the source
Definition at line 277 of file SourceImpl.h. Referenced by priority(), and setPriority(). |
|
|
(user defined) unsubscribed priority of the source
Definition at line 279 of file SourceImpl.h. Referenced by priorityUnsubscribed(), and setPriorityUnsubscribed(). |
|
|
subscribed?, solver prefers subscribed sources
Definition at line 281 of file SourceImpl.h. Referenced by factoryCtor(), setSubscribed(), and subscribed(). |
|
|
source contains base product?
Definition at line 283 of file SourceImpl.h. Referenced by baseSource(), and factoryCtor(). |
|
|
Set of medias of the product.
Definition at line 313 of file SourceImpl.h. Referenced by changeMedia(), dirInfo(), factoryCtor(), zypp::source::yum::YUMSourceImpl::factoryInit(), zypp::source::susetags::SuseTagsImpl::factoryInit(), provideDirTree(), provideJustFile(), reattach(), redirect(), release(), releaseDir(), releaseFile(), tryToProvideFile(), and ~SourceImpl(). |
|
|
Whether the ResStore is initialized.
Definition at line 323 of file SourceImpl.h. Referenced by resolvables(). |
1.4.6