Public Member Functions | |
Impl (const RepoManagerOptions &opt) | |
void | saveService (ServiceInfo &service) const |
Pathname | generateNonExistingName (const Pathname &dir, const std::string &basefilename) const |
Generate a non existing filename in a directory, using a base name. | |
std::string | generateFilename (const RepoInfo &info) const |
Generate a related filename from a repo info. | |
std::string | generateFilename (const ServiceInfo &info) const |
Public Attributes | |
RepoManagerOptions | options |
RepoSet | repos |
ServiceSet | services |
Private Member Functions | |
void | init_knownServices () |
void | init_knownRepositories () |
Impl * | clone () const |
clone for RWCOW_pointer | |
Friends | |
Impl * | rwcowClone (const Impl *rhs) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const RepoManager::Impl &obj) |
Definition at line 405 of file RepoManager.cc.
zypp::RepoManager::Impl::Impl | ( | const RepoManagerOptions & | opt | ) | [inline] |
Definition at line 407 of file RepoManager.cc.
References init_knownRepositories(), and init_knownServices().
Referenced by clone().
void zypp::RepoManager::Impl::saveService | ( | ServiceInfo & | service | ) | const |
Definition at line 452 of file RepoManager.cc.
References _, zypp::filesystem::assert_dir(), zypp::ServiceInfo::dumpAsIniOn(), zypp::str::form(), generateFilename(), generateNonExistingName(), zypp::RepoManagerOptions::knownServicesPath, MIL, options, zypp::repo::RepoInfoBase::setFilepath(), and ZYPP_THROW.
Pathname zypp::RepoManager::Impl::generateNonExistingName | ( | const Pathname & | dir, | |
const std::string & | basefilename | |||
) | const |
Generate a non existing filename in a directory, using a base name.
For example if a directory contains 3 files
|-- bar |-- foo `-- moo
If you try to generate a unique filename for this directory, based on "ruu" you will get "ruu", but if you use the base "foo" you will get "foo_1"
dir | Directory where the file needs to be unique | |
basefilename | string to base the filename on. |
Definition at line 486 of file RepoManager.cc.
References zypp::str::numstring().
Referenced by saveService().
std::string zypp::RepoManager::Impl::generateFilename | ( | const RepoInfo & | info | ) | const |
Generate a related filename from a repo info.
From a repo info, it will try to use the alias as a filename escaping it if necessary. Other fallbacks can be added to this function in case there is no way to use the alias
Definition at line 508 of file RepoManager.cc.
References zypp::repo::RepoInfoBase::alias(), MIL, and zypp::str::replaceAll().
Referenced by saveService().
std::string zypp::RepoManager::Impl::generateFilename | ( | const ServiceInfo & | info | ) | const |
Definition at line 519 of file RepoManager.cc.
References zypp::repo::RepoInfoBase::alias(), MIL, and zypp::str::replaceAll().
void zypp::RepoManager::Impl::init_knownServices | ( | ) | [private] |
Definition at line 531 of file RepoManager.cc.
References _, for_, zypp::str::form(), zypp::RepoManagerOptions::knownServicesPath, options, zypp::RepoManagerOptions::pluginsPath(), zypp::filesystem::readdir(), services, and ZYPP_THROW.
Referenced by Impl().
void zypp::RepoManager::Impl::init_knownRepositories | ( | ) | [private] |
Definition at line 553 of file RepoManager.cc.
References zypp::RepoManagerOptions::knownReposPath, MIL, options, zypp::packagescache_path_for_repoinfo(), zypp::rawcache_path_for_repoinfo(), repos, and zypp::repositories_in_dir().
Referenced by Impl().
Impl* zypp::RepoManager::Impl::clone | ( | ) | const [inline, private] |
std::ostream & operator<< | ( | std::ostream & | str, | |
const RepoManager::Impl & | obj | |||
) | [related] |
Stream output
Definition at line 445 of file RepoManager.cc.
Definition at line 414 of file RepoManager.cc.
Referenced by init_knownRepositories(), init_knownServices(), and saveService().