From 4c0011840983e7562e838e6492663114eff10c14 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 19 Mar 2007 17:03:15 +0000 Subject: [PATCH] Removed. --- src/AuthConfig.h | 106 ----------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/AuthConfig.h diff --git a/src/AuthConfig.h b/src/AuthConfig.h deleted file mode 100644 index 580c4853..00000000 --- a/src/AuthConfig.h +++ /dev/null @@ -1,106 +0,0 @@ -/* */ -#ifndef _D_AUTH_CONFIG_H_ -#define _D_AUTH_CONFIG_H_ - -#include "common.h" -#include "AuthConfigItem.h" -#include "prefs.h" -#include "Option.h" - -class AuthConfig { -private: - AuthConfigItemHandle httpAuthConfigItem; - AuthConfigItemHandle ftpAuthConfigItem; - AuthConfigItemHandle httpProxyAuthConfigItem; - - AuthConfigItemHandle createAuthConfigItem(const string& user, const string& password) - { - if(user.length() > 0) { - return new AuthConfigItem(user, password); - } else { - return 0; - } - } -public: - - AuthConfig():httpAuthConfigItem(0), - ftpAuthConfigItem(0), - httpProxyAuthConfigItem(0) {} - - AuthConfigItemHandle getHttpAuthConfigItem() const - { - return httpAuthConfigItem; - } - - void setHttpAuthConfigItem(const string& user, const string& password) - { - httpAuthConfigItem = createAuthConfigItem(user, password); - } - - AuthConfigItemHandle getFtpAuthConfigItem() const - { - return ftpAuthConfigItem; - } - - void setFtpAuthConfigItem(const string& user, const string& password) - { - ftpAuthConfigItem = createAuthConfigItem(user, password); - } - - AuthConfigItemHandle getHttpProxyAuthConfigItem() const - { - return httpProxyAuthConfigItem; - } - - void setHttpProxyAuthConfigItem(const string& user, const string& password) - { - httpProxyAuthConfigItem = createAuthConfigItem(user, password); - } - - void configure(const Option* op) - { - setHttpAuthConfigItem(op->get(PREF_HTTP_USER), - op->get(PREF_HTTP_PASSWD)); - setFtpAuthConfigItem(op->get(PREF_FTP_USER), - op->get(PREF_FTP_PASSWD)); - setHttpProxyAuthConfigItem(op->get(PREF_HTTP_PROXY_USER), - op->get(PREF_HTTP_PROXY_PASSWD)); - } -}; - -typedef SharedHandle AuthConfigHandle; - -#endif // _D_AUTH_CONFIG_H_