From d399a591919a0773f25a2b54a6277346d51a8f77 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 15 Apr 1999 03:35:28 +0000 Subject: [PATCH] add getter for imap required state --- mailnews/imap/src/nsImapUrl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mailnews/imap/src/nsImapUrl.cpp b/mailnews/imap/src/nsImapUrl.cpp index bf46e8a3be9a..9ac7b146101b 100644 --- a/mailnews/imap/src/nsImapUrl.cpp +++ b/mailnews/imap/src/nsImapUrl.cpp @@ -152,6 +152,22 @@ NS_IMETHODIMP nsImapUrl::QueryInterface(const nsIID &aIID, void** aInstancePtr) // Begin nsIImapUrl specific support //////////////////////////////////////////////////////////////////////////////////// +NS_IMETHODIMP nsImapUrl::GetRequiredImapState(nsImapState * aImapUrlState) +{ + if (aImapUrlState) + { + // the imap action determines the state we must be in...check the + // the imap action. + + if (m_imapAction & 0x1000000) + *aImapUrlState = nsImapSelectedState; + else + *aImapUrlState = nsImapAuthenticatedState; + } + + return NS_OK; +} + NS_IMETHODIMP nsImapUrl::SetServer(nsIMsgIncomingServer * aServer) { if (aServer)