/* */ #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 ~NetrcAuthResolver() {} virtual SharedHandle resolveAuthConfig(const std::string& hostname); void setNetrc(const SharedHandle& netrc); SharedHandle getNetrc() const; // 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_