diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-14 07:17:55 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-14 07:17:55 +0000 |
| commit | 1372ac51ade17bc27126449bf29f99c6c2cf7703 (patch) | |
| tree | 974a54b86b20555c8822f651c7b3a53c0a072df3 /src/AuthConfig.cc | |
| parent | 93e5dbed325f29c1bf867a2847d3b839d545cfb2 (diff) | |
2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added .cc file for classes/structs that only provided by header
file. Defined non-POD classes' ctor, dtor in .cc file. Moved
implementation code in header file to .cc file for major
classes/strucsts.
Diffstat (limited to 'src/AuthConfig.cc')
| -rw-r--r-- | src/AuthConfig.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/AuthConfig.cc b/src/AuthConfig.cc index 27288705..ec80b99f 100644 --- a/src/AuthConfig.cc +++ b/src/AuthConfig.cc @@ -33,10 +33,27 @@ */ /* copyright --> */ #include "AuthConfig.h" + #include <ostream> +#include "a2functional.h" + namespace aria2 { +AuthConfig::AuthConfig() {} + +AuthConfig::AuthConfig(const std::string& user, const std::string& password) + : user_(user), + password_(password) +{} + +AuthConfig::~AuthConfig() {} + +std::string AuthConfig::getAuthText() const +{ + return strconcat(user_, ":", password_); +} + std::ostream& operator<<(std::ostream& o, const AuthConfigHandle& authConfig) { o << authConfig->getAuthText(); |
