This commit is contained in:
mscott%netscape.com 1999-08-31 04:42:01 +00:00
Родитель e6c2125bd0
Коммит 7b2cea9125
2 изменённых файлов: 0 добавлений и 66 удалений

Просмотреть файл

@ -1381,34 +1381,6 @@ nsImapMiscellaneousSinkProxy::SetImapHostPassword(nsIImapProtocol* aProtocol,
return res; return res;
} }
NS_IMETHODIMP
nsImapMiscellaneousSinkProxy::GetPasswordForUser(nsIImapProtocol* aProtocol,
const char* userName)
{
nsresult res = NS_OK;
NS_PRECONDITION (userName, "Oops... null userName");
if(!userName)
return NS_ERROR_NULL_POINTER;
NS_ASSERTION (m_protocol == aProtocol, "Ooh ooh, wrong protocol");
if (PR_GetCurrentThread() == m_thread)
{
GetPasswordForUserProxyEvent *ev =
new GetPasswordForUserProxyEvent(this, userName);
if(nsnull == ev)
res = NS_ERROR_OUT_OF_MEMORY;
else
{
ev->SetNotifyCompletion(PR_TRUE);
ev->PostEvent(m_eventQueue);
}
}
else
{
res = m_realImapMiscellaneousSink->GetPasswordForUser(aProtocol, userName);
}
return res;
}
NS_IMETHODIMP NS_IMETHODIMP
nsImapMiscellaneousSinkProxy::SetBiffStateAndUpdate(nsIImapProtocol* aProtocol, nsImapMiscellaneousSinkProxy::SetBiffStateAndUpdate(nsIImapProtocol* aProtocol,
@ -3092,34 +3064,6 @@ SetImapHostPasswordProxyEvent::HandleEvent()
return res; return res;
} }
GetPasswordForUserProxyEvent::GetPasswordForUserProxyEvent(
nsImapMiscellaneousSinkProxy* aProxy, const char* userName) :
nsImapMiscellaneousSinkProxyEvent(aProxy)
{
NS_ASSERTION (userName, "Oops... a null username");
if (userName)
m_userName = PL_strdup(userName);
else
m_userName = nsnull;
}
GetPasswordForUserProxyEvent::~GetPasswordForUserProxyEvent()
{
if (m_userName)
PL_strfree(m_userName);
}
NS_IMETHODIMP
GetPasswordForUserProxyEvent::HandleEvent()
{
nsresult res = m_proxy->m_realImapMiscellaneousSink->GetPasswordForUser(
m_proxy->m_protocol, m_userName);
if (m_notifyCompletion)
m_proxy->m_protocol->NotifyFEEventCompletion();
return res;
}
SetBiffStateAndUpdateProxyEvent::SetBiffStateAndUpdateProxyEvent( SetBiffStateAndUpdateProxyEvent::SetBiffStateAndUpdateProxyEvent(
nsImapMiscellaneousSinkProxy* aProxy, nsMsgBiffState biffState) : nsImapMiscellaneousSinkProxy* aProxy, nsMsgBiffState biffState) :
nsImapMiscellaneousSinkProxyEvent(aProxy) nsImapMiscellaneousSinkProxyEvent(aProxy)

Просмотреть файл

@ -215,8 +215,6 @@ public:
NS_IMETHOD FinishImapConnection(nsIImapProtocol* aProtocol); NS_IMETHOD FinishImapConnection(nsIImapProtocol* aProtocol);
NS_IMETHOD SetImapHostPassword(nsIImapProtocol* aProtocol, NS_IMETHOD SetImapHostPassword(nsIImapProtocol* aProtocol,
GenericInfo* aInfo); GenericInfo* aInfo);
NS_IMETHOD GetPasswordForUser(nsIImapProtocol* aProtocol,
const char* userName);
NS_IMETHOD SetBiffStateAndUpdate(nsIImapProtocol* aProtocol, NS_IMETHOD SetBiffStateAndUpdate(nsIImapProtocol* aProtocol,
nsMsgBiffState biffState); nsMsgBiffState biffState);
NS_IMETHOD GetStoredUIDValidity(nsIImapProtocol* aProtocol, NS_IMETHOD GetStoredUIDValidity(nsIImapProtocol* aProtocol,
@ -674,14 +672,6 @@ struct SetImapHostPasswordProxyEvent : public nsImapMiscellaneousSinkProxyEvent
GenericInfo m_info; GenericInfo m_info;
}; };
struct GetPasswordForUserProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{
GetPasswordForUserProxyEvent(nsImapMiscellaneousSinkProxy* aProxy,
const char* userName);
virtual ~GetPasswordForUserProxyEvent();
NS_IMETHOD HandleEvent();
char* m_userName;
};
struct SetBiffStateAndUpdateProxyEvent : public nsImapMiscellaneousSinkProxyEvent struct SetBiffStateAndUpdateProxyEvent : public nsImapMiscellaneousSinkProxyEvent
{ {