//
struct ServiceInfo::Impl : public repo::RepoInfoBase::Impl
{
- typedef ServiceInfo::CatalogsToEnable CatalogsToEnable;
- typedef ServiceInfo::CatalogsToDisable CatalogsToDisable;
+ typedef ServiceInfo::ReposToEnable ReposToEnable;
+ typedef ServiceInfo::ReposToDisable ReposToDisable;
public:
Url url;
repo::ServiceType type;
- CatalogsToEnable catalogsToEnable;
- CatalogsToDisable catalogsToDisable;
+ ReposToEnable reposToEnable;
+ ReposToDisable reposToDisable;
public:
Impl()
void ServiceInfo::setProbedType( const repo::ServiceType &t ) const
{ _pimpl->setProbedType( t ); }
- bool ServiceInfo::catalogsToEnableEmpty() const
- { return _pimpl->catalogsToEnable.empty(); }
+ bool ServiceInfo::reposToEnableEmpty() const
+ { return _pimpl->reposToEnable.empty(); }
- ServiceInfo::CatalogsToEnable::size_type ServiceInfo::catalogsToEnableSize() const
- { return _pimpl->catalogsToEnable.size(); }
+ ServiceInfo::ReposToEnable::size_type ServiceInfo::reposToEnableSize() const
+ { return _pimpl->reposToEnable.size(); }
- ServiceInfo::CatalogsToEnable::const_iterator ServiceInfo::catalogsToEnableBegin() const
- { return _pimpl->catalogsToEnable.begin(); }
+ ServiceInfo::ReposToEnable::const_iterator ServiceInfo::reposToEnableBegin() const
+ { return _pimpl->reposToEnable.begin(); }
- ServiceInfo::CatalogsToEnable::const_iterator ServiceInfo::catalogsToEnableEnd() const
- { return _pimpl->catalogsToEnable.end(); }
+ ServiceInfo::ReposToEnable::const_iterator ServiceInfo::reposToEnableEnd() const
+ { return _pimpl->reposToEnable.end(); }
- bool ServiceInfo::catalogToEnableFind( const std::string & alias_r ) const
- { return( _pimpl->catalogsToEnable.find( alias_r ) != _pimpl->catalogsToEnable.end() ); }
+ bool ServiceInfo::repoToEnableFind( const std::string & alias_r ) const
+ { return( _pimpl->reposToEnable.find( alias_r ) != _pimpl->reposToEnable.end() ); }
- void ServiceInfo::addCatalogToEnable( const std::string & alias_r )
- { _pimpl->catalogsToEnable.insert( alias_r ); }
+ void ServiceInfo::addRepoToEnable( const std::string & alias_r )
+ { _pimpl->reposToEnable.insert( alias_r ); }
- void ServiceInfo::delCatalogToEnable( const std::string & alias_r )
- { _pimpl->catalogsToEnable.erase( alias_r ); }
+ void ServiceInfo::delRepoToEnable( const std::string & alias_r )
+ { _pimpl->reposToEnable.erase( alias_r ); }
- bool ServiceInfo::catalogsToDisableEmpty() const
- { return _pimpl->catalogsToDisable.empty(); }
+ bool ServiceInfo::reposToDisableEmpty() const
+ { return _pimpl->reposToDisable.empty(); }
- ServiceInfo::CatalogsToDisable::size_type ServiceInfo::catalogsToDisableSize() const
- { return _pimpl->catalogsToDisable.size(); }
+ ServiceInfo::ReposToDisable::size_type ServiceInfo::reposToDisableSize() const
+ { return _pimpl->reposToDisable.size(); }
- ServiceInfo::CatalogsToDisable::const_iterator ServiceInfo::catalogsToDisableBegin() const
- { return _pimpl->catalogsToDisable.begin(); }
+ ServiceInfo::ReposToDisable::const_iterator ServiceInfo::reposToDisableBegin() const
+ { return _pimpl->reposToDisable.begin(); }
- ServiceInfo::CatalogsToDisable::const_iterator ServiceInfo::catalogsToDisableEnd() const
- { return _pimpl->catalogsToDisable.end(); }
+ ServiceInfo::ReposToDisable::const_iterator ServiceInfo::reposToDisableEnd() const
+ { return _pimpl->reposToDisable.end(); }
- bool ServiceInfo::catalogToDisableFind( const std::string & alias_r ) const
- { return( _pimpl->catalogsToDisable.find( alias_r ) != _pimpl->catalogsToDisable.end() ); }
+ bool ServiceInfo::repoToDisableFind( const std::string & alias_r ) const
+ { return( _pimpl->reposToDisable.find( alias_r ) != _pimpl->reposToDisable.end() ); }
- void ServiceInfo::addCatalogToDisable( const std::string & alias_r )
- { _pimpl->catalogsToDisable.insert( alias_r ); }
+ void ServiceInfo::addRepoToDisable( const std::string & alias_r )
+ { _pimpl->reposToDisable.insert( alias_r ); }
- void ServiceInfo::delCatalogToDisable( const std::string & alias_r )
- { _pimpl->catalogsToDisable.erase( alias_r ); }
+ void ServiceInfo::delRepoToDisable( const std::string & alias_r )
+ { _pimpl->reposToDisable.erase( alias_r ); }
std::ostream & ServiceInfo::dumpAsIniOn( std::ostream & str ) const
<< "url = " << url() << endl
<< "type = " << type() << endl;
- if ( ! catalogsToEnableEmpty() )
- str << "catalogstoenable = " << str::joinEscaped( catalogsToEnableBegin(), catalogsToEnableEnd() ) << endl;
- if ( ! catalogsToDisableEmpty() )
- str << "catalogstodisable = " << str::joinEscaped( catalogsToDisableBegin(), catalogsToDisableEnd() ) << endl;
+ if ( ! reposToEnableEmpty() )
+ str << "repostoenable = " << str::joinEscaped( reposToEnableBegin(), reposToEnableEnd() ) << endl;
+ if ( ! reposToDisableEmpty() )
+ str << "repostodisable = " << str::joinEscaped( reposToDisableBegin(), reposToDisableEnd() ) << endl;
return str;
}
void setProbedType( const repo::ServiceType & t ) const;
- /** \name Set of catalogs (repository aliases) to enable on next refresh.
+ /** \name 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.
*/
//@{
- /** Container of catalogs. */
- typedef std::set<std::string> CatalogsToEnable;
- bool catalogsToEnableEmpty() const;
- CatalogsToEnable::size_type catalogsToEnableSize() const;
- CatalogsToEnable::const_iterator catalogsToEnableBegin() const;
- CatalogsToEnable::const_iterator catalogsToEnableEnd() const;
-
- /** Wheter \c alias_r is mentioned in CatalogsToEnable. */
- bool catalogToEnableFind( const std::string & alias_r ) const;
-
- /** Add \c alias_r to the set of CatalogsToEnable. */
- void addCatalogToEnable( const std::string & alias_r );
- /** Remove \c alias_r to the set of CatalogsToEnable. */
- void delCatalogToEnable( const std::string & alias_r );
+ /** Container of repos. */
+ typedef std::set<std::string> ReposToEnable;
+ bool reposToEnableEmpty() const;
+ ReposToEnable::size_type reposToEnableSize() const;
+ ReposToEnable::const_iterator reposToEnableBegin() const;
+ ReposToEnable::const_iterator reposToEnableEnd() const;
+
+ /** Wheter \c alias_r is mentioned in ReposToEnable. */
+ bool repoToEnableFind( const std::string & alias_r ) const;
+
+ /** Add \c alias_r to the set of ReposToEnable. */
+ void addRepoToEnable( const std::string & alias_r );
+ /** Remove \c alias_r to the set of ReposToEnable. */
+ void delRepoToEnable( const std::string & alias_r );
//@}
- /** \name Set of catalogs (repository aliases) to disable on next refresh.
+ /** \name 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.
*/
//@{
- /** Container of catalogs. */
- typedef std::set<std::string> CatalogsToDisable;
- bool catalogsToDisableEmpty() const;
- CatalogsToDisable::size_type catalogsToDisableSize() const;
- CatalogsToDisable::const_iterator catalogsToDisableBegin() const;
- CatalogsToDisable::const_iterator catalogsToDisableEnd() const;
-
- /** Wheter \c alias_r is mentioned in CatalogsToDisable. */
- bool catalogToDisableFind( const std::string & alias_r ) const;
-
- /** Add \c alias_r to the set of CatalogsToDisable. */
- void addCatalogToDisable( const std::string & alias_r );
- /** Remove \c alias_r to the set of CatalogsToDisable. */
- void delCatalogToDisable( const std::string & alias_r );
+ /** Container of repos. */
+ typedef std::set<std::string> ReposToDisable;
+ bool reposToDisableEmpty() const;
+ ReposToDisable::size_type reposToDisableSize() const;
+ ReposToDisable::const_iterator reposToDisableBegin() const;
+ ReposToDisable::const_iterator reposToDisableEnd() const;
+
+ /** Wheter \c alias_r is mentioned in ReposToDisable. */
+ bool repoToDisableFind( const std::string & alias_r ) const;
+
+ /** Add \c alias_r to the set of ReposToDisable. */
+ void addRepoToDisable( const std::string & alias_r );
+ /** Remove \c alias_r to the set of ReposToDisable. */
+ void delRepoToDisable( const std::string & alias_r );
//@}
public:
service.setAutorefresh( str::strToTrue( it->second ) );
else if ( it->first == "type" )
service.setType( repo::ServiceType(it->second) );
- else if ( it->first == "catalogstoenable" )
+ else if ( it->first == "repostoenable" )
{
std::vector<std::string> aliases;
str::splitEscaped( it->second, std::back_inserter(aliases) );
for_( ait, aliases.begin(), aliases.end() )
{
- service.addCatalogToEnable( *ait );
+ service.addRepoToEnable( *ait );
+ }
+ }
+ else if ( it->first == "repostodisable" )
+ {
+ std::vector<std::string> aliases;
+ str::splitEscaped( it->second, std::back_inserter(aliases) );
+ for_( ait, aliases.begin(), aliases.end() )
+ {
+ service.addRepoToDisable( *ait );
}
}
else