16#include <zypp-core/base/Logger.h>
17#include <zypp-core/base/String.h>
18#include <zypp-core/fs/WatchFile>
19#include <zypp-core/Pathname.h>
21#include <zypp-curl/proxyinfo/ProxyInfoLibproxy>
35 const char * val = getenv(
_var.c_str() );
40 ::unsetenv(
_var.c_str() );
48 setenv(
_var.c_str(),
_val.c_str(), 1 );
59 static pxProxyFactory * proxyFactory = 0;
66 MIL <<
"Build Libproxy Factory from /etc/sysconfig/proxy" << endl;
68 ::px_proxy_factory_free( proxyFactory );
70 TmpUnsetEnv envguard[] __attribute__ ((__unused__)) = {
"KDE_FULL_SESSION",
"GNOME_DESKTOP_SESSION_ID",
"DESKTOP_SESSION" };
71 proxyFactory = ::px_proxy_factory_new();
73 else if ( ! proxyFactory )
75 MIL <<
"Build Libproxy Factory" << endl;
76 proxyFactory = ::px_proxy_factory_new();
103 char **proxies = px_proxy_factory_get_proxies(
_factory,
104 (
char *)url_r.
asString(vopt).c_str());
112 for (
int i = 0; proxies[i]; i++) {
114 !strncmp(proxies[i],
"http://", 7))
124 std::string sresult = result;
RepoManager implementation.
std::string asString() const
Returns a default string representation of the Url object.
Remember a files attributes to detect content changes.
Easy-to use interface to the ZYPP dependency resolver.
Url::asString() view options.
static const ViewOption WITH_SCHEME
Option to include scheme name in the URL string.
static const ViewOption WITH_PORT
Option to include port number in the URL string.
static const ViewOption WITH_PATH_NAME
Option to include path name in the URL string.
static const ViewOption WITH_HOST
Option to include hostname in the URL string.