summaryrefslogtreecommitdiff
path: root/src/NetrcAuthResolver.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
commitc342bde9627b434effbc0cd10b817670d1da0923 (patch)
tree60d14bf448066b8dcd639adfa0db716d5a8258c8 /src/NetrcAuthResolver.cc
parent135f0a2a8c4ee04a5e96d84ba558245fabfc1f5c (diff)
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for mostly read-only purpose.
Diffstat (limited to 'src/NetrcAuthResolver.cc')
-rw-r--r--src/NetrcAuthResolver.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/NetrcAuthResolver.cc b/src/NetrcAuthResolver.cc
index 110c64be..2a3fbae4 100644
--- a/src/NetrcAuthResolver.cc
+++ b/src/NetrcAuthResolver.cc
@@ -40,7 +40,8 @@ namespace aria2 {
NetrcAuthResolver::NetrcAuthResolver():_ignoreDefault(false) {}
-AuthConfigHandle NetrcAuthResolver::resolveAuthConfig(const std::string& hostname)
+SharedHandle<AuthConfig>
+NetrcAuthResolver::resolveAuthConfig(const std::string& hostname)
{
if(_userDefinedAuthConfig.isNull()) {
return findNetrcAuthenticator(hostname);
@@ -49,12 +50,13 @@ AuthConfigHandle NetrcAuthResolver::resolveAuthConfig(const std::string& hostnam
}
}
-AuthConfigHandle NetrcAuthResolver::findNetrcAuthenticator(const std::string& hostname) const
+SharedHandle<AuthConfig>
+NetrcAuthResolver::findNetrcAuthenticator(const std::string& hostname) const
{
if(_netrc.isNull()) {
return _defaultAuthConfig;
} else {
- AuthenticatorHandle auth = _netrc->findAuthenticator(hostname);
+ SharedHandle<Authenticator> auth = _netrc->findAuthenticator(hostname);
if(auth.isNull()) {
return _defaultAuthConfig;
} else {
@@ -68,7 +70,7 @@ AuthConfigHandle NetrcAuthResolver::findNetrcAuthenticator(const std::string& ho
}
}
-void NetrcAuthResolver::setNetrc(const NetrcHandle& netrc)
+void NetrcAuthResolver::setNetrc(const SharedHandle<Netrc>& netrc)
{
_netrc = netrc;
}