/* */ #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