#include <ServiceInfo.h>
Classes | |
struct | Impl |
Public Member Functions | |
ServiceInfo () | |
Default ctor creates noService. | |
ServiceInfo (const std::string &alias) | |
Creates ServiceInfo with specified alias. | |
ServiceInfo (const std::string &alias, const Url &url) | |
ServiceInfo with alias and its URL. | |
virtual | ~ServiceInfo () |
Url | url () const |
Gets url to service. | |
void | setUrl (const Url &url) |
Sets url for this service. | |
repo::ServiceType | type () const |
void | setType (const repo::ServiceType &type) |
Set service type. | |
void | setProbedType (const repo::ServiceType &t) const |
virtual std::ostream & | dumpAsIniOn (std::ostream &str) const |
Writes ServiceInfo to stream in ".service" format. | |
virtual std::ostream & | dumpAsXMLOn (std::ostream &str) const |
Write an XML representation of this ServiceInfo object. | |
virtual std::ostream & | dumpAsXMLOn (std::ostream &str, const std::string &content) const |
Write an XML representation of this ServiceInfo object. | |
Static Public Attributes | |
static const ServiceInfo | noService |
Represents an empty service. | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Related Functions | |
(Note that these are not member functions.) | |
typedef shared_ptr< ServiceInfo > | ServiceInfo_Ptr |
typedef shared_ptr< const ServiceInfo > | ServiceInfo_constPtr |
typedef std::list< ServiceInfo > | ServiceInfoList |
std::ostream & | operator<< (std::ostream &str, const ServiceInfo &obj) |
Set of repos (repository aliases) to enable on next refresh. | |
Per default new repositories are created in disabled state.
But repositories mentioned here will be created in enabled state on the next refresh. Afterwards they get removed from the list. | |
typedef std::set< std::string > | ReposToEnable |
Container of repos. | |
bool | reposToEnableEmpty () const |
ReposToEnable::size_type | reposToEnableSize () const |
ReposToEnable::const_iterator | reposToEnableBegin () const |
ReposToEnable::const_iterator | reposToEnableEnd () const |
bool | repoToEnableFind (const std::string &alias_r) const |
Wheter alias_r is mentioned in ReposToEnable. | |
void | addRepoToEnable (const std::string &alias_r) |
Add alias_r to the set of ReposToEnable. | |
void | delRepoToEnable (const std::string &alias_r) |
Remove alias_r from the set of ReposToEnable. | |
void | clearReposToEnable () |
Clear the set of ReposToEnable. | |
Set of repos (repository aliases) to disable on next refresh. | |
Repositories mentioned here will be disabled on the next refresh, in case they still exist.
Afterwards they get removed from the list. | |
typedef std::set< std::string > | ReposToDisable |
Container of repos. | |
bool | reposToDisableEmpty () const |
ReposToDisable::size_type | reposToDisableSize () const |
ReposToDisable::const_iterator | reposToDisableBegin () const |
ReposToDisable::const_iterator | reposToDisableEnd () const |
bool | repoToDisableFind (const std::string &alias_r) const |
Wheter alias_r is mentioned in ReposToDisable. | |
void | addRepoToDisable (const std::string &alias_r) |
Add alias_r to the set of ReposToDisable. | |
void | delRepoToDisable (const std::string &alias_r) |
Remove alias_r from the set of ReposToDisable. | |
void | clearReposToDisable () |
Clear the set of ReposToDisable. |
Definition at line 33 of file ServiceInfo.h.
typedef std::set<std::string> zypp::ServiceInfo::ReposToEnable |
typedef std::set<std::string> zypp::ServiceInfo::ReposToDisable |
zypp::ServiceInfo::ServiceInfo | ( | ) |
zypp::ServiceInfo::ServiceInfo | ( | const std::string & | alias | ) |
zypp::ServiceInfo::ServiceInfo | ( | const std::string & | alias, | |
const Url & | url | |||
) |
ServiceInfo with alias and its URL.
zypp::ServiceInfo::~ServiceInfo | ( | ) | [virtual] |
Definition at line 98 of file ServiceInfo.cc.
Url zypp::ServiceInfo::url | ( | ) | const |
Gets url to service.
Definition at line 101 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::addService(), zypp::assert_url(), dumpAsIniOn(), zypp::repo::ServiceException::dumpOn(), zypp::repo::PluginServiceRepos::PluginServiceRepos(), zypp::RepoManager::refreshService(), and zypp::repo::RIMServiceRepos::RIMServiceRepos().
void zypp::ServiceInfo::setUrl | ( | const Url & | url | ) |
Sets url for this service.
Definition at line 102 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::repo::PluginServices::Impl::loadServices(), and zypp::parser::ServiceFileReader::Impl::parseServices().
repo::ServiceType zypp::ServiceInfo::type | ( | ) | const |
Definition at line 104 of file ServiceInfo.cc.
References _pimpl.
Referenced by dumpAsIniOn(), zypp::RepoManager::modifyService(), and zypp::RepoManager::refreshService().
void zypp::ServiceInfo::setType | ( | const repo::ServiceType & | type | ) |
Set service type.
type | the new type |
Definition at line 106 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::repo::PluginServices::Impl::loadServices(), and zypp::parser::ServiceFileReader::Impl::parseServices().
void zypp::ServiceInfo::setProbedType | ( | const repo::ServiceType & | t | ) | const |
Definition at line 109 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::refreshService().
bool zypp::ServiceInfo::reposToEnableEmpty | ( | ) | const |
ServiceInfo::ReposToEnable::size_type zypp::ServiceInfo::reposToEnableSize | ( | ) | const |
ServiceInfo::ReposToEnable::const_iterator zypp::ServiceInfo::reposToEnableBegin | ( | ) | const |
ServiceInfo::ReposToEnable::const_iterator zypp::ServiceInfo::reposToEnableEnd | ( | ) | const |
bool zypp::ServiceInfo::repoToEnableFind | ( | const std::string & | alias_r | ) | const |
Wheter alias_r
is mentioned in ReposToEnable.
Definition at line 124 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::refreshService().
void zypp::ServiceInfo::addRepoToEnable | ( | const std::string & | alias_r | ) |
Add alias_r
to the set of ReposToEnable.
Definition at line 127 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::parser::ServiceFileReader::Impl::parseServices(), and zypp::RepoManager::refreshService().
void zypp::ServiceInfo::delRepoToEnable | ( | const std::string & | alias_r | ) |
Remove alias_r
from the set of ReposToEnable.
Definition at line 133 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::refreshService().
void zypp::ServiceInfo::clearReposToEnable | ( | ) |
bool zypp::ServiceInfo::reposToDisableEmpty | ( | ) | const |
Definition at line 140 of file ServiceInfo.cc.
References _pimpl.
Referenced by dumpAsIniOn(), and zypp::RepoManager::refreshService().
ServiceInfo::ReposToDisable::size_type zypp::ServiceInfo::reposToDisableSize | ( | ) | const |
ServiceInfo::ReposToDisable::const_iterator zypp::ServiceInfo::reposToDisableBegin | ( | ) | const |
ServiceInfo::ReposToDisable::const_iterator zypp::ServiceInfo::reposToDisableEnd | ( | ) | const |
bool zypp::ServiceInfo::repoToDisableFind | ( | const std::string & | alias_r | ) | const |
Wheter alias_r
is mentioned in ReposToDisable.
Definition at line 152 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::refreshService().
void zypp::ServiceInfo::addRepoToDisable | ( | const std::string & | alias_r | ) |
Add alias_r
to the set of ReposToDisable.
Definition at line 155 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::parser::ServiceFileReader::Impl::parseServices().
void zypp::ServiceInfo::delRepoToDisable | ( | const std::string & | alias_r | ) |
Remove alias_r
from the set of ReposToDisable.
Definition at line 161 of file ServiceInfo.cc.
References _pimpl.
void zypp::ServiceInfo::clearReposToDisable | ( | ) |
Clear the set of ReposToDisable.
Definition at line 164 of file ServiceInfo.cc.
References _pimpl.
Referenced by zypp::RepoManager::refreshService().
std::ostream & zypp::ServiceInfo::dumpAsIniOn | ( | std::ostream & | str | ) | const [virtual] |
Writes ServiceInfo to stream in ".service" format.
str | stream where serialized version service is written |
Reimplemented from zypp::repo::RepoInfoBase.
Definition at line 168 of file ServiceInfo.cc.
References zypp::str::joinEscaped(), reposToDisableBegin(), reposToDisableEmpty(), reposToDisableEnd(), reposToEnableBegin(), reposToEnableEmpty(), reposToEnableEnd(), type(), and url().
Referenced by zypp::RepoManager::modifyService(), zypp::operator<<(), and zypp::RepoManager::Impl::saveService().
std::ostream & zypp::ServiceInfo::dumpAsXMLOn | ( | std::ostream & | str | ) | const [virtual] |
Write an XML representation of this ServiceInfo object.
Reimplemented from zypp::repo::RepoInfoBase.
Definition at line 181 of file ServiceInfo.cc.
virtual std::ostream& zypp::ServiceInfo::dumpAsXMLOn | ( | std::ostream & | str, | |
const std::string & | content | |||
) | const [virtual] |
Write an XML representation of this ServiceInfo object.
str | ||
content | if not empty, produces <service ...>content</service> otherwise <service .../> |
Reimplemented from zypp::repo::RepoInfoBase.
typedef shared_ptr<ServiceInfo> ServiceInfo_Ptr [related] |
Definition at line 171 of file ServiceInfo.h.
typedef shared_ptr<const ServiceInfo> ServiceInfo_constPtr [related] |
Definition at line 173 of file ServiceInfo.h.
typedef std::list<ServiceInfo> ServiceInfoList [related] |
Definition at line 175 of file ServiceInfo.h.
std::ostream & operator<< | ( | std::ostream & | str, | |
const ServiceInfo & | obj | |||
) | [related] |
Stream output
Definition at line 204 of file ServiceInfo.cc.
const ServiceInfo zypp::ServiceInfo::noService [static] |
Represents an empty service.
Definition at line 58 of file ServiceInfo.h.
Referenced by zypp::RepoManager::getService().
RWCOW_pointer<Impl> zypp::ServiceInfo::_pimpl [private] |
Pointer to implementation.
Reimplemented from zypp::repo::RepoInfoBase.
Definition at line 163 of file ServiceInfo.h.
Referenced by addRepoToDisable(), addRepoToEnable(), clearReposToDisable(), clearReposToEnable(), delRepoToDisable(), delRepoToEnable(), reposToDisableBegin(), reposToDisableEmpty(), reposToDisableEnd(), reposToDisableSize(), reposToEnableBegin(), reposToEnableEmpty(), reposToEnableEnd(), reposToEnableSize(), repoToDisableFind(), repoToEnableFind(), setProbedType(), setType(), setUrl(), type(), and url().