libzypp  10.5.0
ProxyInfoSysconfig.h
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_PROXYINFO_PROXYINFOSYSCONFIG_H
00013 #define ZYPP_MEDIA_PROXYINFO_PROXYINFOSYSCONFIG_H
00014 
00015 #include <string>
00016 #include <map>
00017 
00018 #include "zypp/base/Sysconfig.h"
00019 #include "zypp/base/DefaultIntegral.h"
00020 #include "zypp/media/ProxyInfo.h"
00021 #include "zypp/media/proxyinfo/ProxyInfoImpl.h"
00022 
00023 namespace zypp {
00024   namespace media {
00025 
00026 
00027     class ProxyInfoSysconfig : public ProxyInfo::Impl
00028     {
00029     public:
00030       ProxyInfoSysconfig(const Pathname & path);
00032       bool enabled() const
00033       { return _enabled; }
00035       std::string proxy(const Url & url_r) const;
00037       ProxyInfo::NoProxyList noProxy() const
00038       { return _no_proxy; }
00040       virtual ProxyInfo::NoProxyIterator noProxyBegin() const;
00042       virtual ProxyInfo::NoProxyIterator noProxyEnd() const;
00043     private:
00044       DefaultIntegral<bool,false> _enabled;
00045       ProxyInfo::NoProxyList _no_proxy;
00046       std::map<std::string,std::string> _proxies;
00047     };
00048 
00050 
00051   } // namespace media
00052 } // namespace zypp
00053 
00054 #endif // ZYPP_MEDIA_PROXYINFO_PROXYINFOSYSCONFIG_H