RepoInfo.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP2_REPOSITORYINFO_H
00013 #define ZYPP2_REPOSITORYINFO_H
00014 
00015 #include <iosfwd>
00016 #include <list>
00017 #include <set>
00018 #include "zypp/base/PtrTypes.h"
00019 #include "zypp/base/Iterator.h"
00020 #include "zypp/base/Deprecated.h"
00021 
00022 #include "zypp/Pathname.h"
00023 #include "zypp/Url.h"
00024 #include "zypp/repo/RepoType.h"
00025 #include "zypp/repo/RepoVariables.h"
00026 
00028 namespace zypp
00029 { 
00030 
00032   //
00033   //    CLASS NAME : RepoInfo
00034   //
00064   class RepoInfo
00065   {
00066     friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
00067 
00068     public:
00069     RepoInfo();
00070     ~RepoInfo();
00071 
00072     typedef unsigned long NumericId;
00073 
00081     std::string alias() const;
00082 
00092     ZYPP_DEPRECATED std::set<Url> baseUrls() const;
00093 
00112     Pathname path() const;
00113 
00118     Url mirrorListUrl() const;
00119     
00120     typedef std::set<Url> url_set;
00121     //typedef url_set::const_iterator urls_const_iterator;
00122     typedef url_set::size_type      urls_size_type;
00123     typedef transform_iterator<repo::RepoVariablesUrlReplacer, url_set::const_iterator> urls_const_iterator;
00124     
00128     urls_const_iterator baseUrlsBegin() const;
00129 
00133     urls_const_iterator baseUrlsEnd() const;
00134 
00138     urls_size_type baseUrlsSize() const;
00139 
00143     bool baseUrlsEmpty() const;
00144 
00149     bool enabled() const;
00150 
00155     bool autorefresh() const;
00156 
00161     repo::RepoType type() const;
00162 
00170     std::string name() const;
00171 
00178      Pathname filepath() const;
00179 
00186      Pathname metadataPath() const;
00187 
00195     bool gpgCheck() const;
00196 
00206      Url gpgKeyUrl() const;
00207 
00215     RepoInfo & addBaseUrl( const Url &url );
00216 
00220     RepoInfo & setBaseUrl( const Url &url );
00221 
00226     RepoInfo & setPath( const Pathname &path );
00227 
00232     RepoInfo & setMirrorListUrl( const Url &url );
00233 
00238     RepoInfo & setEnabled( bool enabled );
00239 
00244     RepoInfo & setAutorefresh( bool autorefresh );
00245 
00250     RepoInfo & setAlias( const std::string &alias );
00251 
00256     RepoInfo & setType( const repo::RepoType &t );
00257 
00262     RepoInfo & setName( const std::string &name );
00263 
00272     RepoInfo & setFilepath( const Pathname &filename );
00273 
00282     RepoInfo & setMetadataPath( const Pathname &path );
00283 
00293     RepoInfo & setGpgCheck( bool check );
00294 
00304     RepoInfo & setGpgKeyUrl( const Url &gpgkey );
00305 
00310     std::ostream & dumpOn( std::ostream & str ) const;
00311 
00315     std::ostream & dumpRepoOn( std::ostream & str ) const;
00316 
00317     class Impl;
00318   private:
00320     RWCOW_pointer<Impl> _pimpl;
00321   };
00323 
00325   std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
00326 
00327   typedef std::list<RepoInfo> RepoInfoList;
00328 
00330 } // namespace zypp
00332 #endif // ZYPP2_REPOSITORYINFO_H

Generated on Tue Sep 25 19:23:06 2007 for libzypp by  doxygen 1.5.3