12 #ifndef ZYPP_MEDIA_PROXYINFO_PROXYINFOIMPL_H
13 #define ZYPP_MEDIA_PROXYINFO_PROXYINFOIMPL_H
37 virtual bool enabled()
const = 0;
39 virtual std::string
proxy(
const Url & url_r)
const = 0;
54 if ( noproxy.size() == 1 && noproxy.front() ==
"*" )
62 for_( it, noproxy.begin(), noproxy.end() )
64 std::string pattern(
str::toLower( (*it)[0] ==
'.' ? it->c_str() + 1 : it->c_str() ) );
66 && ( host.size() == pattern.size()
67 || host[host.size()-pattern.size()-1] ==
'.' ) )
84 #endif // ZYPP_MEDIA_PROXYINFO_PROXYINFOIMPL_H
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
std::string toLower(const std::string &s)
Return lowercase version of s.
bool hasSuffix(const C_Str &str_r, const C_Str &suffix_r)
Return whether str_r has suffix suffix_r.