libzypp: zypp/media/ProxyInfo.cc Source File

libzypp 17.25.10

ProxyInfo.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
13 #include <iostream>
14
15 #include <zypp/base/Logger.h>
16
17 #include <zypp/media/ProxyInfo.h>
18 #include <zypp/media/proxyinfo/ProxyInfoImpl.h>
19 #include <zypp/media/proxyinfo/ProxyInfos.h>
20
21 using namespace zypp::base;
22
23 namespace zypp {
24 namespace media {
25
26 shared_ptr<ProxyInfo::Impl> ProxyInfo::Impl::_nullimpl;
27
28 ProxyInfo::ProxyInfo()
29 #ifdef WITH_LIBPROXY_SUPPORT
30 : _pimpl( new ProxyInfoLibproxy() )
31 #else
32 : _pimpl( new ProxyInfoSysconfig("proxy") )
33 #endif
34 {}
35
36 ProxyInfo::ProxyInfo(ProxyInfo::ImplPtr pimpl_r)
37 : _pimpl(pimpl_r)
38 {}
39
40 bool ProxyInfo::enabled() const
41 { return _pimpl->enabled(); }
42
43 std::string ProxyInfo::proxy(const Url & url_r) const
44 { return _pimpl->proxy(url_r); }
45
46 ProxyInfo::NoProxyList ProxyInfo::noProxy() const
47 { return _pimpl->noProxy(); }
48
49 ProxyInfo::NoProxyIterator ProxyInfo::noProxyBegin() const
50 { return _pimpl->noProxyBegin(); }
51
52 ProxyInfo::NoProxyIterator ProxyInfo::noProxyEnd() const
53 { return _pimpl->noProxyEnd(); }
54
55 bool ProxyInfo::useProxyFor( const Url & url_r ) const
56 { return _pimpl->useProxyFor( url_r ); }
57
58 } // namespace media
59 } // namespace zypp
Logger.h
ProxyInfoImpl.h
ProxyInfo.h
ProxyInfos.h
zypp::Url
Url manipulation class.
Definition: Url.h:92
zypp::media::ProxyInfoLibproxy
Definition: ProxyInfoLibproxy.h:29
zypp::media::ProxyInfoSysconfig
Definition: ProxyInfoSysconfig.h:28
zypp::media::ProxyInfo::noProxy
NoProxyList noProxy() const
Definition: ProxyInfo.cc:46
zypp::media::ProxyInfo::useProxyFor
bool useProxyFor(const Url &url_r) const
Return true if enabled and url_r does not match noProxy.
Definition: ProxyInfo.cc:55
zypp::media::ProxyInfo::proxy
std::string proxy(const Url &url) const
Definition: ProxyInfo.cc:43
zypp::media::ProxyInfo::NoProxyList
std::list< std::string > NoProxyList
Definition: ProxyInfo.h:34
zypp::media::ProxyInfo::_pimpl
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: ProxyInfo.h:57
zypp::media::ProxyInfo::NoProxyIterator
std::list< std::string >::const_iterator NoProxyIterator
Definition: ProxyInfo.h:35
zypp::media::ProxyInfo::ImplPtr
shared_ptr< Impl > ImplPtr
Definition: ProxyInfo.h:38
zypp::media::ProxyInfo::noProxyEnd
NoProxyIterator noProxyEnd() const
Definition: ProxyInfo.cc:52
zypp::media::ProxyInfo::ProxyInfo
ProxyInfo()
Default Ctor: guess the best available implementation.
Definition: ProxyInfo.cc:28
zypp::media::ProxyInfo::enabled
bool enabled() const
Definition: ProxyInfo.cc:40
zypp::media::ProxyInfo::noProxyBegin
NoProxyIterator noProxyBegin() const
Definition: ProxyInfo.cc:49
zypp::base
Definition: DrunkenBishop.cc:25
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
zypp::media::ProxyInfo::Impl::_nullimpl
static shared_ptr< Impl > _nullimpl
Default Impl: empty sets.
Definition: ProxyInfoImpl.h:75