summaryrefslogtreecommitdiff
path: root/src/NetrcAuthResolver.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 01:10:38 +0900
commit07d270c87e6f9184aea4ca17eb26e466712e8db2 (patch)
tree2dfbaa2e0d2ad0f38cb73098608f7d67a64320f8 /src/NetrcAuthResolver.cc
parent126a4bde612eb0e6c48cf2f13ebe3eac45cc71a8 (diff)
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
Diffstat (limited to 'src/NetrcAuthResolver.cc')
-rw-r--r--src/NetrcAuthResolver.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/NetrcAuthResolver.cc b/src/NetrcAuthResolver.cc
index ea6d298c..04fcc9c1 100644
--- a/src/NetrcAuthResolver.cc
+++ b/src/NetrcAuthResolver.cc
@@ -40,7 +40,7 @@ namespace aria2 {
NetrcAuthResolver::NetrcAuthResolver():ignoreDefault_(false) {}
-SharedHandle<AuthConfig>
+std::shared_ptr<AuthConfig>
NetrcAuthResolver::resolveAuthConfig(const std::string& hostname)
{
if(!getUserDefinedAuthConfig()) {
@@ -50,27 +50,27 @@ NetrcAuthResolver::resolveAuthConfig(const std::string& hostname)
}
}
-SharedHandle<AuthConfig>
+std::shared_ptr<AuthConfig>
NetrcAuthResolver::findNetrcAuthenticator(const std::string& hostname) const
{
if(!netrc_) {
return getDefaultAuthConfig();
} else {
- SharedHandle<Authenticator> auth = netrc_->findAuthenticator(hostname);
+ std::shared_ptr<Authenticator> auth = netrc_->findAuthenticator(hostname);
if(!auth) {
return getDefaultAuthConfig();
} else {
if(ignoreDefault_ && auth->getMachine().empty()) {
return getDefaultAuthConfig();
} else {
- return SharedHandle<AuthConfig>
+ return std::shared_ptr<AuthConfig>
(new AuthConfig(auth->getLogin(), auth->getPassword()));
}
}
}
}
-void NetrcAuthResolver::setNetrc(const SharedHandle<Netrc>& netrc)
+void NetrcAuthResolver::setNetrc(const std::shared_ptr<Netrc>& netrc)
{
netrc_ = netrc;
}