[zypp-commit] r11023 - in /trunk/libzypp/zypp: ServiceInfo.cc ServiceInfo.h parser/ServiceFileReader.cc
Author: jkupec Date: Fri Sep 12 01:38:07 2008 New Revision: 11023 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11023&view=rev Log: - s/Catalog/Repo/g - s/catalog/Repo/g Modified: trunk/libzypp/zypp/ServiceInfo.cc trunk/libzypp/zypp/ServiceInfo.h trunk/libzypp/zypp/parser/ServiceFileReader.cc Modified: trunk/libzypp/zypp/ServiceInfo.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ServiceInfo.cc?rev=11023&r1=11022&r2=11023&view=diff ============================================================================== --- trunk/libzypp/zypp/ServiceInfo.cc (original) +++ trunk/libzypp/zypp/ServiceInfo.cc Fri Sep 12 01:38:07 2008 @@ -45,14 +45,14 @@ // 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() @@ -121,48 +121,48 @@ 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 @@ -171,10 +171,10 @@ << "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; } Modified: trunk/libzypp/zypp/ServiceInfo.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ServiceInfo.h?rev=11023&r1=11022&r2=11023&view=diff ============================================================================== --- trunk/libzypp/zypp/ServiceInfo.h (original) +++ trunk/libzypp/zypp/ServiceInfo.h Fri Sep 12 01:38:07 2008 @@ -88,49 +88,49 @@ 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::setstd::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::setstd::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::setstd::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::setstd::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: Modified: trunk/libzypp/zypp/parser/ServiceFileReader.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/ServiceFileReader.cc?rev=11023&r1=11022&r2=11023&view=diff ============================================================================== --- trunk/libzypp/zypp/parser/ServiceFileReader.cc (original) +++ trunk/libzypp/zypp/parser/ServiceFileReader.cc Fri Sep 12 01:38:07 2008 @@ -70,13 +70,22 @@ 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::vectorstd::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::vectorstd::string aliases; + str::splitEscaped( it->second, std::back_inserter(aliases) ); + for_( ait, aliases.begin(), aliases.end() ) + { + service.addRepoToDisable( *ait ); } } else -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
jkupec@svn.opensuse.org