#include <SourceFactory.h>
Public Types | |
| typedef std::set< ProductEntry > | ProductSet |
Public Member Functions | |
| SourceFactory () | |
| Default ctor. | |
| ~SourceFactory () | |
| Dtor. | |
| Source_Ref | createFrom (const source::SourceInfo &context) |
| Construct source. | |
| Source_Ref | createFrom (const Source_Ref::Impl_Ptr &impl_r) |
| Construct source from an implementation. | |
| Source_Ref | createFrom (const Url &url_r, const Pathname &path_r="/", const std::string &alias_r="", const Pathname &cache_dir_r="", bool base_source=false) |
| Construct source. | |
| Source_Ref | createFrom (const std::string &type, const Url &url_r, const Pathname &path_r, const std::string &alias_r, const Pathname &cache_dir_r, bool base_source, tribool auto_refresh) |
| Construct source of a given type. | |
| void | listProducts (const Url &url_r, ProductSet &products_r) |
| Check which products are available on the media. | |
Protected Member Functions | |
| template<class _SourceImpl> | |
| Source_Ref | createSourceImplWorkflow (media::MediaId id, const source::SourceInfo &context) |
Private Member Functions | |
| void | scanProductsFile (const Pathname &file_r, ProductSet &pset_r) const |
Private Attributes | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const SourceFactory &obj) |
| Stream output. | |
Classes | |
| struct | Impl |
| SourceFactory implementation. More... | |
| struct | ProductEntry |
Actually a Singleton
Definition at line 45 of file SourceFactory.h.
| typedef std::set<ProductEntry> zypp::SourceFactory::ProductSet |
Definition at line 98 of file SourceFactory.h.
| zypp::SourceFactory::SourceFactory | ( | ) |
| zypp::SourceFactory::~SourceFactory | ( | ) |
| Source_Ref zypp::SourceFactory::createFrom | ( | const source::SourceInfo & | context | ) |
Construct source.
| EXCEPTION | on fail |
Definition at line 111 of file SourceFactory.cc.
References zypp::source::SourceInfo::alias(), zypp::source::SourceInfo::autorefresh(), zypp::source::SourceInfo::baseSource(), zypp::source::SourceInfo::cacheDir(), zypp::source::SourceInfo::path(), zypp::source::SourceInfo::type(), and zypp::source::SourceInfo::url().
Referenced by zypp::source::SourceImpl::provideDirTree(), zypp::source::SourceImpl::provideJustFile(), and zypp::source::susetags::SuseTagsImpl::readContentFile().
| Source_Ref zypp::SourceFactory::createFrom | ( | const Source_Ref::Impl_Ptr & | impl_r | ) |
Construct source from an implementation.
Returns Source_Ref::noSource on NULL impl_r.
Definition at line 83 of file SourceFactory.cc.
References zypp::Source_Ref::noSource.
| Source_Ref zypp::SourceFactory::createFrom | ( | const Url & | url_r, | |
| const Pathname & | path_r = "/", |
|||
| const std::string & | alias_r = "", |
|||
| const Pathname & | cache_dir_r = "", |
|||
| bool | base_source = false | |||
| ) |
Construct source.
| EXCEPTION | on fail |
Definition at line 203 of file SourceFactory.cc.
References zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::attach(), zypp::media::MediaAccess::canBeVolatile(), zypp::Url::isValid(), zypp::media_mgr, MIL, zypp::media::MediaManager::open(), report, zypp::source::SourceInfo::setBaseSource(), and ZYPP_THROW.
| Source_Ref zypp::SourceFactory::createFrom | ( | const std::string & | type, | |
| const Url & | url_r, | |||
| const Pathname & | path_r, | |||
| const std::string & | alias_r, | |||
| const Pathname & | cache_dir_r, | |||
| bool | base_source, | |||
| tribool | auto_refresh | |||
| ) |
Construct source of a given type.
| EXCEPTION | on fail |
Definition at line 267 of file SourceFactory.cc.
References zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::attach(), zypp::media::MediaAccess::canBeVolatile(), zypp::Url::isValid(), zypp::media_mgr, MIL, zypp::media::MediaManager::open(), zypp::source::SourceInfo::setBaseSource(), zypp::source::SourceInfo::setType(), ZYPP_CAUGHT, ZYPP_RETHROW, and ZYPP_THROW.
| Source_Ref zypp::SourceFactory::createSourceImplWorkflow | ( | media::MediaId | id, | |
| const source::SourceInfo & | context | |||
| ) | [protected] |
Definition at line 159 of file SourceFactory.cc.
References MIL, report, zypp::source::SourceInfo::url(), ZYPP_CAUGHT, and ZYPP_THROW.
| void zypp::SourceFactory::listProducts | ( | const Url & | url_r, | |
| ProductSet & | products_r | |||
| ) |
Check which products are available on the media.
| Exception | or MediaException on fail |
Definition at line 88 of file SourceFactory.cc.
References zypp::media::MediaManager::attach(), zypp::Url::isValid(), zypp::media::MediaManager::localPath(), zypp::media_mgr, MIL, zypp::media::MediaManager::open(), zypp::media::MediaManager::provideFile(), zypp::media::MediaManager::release(), scanProductsFile(), ZYPP_CAUGHT, and ZYPP_THROW.
| void zypp::SourceFactory::scanProductsFile | ( | const Pathname & | file_r, | |
| ProductSet & | pset_r | |||
| ) | const [private] |
Definition at line 353 of file SourceFactory.cc.
References ERR, zypp::str::getline(), zypp::str::stripFirstWord(), zypp::str::TRIM, and ZYPP_THROW.
Referenced by listProducts().
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const SourceFactory & | obj | |||
| ) | [friend] |
RW_pointer<Impl> zypp::SourceFactory::_pimpl [private] |
1.5.0