Author: mlandres Date: Thu Nov 6 22:42:29 2008 New Revision: 11614 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11614&view=rev Log: Added RepoManager convenience methods taking alias from RepoInfo. Modified: trunk/libzypp/zypp/RepoManager.h Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=11614&r1=11613&r2=11614&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Thu Nov 6 22:42:29 2008 @@ -163,9 +163,15 @@ /** Find RepoInfo by alias or return \ref RepoInfo::noRepo. */ RepoInfo getRepo( const std::string & alias ) const; + /** \overload Take alias from RepoInfo. */ + RepoInfo getRepo( const RepoInfo & info_r ) const + { return getRepo( info_r.alias() ); } /** Return whether there is a known repository for \c alias. */ bool hasRepo( const std::string & alias ) const; + /** \overload Take alias from RepoInfo. */ + bool hasRepo( const RepoInfo & info_r ) const + { return hasRepo( info_r.alias() ); } //@} /** @@ -425,6 +431,10 @@ void modifyRepository( const std::string &alias, const RepoInfo & newinfo, const ProgressData::ReceiverFnc & progressrcv = ProgressData::ReceiverFnc() ); + /** \overload Take alias from RepoInfo. */ + void modifyRepository( const RepoInfo & newinfo, + const ProgressData::ReceiverFnc & progressrcv = ProgressData::ReceiverFnc() ) + { modifyRepository( newinfo.alias(), newinfo, progressrcv ); } /** * \short Find a matching repository info -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org