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