/* */ #ifndef D_NETRC_AUTH_RESOLVER_H #define D_NETRC_AUTH_RESOLVER_H #include "AbstractAuthResolver.h" namespace aria2 { class Netrc; class NetrcAuthResolver : public AbstractAuthResolver { private: Netrc* netrc_; bool ignoreDefault_; std::unique_ptr findNetrcAuthenticator(const std::string& hostname) const; public: NetrcAuthResolver(); virtual std::unique_ptr resolveAuthConfig(const std::string& hostname) CXX11_OVERRIDE; void setNetrc(Netrc* netrc); // Ignores default token of netrc void ignoreDefault(); // Uses default token of netrc void useDefault(); }; } // namespace aria2 #endif // D_NETRC_AUTH_RESOLVER_H