libzypp 17.37.17
proxyinfolibproxy.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_MEDIA_PROXYINFO_PROXYINFOLIBPROXY_H
13#define ZYPP_MEDIA_PROXYINFO_PROXYINFOLIBPROXY_H
14
15#include <string>
16
17#include <zypp-core/base/DefaultIntegral>
18#include <zypp-curl/ProxyInfo>
20
21extern "C" {
22 typedef struct _pxProxyFactory pxProxyFactoryType;
23}
24
25namespace zypp {
26 namespace media {
27
28 template <typename ProxyFactoryType>
29 using CreateFactorySig = ProxyFactoryType *(*) (void);
30
31 template <typename ProxyFactoryType>
32 using DelFactorySig = void (*) (ProxyFactoryType *self);
33
34 template <typename ProxyFactoryType>
35 using GetProxiesSig = char **(*) (ProxyFactoryType *self, const char *url);
36
37 using FreeProxiesCb = void (*) (char **proxies);
38
40 {
41 public:
44 ~ProxyInfoLibproxy() override;
45
46 static bool isAvailabe();
47
49 bool enabled() const override
50 { return _enabled; }
51
52 std::string proxy(const Url & url_r) const override;
55 { return _no_proxy; }
56
60 private:
64 };
65
67
68 } // namespace media
69} // namespace zypp
70
71#endif // ZYPP_MEDIA_PROXYINFO_PROXYINFOLIBPROXY_H
Integral type with defined initial value when default constructed.
Url manipulation class.
Definition Url.h:93
DefaultIntegral< bool, false > _enabled
ProxyInfo::NoProxyIterator noProxyBegin() const override
ProxyInfo::NoProxyList noProxy() const override
std::string proxy(const Url &url_r) const override
ProxyInfo::NoProxyIterator noProxyEnd() const override
ProxyInfo::NoProxyList _no_proxy
std::list< std::string > NoProxyList
Definition proxyinfo.h:34
std::list< std::string >::const_iterator NoProxyIterator
Definition proxyinfo.h:35
char **(*)(ProxyFactoryType *self, const char *url) GetProxiesSig
void(*)(ProxyFactoryType *self) DelFactorySig
void(*)(char **proxies) FreeProxiesCb
ProxyFactoryType *(*)(void) CreateFactorySig
Url details namespace.
Definition UrlBase.cc:58
Easy-to use interface to the ZYPP dependency resolver.
struct _pxProxyFactory pxProxyFactoryType