libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
proxyinfo
ProxyInfoImpl.h
ProxyInfoLibproxy.cc
ProxyInfoLibproxy.h
ProxyInfos.h
ProxyInfoSysconfig.cc
ProxyInfoSysconfig.h
CredentialFileReader.cc
CredentialFileReader.h
CredentialManager.cc
CredentialManager.h
CurlConfig.cc
CurlConfig.h
MediaAccess.cc
MediaAccess.h
MediaAria2c.cc
MediaAria2c.h
MediaBlockList.cc
MediaBlockList.h
MediaCD.cc
MediaCD.h
MediaCIFS.cc
MediaCIFS.h
MediaCurl.cc
MediaCurl.h
MediaDIR.cc
MediaDIR.h
MediaDISK.cc
MediaDISK.h
MediaException.cc
MediaException.h
MediaHandler.cc
MediaHandler.h
MediaISO.cc
MediaISO.h
MediaManager.cc
MediaManager.h
MediaMultiCurl.cc
MediaMultiCurl.h
MediaNFS.cc
MediaNFS.h
MediaPlugin.cc
MediaPlugin.h
MediaPriority.cc
MediaPriority.h
MediaSource.cc
MediaSource.h
MediaUserAuth.cc
MediaUserAuth.h
MetaLinkParser.cc
MetaLinkParser.h
Mount.cc
Mount.h
ProxyInfo.cc
ProxyInfo.h
TransferSettings.cc
TransferSettings.h
UrlResolverPlugin.cc
UrlResolverPlugin.h
ZsyncParser.cc
ZsyncParser.h
misc
parser
pool
repo
sat
solver
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
ProxyInfoSysconfig.cc
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
13
#include <iostream>
14
#include <fstream>
15
16
#include "
zypp/base/Logger.h
"
17
#include "
zypp/base/String.h
"
18
#include "
zypp/Pathname.h
"
19
20
#include "
zypp/media/proxyinfo/ProxyInfoSysconfig.h
"
21
22
using namespace
std;
23
using namespace
zypp::base;
24
25
namespace
zypp {
26
namespace
media {
27
28
ProxyInfoSysconfig::ProxyInfoSysconfig(
const
Pathname & path)
29
:
ProxyInfo
::Impl()
30
{
31
map<string,string>
data =
sysconfig::read
(
32
path.relative()
33
?
"/etc/sysconfig"
+ path
34
: path);
35
map<string,string>::const_iterator
it = data.find(
"PROXY_ENABLED"
);
36
if
(it != data.end())
37
_enabled
= it->second !=
"no"
;
38
it = data.find(
"HTTP_PROXY"
);
39
if
(it != data.end())
40
_proxies
[
"http"
] = it->second;
41
it = data.find(
"HTTPS_PROXY"
);
42
if
(it != data.end())
43
_proxies
[
"https"
] = it->second;
44
it = data.find(
"FTP_PROXY"
);
45
if
(it != data.end())
46
_proxies
[
"ftp"
] = it->second;
47
it = data.find(
"NO_PROXY"
);
48
if
(it != data.end())
49
str::split
(it->second, std::back_inserter(
_no_proxy
),
", \t"
);
50
}
51
52
std::string
ProxyInfoSysconfig::proxy
(
const
Url
& url_r)
const
53
{
54
map<string,string>::const_iterator
it =
_proxies
.find(url_r.
getScheme
());
55
if
(it !=
_proxies
.end())
56
return
it->second;
57
return
""
;
58
}
59
60
ProxyInfo::NoProxyIterator
ProxyInfoSysconfig::noProxyBegin
()
const
61
{
return
_no_proxy
.begin(); }
62
63
ProxyInfo::NoProxyIterator
ProxyInfoSysconfig::noProxyEnd
()
const
64
{
return
_no_proxy
.end(); }
65
66
}
// namespace media
67
}
// namespace zypp
zypp
media
proxyinfo
ProxyInfoSysconfig.cc
Generated by
1.8.1