summaryrefslogtreecommitdiff
path: root/src/AuthConfigFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-14 14:40:38 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-14 14:40:38 +0000
commitcded0f581114770d4fafa9da68d02b8772ec5267 (patch)
tree5077d37a18dd4799e9dab4dcd14b55db6820bdce /src/AuthConfigFactory.cc
parent12b880a72463dc55a69fb5db1a957a26a734eed9 (diff)
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined default ftp user and password as static const std::string * src/AuthConfigFactory.cc * src/AuthConfigFactory.h
Diffstat (limited to 'src/AuthConfigFactory.cc')
-rw-r--r--src/AuthConfigFactory.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/AuthConfigFactory.cc b/src/AuthConfigFactory.cc
index 7be0e1ae..9291e442 100644
--- a/src/AuthConfigFactory.cc
+++ b/src/AuthConfigFactory.cc
@@ -43,6 +43,10 @@
namespace aria2 {
+const std::string AuthConfigFactory::ANONYMOUS("anonymous");
+
+const std::string AuthConfigFactory::ARIA2USER_AT("ARIA2USER@");
+
AuthConfigFactory::AuthConfigFactory(const Option* option):
_option(option) {}
@@ -106,7 +110,9 @@ AuthResolverHandle AuthConfigFactory::createFtpAuthResolver() const
resolver = authResolver;
}
resolver->setUserDefinedAuthConfig(createAuthConfig(_option->get(PREF_FTP_USER), _option->get(PREF_FTP_PASSWD)));
- SharedHandle<AuthConfig> defaultAuthConfig(new AuthConfig("anonymous", "ARIA2USER@"));
+ SharedHandle<AuthConfig> defaultAuthConfig
+ (new AuthConfig(AuthConfigFactory::ANONYMOUS,
+ AuthConfigFactory::ARIA2USER_AT));
resolver->setDefaultAuthConfig(defaultAuthConfig);
return resolver;
}