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