18 #include <zypp-core/fs/WatchFile> 21 #include <zypp-curl/proxyinfo/ProxyInfoLibproxy> 32 const char * val = getenv( _var.c_str() );
37 ::unsetenv( _var.c_str() );
50 setenv( _var.c_str(), _val.c_str(), 1 );
61 static pxProxyFactory * proxyFactory = 0;
68 MIL <<
"Build Libproxy Factory from /etc/sysconfig/proxy" << endl;
70 ::px_proxy_factory_free( proxyFactory );
72 TmpUnsetEnv envguard[]
__attribute__ ((__unused__)) = {
"KDE_FULL_SESSION",
"GNOME_DESKTOP_SESSION_ID",
"DESKTOP_SESSION" };
73 proxyFactory = ::px_proxy_factory_new();
75 else if ( ! proxyFactory )
77 MIL <<
"Build Libproxy Factory" << endl;
78 proxyFactory = ::px_proxy_factory_new();
84 ProxyInfoLibproxy::ProxyInfoLibproxy()
105 char **proxies = px_proxy_factory_get_proxies(
_factory,
106 (
char *)url_r.
asString(vopt).c_str());
114 for (
int i = 0; proxies[i]; i++) {
116 !strncmp(proxies[i],
"http://", 7))
126 std::string sresult = result;
static const ViewOption WITH_SCHEME
Option to include scheme name in the URL string.
static const ViewOption WITH_HOST
Option to include hostname in the URL string.
static const ViewOption WITH_PATH_NAME
Option to include path name in the URL string.
Url::asString() view options.
Remember a files attributes to detect content changes.
std::string asString() const
Returns a default string representation of the Url object.
static const ViewOption WITH_PORT
Option to include port number in the URL string.
Easy-to use interface to the ZYPP dependency resolver.