Author: mvidner Date: Mon Jun 11 16:37:06 2007 New Revision: 5717 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5717&view=rev Log: Improved documentation. Renamed RepoInfo::urls to baseUrls. Modified: trunk/libzypp/zypp/RepoInfo.cc trunk/libzypp/zypp/RepoInfo.h trunk/libzypp/zypp/RepoManager.cc trunk/libzypp/zypp/RepoManager.h trunk/libzypp/zypp/Repository.h Modified: trunk/libzypp/zypp/RepoInfo.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=5717&r1=5716&r2=5717&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoInfo.cc (original) +++ trunk/libzypp/zypp/RepoInfo.cc Mon Jun 11 16:37:06 2007 @@ -44,7 +44,7 @@ boost::tribool autorefresh; repo::RepoType type; Url mirrorlist_url; - std::set<Url> urls; + std::set<Url> baseUrls; std::string alias; std::string name; @@ -111,7 +111,7 @@ RepoInfo & RepoInfo::addBaseUrl( const Url &url ) { - _pimpl->urls.insert(url); + _pimpl->baseUrls.insert(url); return *this; } @@ -151,20 +151,20 @@ Url RepoInfo::mirrorListUrl() const { return _pimpl->mirrorlist_url; } - std::set<Url> RepoInfo::urls() const - { return _pimpl->urls; } + std::set<Url> RepoInfo::baseUrls() const + { return _pimpl->baseUrls; } - RepoInfo::urls_const_iterator RepoInfo::urlsBegin() const - { return _pimpl->urls.begin(); } + RepoInfo::urls_const_iterator RepoInfo::baseUrlsBegin() const + { return _pimpl->baseUrls.begin(); } - RepoInfo::urls_const_iterator RepoInfo::urlsEnd() const - { return _pimpl->urls.end(); } + RepoInfo::urls_const_iterator RepoInfo::baseUrlsEnd() const + { return _pimpl->baseUrls.end(); } std::ostream & RepoInfo::dumpOn( std::ostream & str ) const { str << "--------------------------------------" << std::endl; str << "- alias : " << alias() << std::endl; - std::set<Url> url_set(urls()); + std::set<Url> url_set(baseUrls()); for ( std::set<Url>::const_iterator it = url_set.begin(); it != url_set.end(); ++it ) Modified: trunk/libzypp/zypp/RepoInfo.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.h?rev=5717&r1=5716&r2=5717&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoInfo.h (original) +++ trunk/libzypp/zypp/RepoInfo.h Mon Jun 11 16:37:06 2007 @@ -43,6 +43,7 @@ * This class tries to be compatible with the * concept of a .repo file used by YUM and * also available in the openSUSE build service. + * See <tt>man yum.conf</tt>. * * Example file * @@ -56,8 +57,8 @@ * enabled=1 * \endcode * - * \note A Repository info is a hint about how - * to create a repository. + * \note A RepoInfo is a hint about how + * to create a Repository. */ class RepoInfo { @@ -78,37 +79,31 @@ std::string alias() const; /** - * The base Url is the Url of the repository that generates - * the authoritative metadata this repository provides. - * - * For example for the url http://updates.novell.com/10.2 - * the base url is http://updates.novell.com/10.2. - * For the url http://host.com/mirror/update.novell.com/10.2 - * the base url is http://updates.novell.com/10.2 + * A Url under which the metadata are located, or a set of mirrors. * * This can't be empty in order the repository to be valid * unless the download of the mirror list succeeds and it * contains a valid url. */ - std::set<Url> urls() const; + std::set<Url> baseUrls() const; /** * Url of a file which contains a list of Urls * If empty, the base url will be used. */ - Url mirrorListUrl() const; + Url mirrorListUrl() const; typedef std::set<Url>::const_iterator urls_const_iterator; /** * iterator that points at begin of repository urls */ - urls_const_iterator urlsBegin() const; + urls_const_iterator baseUrlsBegin() const; /** * iterator that points at end of repository urls */ - urls_const_iterator urlsEnd() const; + urls_const_iterator baseUrlsEnd() const; /** * If enabled is false, then this repository must be ignored as if does Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=5717&r1=5716&r2=5717&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Mon Jun 11 16:37:06 2007 @@ -127,7 +127,7 @@ static void assert_urls( const RepoInfo &info ) { - if (info.urls().empty()) + if (info.baseUrls().empty()) ZYPP_THROW(RepoNoUrlException()); } @@ -220,7 +220,7 @@ assert_urls(info); // try urls one by one - for ( RepoInfo::urls_const_iterator it = info.urlsBegin(); it != info.urlsEnd(); ++it ) + for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin(); it != info.baseUrlsEnd(); ++it ) { Url url(*it); filesystem::TmpDir tmpdir; Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=5717&r1=5716&r2=5717&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Mon Jun 11 16:37:06 2007 @@ -70,7 +70,7 @@ std::list<RepoInfo> knownRepositories() const; /** - * \short Refresh local cache + * \short Refresh local raw cache * * Will try to download the metadata * Modified: trunk/libzypp/zypp/Repository.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?rev=5717&r1=5716&r2=5717&view=diff ============================================================================== --- trunk/libzypp/zypp/Repository.h (original) +++ trunk/libzypp/zypp/Repository.h Mon Jun 11 16:37:06 2007 @@ -31,7 +31,7 @@ public: /** Default ctor: noRepository. - * Real Repositorys are to be created via RepositoryFactory. + * \see RepoManager::createFromCache. */ Repository(); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org