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                                     const bool recursive)
00084   { _pimpl->releaseDir(dir_r, media_nr, recursive); }
00085 
00086   const 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   const bool Source_Ref::autorefresh() const
00099   { return _pimpl->autorefresh(); }
00100 
00101   void Source_Ref::setAutorefresh( const bool enable_r )
00102   { _pimpl->setAutorefresh( enable_r ); }
00103 
00104   void Source_Ref::refresh()
00105   { _pimpl->refresh() ; }
00106 
00107   void Source_Ref::storeMetadata(const Pathname & cache_dir_r)
00108   { _pimpl->storeMetadata(cache_dir_r); }
00109 
00110   string Source_Ref::alias (void) const
00111   { return _pimpl->alias(); }
00112 
00113   void Source_Ref::setAlias (const std::string & alias_r)
00114   { _pimpl->setAlias( alias_r ); }
00115 
00116   string Source_Ref::type (void) const
00117   { return _pimpl->type(); }
00118 
00119   string Source_Ref::id (void) const
00120   { return _pimpl->id(); }
00121 
00122   void Source_Ref::setId (const std::string id_r)
00123   { return _pimpl->setId (id_r); }
00124 
00125   string Source_Ref::zmdName (void) const
00126   { return _pimpl->zmdName(); }
00127 
00128   void Source_Ref::setZmdName (const std::string name_r)
00129   { return _pimpl->setZmdName( name_r ); }
00130 
00131   string Source_Ref::zmdDescription (void) const
00132   { return _pimpl->zmdDescription(); }
00133 
00134   void Source_Ref::setZmdDescription (const std::string desc_r)
00135   { return _pimpl->setZmdDescription( desc_r ); }
00136 
00137   unsigned Source_Ref::priority (void) const
00138   { return _pimpl->priority(); }
00139 
00140   void Source_Ref::setPriority (unsigned p)
00141   { return _pimpl->setPriority(p); }
00142 
00143   unsigned Source_Ref::priorityUnsubscribed (void) const
00144   { return _pimpl->priorityUnsubscribed(); }
00145 
00146   void Source_Ref::setPriorityUnsubscribed (unsigned p)
00147   { return _pimpl->setPriorityUnsubscribed( p ); }
00148 
00149   bool Source_Ref::subscribed(void) const
00150   { return _pimpl->subscribed(); }
00151 
00152   void Source_Ref::setSubscribed (bool s)
00153   { return _pimpl->setSubscribed( s ); }
00154 
00155   Url Source_Ref::url (void) const
00156   { return _pimpl->url (); }
00157 
00158   void Source_Ref::setUrl( const Url & url )
00159   { _pimpl->setUrl( url ); }
00160 
00161   bool Source_Ref::remote (void) const
00162   { return _pimpl->remote (); }
00163 
00164   const Pathname & Source_Ref::path (void) const
00165   { return _pimpl->path (); }
00166 
00167   const bool Source_Ref::baseSource() const
00168   { return _pimpl->baseSource(); }
00169 
00170   const Pathname & Source_Ref::cacheDir (void) const
00171   { return _pimpl->cacheDir (); }
00172 
00173   void Source_Ref::changeMedia(const media::MediaId & media_r, const Pathname & path_r)
00174   { _pimpl->changeMedia(media_r, path_r); }
00175 
00176   void Source_Ref::redirect(unsigned media_nr, const Url & new_url)
00177   { _pimpl->redirect(media_nr, new_url); }
00178 
00179   void Source_Ref::release()
00180   { _pimpl->release(); }
00181 
00182   void Source_Ref::reattach(const Pathname &attach_point)
00183   { _pimpl->reattach(attach_point); }
00184 
00185   media::MediaVerifierRef Source_Ref::verifier(unsigned media_nr)
00186   { return _pimpl->verifier(media_nr); }
00187 
00188   unsigned Source_Ref::numberOfMedia(void) const
00189   { return _pimpl->numberOfMedia(); }
00190 
00191   std::string Source_Ref::vendor (void) const
00192   { return _pimpl->vendor(); }
00193 
00194   const std::list<Pathname> Source_Ref::publicKeys()
00195   { return _pimpl->publicKeys(); }
00196 
00197   std::string Source_Ref::unique_id (void) const
00198   { return _pimpl->unique_id(); }
00199 
00200   /******************************************************************
00201    **
00202    **   FUNCTION NAME : operator<<
00203    **   FUNCTION TYPE : std::ostream &
00204   */
00205   std::ostream & operator<<( std::ostream & str, const Source_Ref & obj )
00206   {
00207     return str << *obj._pimpl;
00208   }
00209 
00211 } // namespace zypp

Generated on Thu Jul 6 00:07:23 2006 for zypp by  doxygen 1.4.6