/* */ #ifndef _D_AUTH_CONFIG_H_ #define _D_AUTH_CONFIG_H_ #include "common.h" #include #include #include "SharedHandle.h" #include "a2functional.h" namespace aria2 { class AuthConfig { private: std::string _authScheme; std::string _user; std::string _password; public: AuthConfig() {} AuthConfig(const std::string& user, const std::string& password): _user(user), _password(password) {} std::string getAuthText() const { return strconcat(_user, ":", _password); } const std::string& getUser() const { return _user; } const std::string& getPassword() const { return _password; } }; typedef SharedHandle AuthConfigHandle; std::ostream& operator<<(std::ostream& o, const AuthConfigHandle& authConfig); } // namespace aria2 #endif // _D_AUTH_CONFIG_H_