zypp::SourceFactory Class Reference

Factory to create a Source_Ref. More...

#include <SourceFactory.h>

List of all members.

Public Types

typedef std::set< ProductEntryProductSet

Public Member Functions

 SourceFactory ()
 Default ctor.
 ~SourceFactory ()
 Dtor.
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, bool 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.

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)

Classes

struct  Impl
 SourceFactory implementation. More...
struct  ProductEntry


Detailed Description

Factory to create a Source_Ref.

Actually a Singleton

Definition at line 37 of file SourceFactory.h.


Member Typedef Documentation

typedef std::set<ProductEntry> zypp::SourceFactory::ProductSet
 

Definition at line 82 of file SourceFactory.h.


Constructor & Destructor Documentation

zypp::SourceFactory::SourceFactory  ) 
 

Default ctor.

Definition at line 83 of file SourceFactory.cc.

zypp::SourceFactory::~SourceFactory  ) 
 

Dtor.

Definition at line 91 of file SourceFactory.cc.


Member Function Documentation

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 99 of file SourceFactory.cc.

References zypp::Source_Ref::noSource.

Referenced by zypp::source::SourceImpl::provideDirTree(), zypp::source::SourceImpl::provideFile(), zypp::source::SourceImpl::provideJustFile(), and zypp::source::susetags::SuseTagsImpl::readContentFile().

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.

Exceptions:
EXCEPTION on fail

Definition at line 128 of file SourceFactory.cc.

References zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::attach(), zypp::media::MediaAccess::canBeVolatile(), ERR, zypp::Url::isValid(), zypp::media_mgr, MIL, zypp::media::MediaManager::open(), report, ZYPP_CAUGHT, 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,
bool  auto_refresh
 

Construct source of a given type.

Exceptions:
EXCEPTION on fail

Definition at line 217 of file SourceFactory.cc.

References zypp::media::MediaManager::addVerifier(), zypp::media::MediaManager::attach(), ERR, zypp::Url::isValid(), zypp::media_mgr, MIL, zypp::media::MediaManager::open(), report, ZYPP_CAUGHT, and ZYPP_THROW.

void zypp::SourceFactory::listProducts const Url url_r,
ProductSet products_r
 

Check which products are available on the media.

Exceptions:
Exception or MediaException on fail

Definition at line 104 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 297 of file SourceFactory.cc.

References zypp::filesystem::Pathname::asString(), ERR, zypp::str::getline(), zypp::str::TRIM, and ZYPP_THROW.

Referenced by listProducts().


Friends And Related Function Documentation

std::ostream & operator<< std::ostream &  str,
const SourceFactory obj
[friend]
 

Stream output

Definition at line 292 of file SourceFactory.cc.


Member Data Documentation

RW_pointer<Impl> zypp::SourceFactory::_pimpl [private]
 

Pointer to implementation.

Definition at line 65 of file SourceFactory.h.


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6