From 875300e0fd72023912132c8d835f2ab821ca338c Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 10 Aug 1999 18:16:44 +0000 Subject: [PATCH] Override get and set password methods from base class. git-svn-id: svn://10.0.0.236/trunk@42981 18797224-902f-48f8-a5cc-f745e15eee43 --- .../local/src/nsPop3IncomingServer.cpp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp b/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp index cb183f01957..c2e7f0c4f76 100644 --- a/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp +++ b/mozilla/mailnews/local/src/nsPop3IncomingServer.cpp @@ -56,9 +56,15 @@ public: NS_IMETHOD PerformBiff(); + // Override the implementations of Get/Set Password in + // nsMsgIncomingServer. We don't want to get the password + // from preferences + NS_IMETHOD GetPassword(char * *aPassword); + NS_IMETHOD SetPassword(char * aPassword); private: char *m_rootFolderPath; + nsCString m_password; PRBool m_leaveOnServer; PRBool m_deleteMailLeftOnServer; }; @@ -82,6 +88,28 @@ nsPop3IncomingServer::~nsPop3IncomingServer() PR_FREEIF(m_rootFolderPath); } +NS_IMETHODIMP nsPop3IncomingServer::GetPassword(char * *aPassword) +{ + nsresult rv = NS_OK; + if (aPassword) + *aPassword = m_password.ToNewCString(); + else + rv = NS_ERROR_NULL_POINTER; + + return rv; +} + +NS_IMETHODIMP nsPop3IncomingServer::SetPassword(char * aPassword) +{ + nsresult rv = NS_OK; + if (aPassword) + m_password = aPassword; + else + rv = NS_ERROR_NULL_POINTER; + + return rv; +} + NS_IMPL_SERVERPREF_STR(nsPop3IncomingServer, RootFolderPath, "directory")