/* */ #ifndef _D_AUTH_CONFIG_FACTORY_H_ #define _D_AUTH_CONFIG_FACTORY_H_ #include "common.h" class Option; class Netrc; typedef SharedHandle NetrcHandle; class AuthConfig; typedef SharedHandle AuthConfigHandle; class Request; typedef SharedHandle RequestHandle; class AuthResolver; typedef SharedHandle AuthResolverHandle; class AuthConfigFactory { private: const Option* _option; NetrcHandle _netrc; AuthConfigHandle createAuthConfig(const string& user, const string& password) const; AuthResolverHandle createHttpAuthResolver() const; AuthResolverHandle createHttpProxyAuthResolver() const; AuthResolverHandle createFtpAuthResolver() const; public: AuthConfigFactory(const Option* option); ~AuthConfigFactory(); AuthConfigHandle createAuthConfig(const RequestHandle& request) const; AuthConfigHandle createAuthConfigForHttpProxy(const RequestHandle& request) const; void setNetrc(const NetrcHandle& netrc); }; typedef SharedHandle AuthConfigFactoryHandle; typedef SingletonHolder AuthConfigFactorySingleton; #endif // _D_AUTH_CONFIG_FACTORY_H_