libzypp  10.5.0
ProxyInfo.cc
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00013 #include <iostream>
00014 
00015 #include "zypp/base/Logger.h"
00016 
00017 #include "zypp/media/ProxyInfo.h"
00018 #include "zypp/media/proxyinfo/ProxyInfoImpl.h"
00019 #include "zypp/media/proxyinfo/ProxyInfos.h"
00020 
00021 using namespace std;
00022 using namespace zypp::base;
00023 
00024 namespace zypp {
00025   namespace media {
00026 
00027     shared_ptr<ProxyInfo::Impl> ProxyInfo::Impl::_nullimpl;
00028 
00029     ProxyInfo::ProxyInfo()
00030 #ifdef _WITH_LIBPROXY_SUPPORT_
00031     : _pimpl( new ProxyInfoLibproxy() )
00032 #else
00033     : _pimpl( new ProxyInfoSysconfig("proxy") )
00034 #endif
00035     {}
00036 
00037     ProxyInfo::ProxyInfo(ProxyInfo::ImplPtr pimpl_r)
00038     : _pimpl(pimpl_r)
00039     {}
00040 
00041     bool ProxyInfo::enabled() const
00042     { return _pimpl->enabled(); }
00043 
00044     std::string ProxyInfo::proxy(const Url & url_r) const
00045     { return _pimpl->proxy(url_r); }
00046 
00047     ProxyInfo::NoProxyList ProxyInfo::noProxy() const
00048     { return _pimpl->noProxy(); }
00049 
00050     ProxyInfo::NoProxyIterator ProxyInfo::noProxyBegin() const
00051     { return _pimpl->noProxyBegin(); }
00052 
00053     ProxyInfo::NoProxyIterator ProxyInfo::noProxyEnd() const
00054     { return _pimpl->noProxyEnd(); }
00055 
00056     bool ProxyInfo::useProxyFor( const Url & url_r ) const
00057     { return _pimpl->useProxyFor( url_r ); }
00058 
00059   } // namespace media
00060 } // namespace zypp