47 : repo::RepoInfoBase::
Impl()
48 , type(repo::ServiceType::NONE_e)
52 : repo::RepoInfoBase::
Impl()
54 , type(repo::ServiceType::NONE_e)
62 if ( type == repo::ServiceType::NONE
63 && t != repo::ServiceType::NONE )
66 const_cast<Impl*
>(
this)->type = t;
71 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
75 {
return new Impl( *
this ); }
88 ServiceInfo::ServiceInfo() : _pimpl( new
Impl() ) {}
91 : repo::RepoInfoBase(alias), _pimpl( new Impl() )
95 : repo::RepoInfoBase(alias), _pimpl( new Impl(url) )
110 {
_pimpl->setProbedType( t ); }
113 {
return _pimpl->reposToEnable.empty(); }
116 {
return _pimpl->reposToEnable.size(); }
119 {
return _pimpl->reposToEnable.begin(); }
122 {
return _pimpl->reposToEnable.end(); }
125 {
return(
_pimpl->reposToEnable.find( alias_r ) !=
_pimpl->reposToEnable.end() ); }
129 _pimpl->reposToEnable.insert( alias_r );
130 _pimpl->reposToDisable.erase( alias_r );
134 {
_pimpl->reposToEnable.erase( alias_r ); }
137 {
_pimpl->reposToEnable.clear(); }
141 {
return _pimpl->reposToDisable.empty(); }
144 {
return _pimpl->reposToDisable.size(); }
147 {
return _pimpl->reposToDisable.begin(); }
150 {
return _pimpl->reposToDisable.end(); }
153 {
return(
_pimpl->reposToDisable.find( alias_r ) !=
_pimpl->reposToDisable.end() ); }
157 _pimpl->reposToDisable.insert( alias_r );
158 _pimpl->reposToEnable.erase( alias_r );
162 {
_pimpl->reposToDisable.erase( alias_r ); }
165 {
_pimpl->reposToDisable.clear(); }
170 RepoInfoBase::dumpAsIniOn(str)
171 <<
"url = " <<
url() << endl
172 <<
"type = " <<
type() << endl;
190 <<
" enabled=\"" <<
enabled() <<
"\""
198 str <<
">" << endl << content <<
"</service>" << endl;
std::string name() const
Repository short label.
ReposToDisable reposToDisable
std::string alias() const
unique identifier for this source.
std::set< std::string > ReposToEnable
Container of repos.
ReposToDisable::size_type reposToDisableSize() const
virtual std::ostream & dumpAsXMLOn(std::ostream &str) const
Write an XML representation of this ServiceInfo object.
ReposToEnable::const_iterator reposToEnableBegin() const
void clearReposToEnable()
Clear the set of ReposToEnable.
std::string escape(const C_Str &str_r, const char sep_r)
Escape desired character c using a backslash.
ServiceInfo::ReposToDisable ReposToDisable
void addRepoToEnable(const std::string &alias_r)
Add alias_r to the set of ReposToEnable.
ReposToEnable reposToEnable
const std::string & asString() const
bool enabled() const
If enabled is false, then this repository must be ignored as if does not exists, except when checking...
ReposToDisable::const_iterator reposToDisableEnd() const
void setType(const repo::ServiceType &type)
Set service type.
Impl * clone() const
clone for RWCOW_pointer
std::string joinEscaped(_Iterator begin, _Iterator end, const char sep_r= ' ')
Join strings using separator sep_r, quoting or escaping the values.
RWCOW_pointer< Impl > _pimpl
ReposToDisable::const_iterator reposToDisableBegin() const
std::string escape(const std::string &in_r)
Escape xml special charaters (& -> &; from IoBind library).
void clearReposToDisable()
Clear the set of ReposToDisable.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Service type enumeration.
void setProbedType(const repo::ServiceType &t) const
bool reposToEnableEmpty() const
ServiceInfo()
Default ctor creates noService.
void delRepoToEnable(const std::string &alias_r)
Remove alias_r from the set of ReposToEnable.
bool reposToDisableEmpty() const
std::string asString(const Patch::SeverityFlag &obj)
void setUrl(const Url &url)
Sets url for this service.
ServiceInfo::ReposToEnable ReposToEnable
std::set< std::string > ReposToDisable
Container of repos.
bool autorefresh() const
If true, the repostory must be refreshed before creating resolvables from it.
bool repoToDisableFind(const std::string &alias_r) const
Whether alias_r is mentioned in ReposToDisable.
void delRepoToDisable(const std::string &alias_r)
Remove alias_r from the set of ReposToDisable.
void addRepoToDisable(const std::string &alias_r)
Add alias_r to the set of ReposToDisable.
bool repoToEnableFind(const std::string &alias_r) const
Whether alias_r is mentioned in ReposToEnable.
ReposToEnable::const_iterator reposToEnableEnd() const
ReposToEnable::size_type reposToEnableSize() const
Url url() const
Gets url to service.
void setProbedType(const repo::ServiceType &t) const
virtual std::ostream & dumpAsIniOn(std::ostream &str) const
Writes ServiceInfo to stream in ".service" format.
repo::ServiceType type() const