libzypp  17.32.4
proxyinfo.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_CURL_PROXYINFO_H_INCLUDED
13 #define ZYPP_CURL_PROXYINFO_H_INCLUDED
14 
15 #include <string>
16 #include <list>
17 
19 
20 namespace zypp {
21 
22  class Url;
23 
24  namespace media {
25 
27  //
28  // CLASS NAME : ProxyInfo
29  class ProxyInfo
30  {
31  public:
32  using Ptr = intrusive_ptr<ProxyInfo>;
33  using constPtr = intrusive_ptr<ProxyInfo>;
34  using NoProxyList = std::list<std::string>;
35  using NoProxyIterator = std::list<std::string>::const_iterator;
36 
38  struct Impl;
39  using ImplPtr = shared_ptr<Impl>;
40 
42  ProxyInfo();
44  ProxyInfo( ProxyInfo::ImplPtr pimpl_r );
45 
46  bool enabled() const;
47  std::string proxy(const Url & url) const;
48  NoProxyList noProxy() const;
51 
53  bool useProxyFor( const Url & url_r ) const;
54 
55  private:
58  };
59 
60 
62 
63  } // namespace media
64 } // namespace zypp
65 
66 #endif // ZYPP_CURL_PROXYINFO_H_INCLUDED
ProxyInfo()
Default Ctor: guess the best available implementation.
Definition: proxyinfo.cc:29
constexpr std::string_view Url("url")
intrusive_ptr< ProxyInfo > constPtr
Definition: proxyinfo.h:33
shared_ptr< Impl > ImplPtr
Definition: proxyinfo.h:39
NoProxyList noProxy() const
Definition: proxyinfo.cc:47
std::list< std::string >::const_iterator NoProxyIterator
Definition: proxyinfo.h:35
bool useProxyFor(const Url &url_r) const
Return true if enabled and url_r does not match noProxy.
Definition: proxyinfo.cc:56
NoProxyIterator noProxyEnd() const
Definition: proxyinfo.cc:53
intrusive_ptr< ProxyInfo > Ptr
Definition: proxyinfo.h:32
RW_pointer< Impl > _pimpl
Pointer to implementation.
Definition: proxyinfo.h:57
std::string proxy(const Url &url) const
Definition: proxyinfo.cc:44
NoProxyIterator noProxyBegin() const
Definition: proxyinfo.cc:50
bool enabled() const
Definition: proxyinfo.cc:41
std::list< std::string > NoProxyList
Definition: proxyinfo.h:34
Easy-to use interface to the ZYPP dependency resolver.
Definition: Application.cc:19
Url manipulation class.
Definition: Url.h:91