Source.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include <cassert>
00013 
00014 #include <iostream>
00015 
00016 #include "zypp/Source.h"
00017 #include "zypp/source/SourceImpl.h"
00018 #include "zypp/SourceFactory.h"
00019 
00020 using namespace std;
00021 
00023 namespace zypp
00024 { 
00025 
00026   const Source_Ref Source_Ref::noSource;
00027 
00029   //
00030   //    METHOD NAME : Source_Ref::Source_Ref
00031   //    METHOD TYPE : Ctor
00032   //
00033   Source_Ref::Source_Ref()
00034   : _pimpl( Impl::nullimpl() )
00035   {}
00036 
00038   //
00039   //    METHOD NAME : Source_Ref::Source_Ref
00040   //    METHOD TYPE : Ctor
00041   //
00042   Source_Ref::Source_Ref( const Impl_Ptr & impl_r )
00043   : _pimpl( impl_r )
00044   {
00045     assert( impl_r );
00046   }
00047 
00049   //
00050   //    Forward to SourceImpl:
00051   //
00053 
00054   Source_Ref::NumericId Source_Ref::numericId() const
00055   { return _pimpl->numericId(); }
00056 
00057   bool Source_Ref::resStoreInitialized() const
00058   { return _pimpl->resStoreInitialized(); }
00059 
00060   const ResStore & Source_Ref::resolvables() const
00061   { return _pimpl->resolvables(); }
00062 
00063   const ResStore Source_Ref::resolvables(zypp::Resolvable::Kind kind) const
00064   { return _pimpl->resolvables(kind); }
00065 
00066   const Pathname Source_Ref::provideFile(const Pathname & file_r,
00067                                      const unsigned media_nr)
00068   { return _pimpl->provideFile(file_r, media_nr); }
00069 
00070   const Pathname Source_Ref::provideDirTree(const Pathname & dir_r,
00071                                             const unsigned media_nr)                                              
00072   { return _pimpl->provideDirTree(dir_r, media_nr); }
00073 
00074   const Pathname Source_Ref::providePackage( Package::constPtr package )
00075   { return _pimpl->providePackage( package ); }
00076   
00077   const void Source_Ref::releaseFile(const Pathname & file_r,
00078                                      const unsigned media_nr)
00079   { _pimpl->releaseFile(file_r, media_nr); }
00080 
00081   const void Source_Ref::releaseDir(const Pathname & dir_r,
00082                                     const unsigned media_nr,
00083                                     bool recursive)
00084   { _pimpl->releaseDir(dir_r, media_nr, recursive); }
00085 
00086   bool Source_Ref::enabled() const
00087   { return _pimpl->enabled(); }
00088 
00089   void Source_Ref::enable()
00090   { _pimpl->enable(); }
00091 
00092   void Source_Ref::disable()
00093   { _pimpl->disable(); }
00094 
00095   Date Source_Ref::timestamp() const
00096   { return _pimpl->timestamp(); }
00097   
00098   std::string Source_Ref::checksum() const
00099   { return _pimpl->checksum(); }
00100   
00101   bool Source_Ref::autorefresh() const
00102   { return _pimpl->autorefresh(); }
00103 
00104   void Source_Ref::setAutorefresh( bool enable_r )
00105   { _pimpl->setAutorefresh( enable_r ); }
00106 
00107   void Source_Ref::refresh()
00108   { _pimpl->refresh() ; }
00109 
00110   void Source_Ref::storeMetadata(const Pathname & cache_dir_r)
00111   { _pimpl->storeMetadata(cache_dir_r); }
00112 
00113   string Source_Ref::alias (void) const
00114   { return _pimpl->alias(); }
00115 
00116   void Source_Ref::setAlias (const std::string & alias_r)
00117   { _pimpl->setAlias( alias_r ); }
00118 
00119   string Source_Ref::type (void) const
00120   { return _pimpl->type(); }
00121 
00122   string Source_Ref::id (void) const
00123   { return _pimpl->id(); }
00124 
00125   void Source_Ref::setId (const std::string id_r)
00126   { return _pimpl->setId (id_r); }
00127 
00128   string Source_Ref::zmdName (void) const
00129   { return _pimpl->zmdName(); }
00130 
00131   void Source_Ref::setZmdName (const std::string name_r)
00132   { return _pimpl->setZmdName( name_r ); }
00133 
00134   string Source_Ref::zmdDescription (void) const
00135   { return _pimpl->zmdDescription(); }
00136 
00137   void Source_Ref::setZmdDescription (const std::string desc_r)
00138   { return _pimpl->setZmdDescription( desc_r ); }
00139 
00140   unsigned Source_Ref::priority (void) const
00141   { return _pimpl->priority(); }
00142 
00143   void Source_Ref::setPriority (unsigned p)
00144   { return _pimpl->setPriority(p); }
00145 
00146   unsigned Source_Ref::priorityUnsubscribed (void) const
00147   { return _pimpl->priorityUnsubscribed(); }
00148 
00149   void Source_Ref::setPriorityUnsubscribed (unsigned p)
00150   { return _pimpl->setPriorityUnsubscribed( p ); }
00151 
00152   bool Source_Ref::subscribed(void) const
00153   { return _pimpl->subscribed(); }
00154 
00155   void Source_Ref::setSubscribed (bool s)
00156   { return _pimpl->setSubscribed( s ); }
00157 
00158   Url Source_Ref::url (void) const
00159   { return _pimpl->url (); }
00160 
00161   void Source_Ref::setUrl( const Url & url )
00162   { _pimpl->setUrl( url ); }
00163 
00164   bool Source_Ref::remote (void) const
00165   { return _pimpl->remote (); }
00166 
00167   const Pathname & Source_Ref::path (void) const
00168   { return _pimpl->path (); }
00169 
00170   bool Source_Ref::baseSource() const
00171   { return _pimpl->baseSource(); }
00172 
00173   const Pathname & Source_Ref::cacheDir (void) const
00174   { return _pimpl->cacheDir (); }
00175 
00176   void Source_Ref::changeMedia(const media::MediaId & media_r, const Pathname & path_r)
00177   { _pimpl->changeMedia(media_r, path_r); }
00178 
00179   void Source_Ref::redirect(unsigned media_nr, const Url & new_url)
00180   { _pimpl->redirect(media_nr, new_url); }
00181 
00182   void Source_Ref::release()
00183   { _pimpl->release(); }
00184 
00185   void Source_Ref::reattach(const Pathname &attach_point)
00186   { _pimpl->reattach(attach_point); }
00187 
00188   media::MediaVerifierRef Source_Ref::verifier(unsigned media_nr)
00189   { return _pimpl->verifier(media_nr); }
00190 
00191   unsigned Source_Ref::numberOfMedia(void) const
00192   { return _pimpl->numberOfMedia(); }
00193 
00194   std::string Source_Ref::vendor (void) const
00195   { return _pimpl->vendor(); }
00196 
00197   const std::list<Pathname> Source_Ref::publicKeys()
00198   { return _pimpl->publicKeys(); }
00199 
00200   std::string Source_Ref::unique_id (void) const
00201   { return _pimpl->unique_id(); }
00202 
00203   bool Source_Ref::hasResolvablesOfKind( const zypp::Resolvable::Kind &kind ) const
00204   { return _pimpl->resolvableKinds().count(kind) != 0; }
00205   
00206   std::set<zypp::Resolvable::Kind> Source_Ref::resolvableKinds() const
00207   { return _pimpl->resolvableKinds(); }
00208   
00209   /******************************************************************
00210    **
00211    **   FUNCTION NAME : operator<<
00212    **   FUNCTION TYPE : std::ostream &
00213   */
00214   std::ostream & operator<<( std::ostream & str, const Source_Ref & obj )
00215   {
00216     return str << *obj._pimpl;
00217   }
00218 
00220 } // namespace zypp

Generated on Tue Nov 28 16:49:32 2006 for zypp by  doxygen 1.5.0