зеркало из https://github.com/mozilla/pjs.git
add accessor for getting the account manager from the mail session
This commit is contained in:
Родитель
59813410b8
Коммит
f1116ba56f
|
@ -43,6 +43,7 @@
|
|||
|
||||
#include "nsIMsgIdentity.h"
|
||||
#include "nsIMsgIncomingServer.h"
|
||||
#include "nsIMsgAccountManager.h"
|
||||
|
||||
class nsIMsgMailSession : public nsISupports
|
||||
{
|
||||
|
@ -56,6 +57,7 @@ public:
|
|||
|
||||
NS_IMETHOD GetCurrentIdentity(nsIMsgIdentity ** aIdentity) = 0;
|
||||
NS_IMETHOD GetCurrentServer(nsIMsgIncomingServer* *aServer) = 0;
|
||||
NS_IMETHOD GetAccountManager(nsIMsgAccountManager* *aAccountManager) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIMsgMailSession_h___ */
|
||||
|
|
|
@ -87,3 +87,12 @@ nsresult nsMsgMailSession::GetCurrentServer(nsIMsgIncomingServer ** aServer)
|
|||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsMsgMailSession::GetAccountManager(nsIMsgAccountManager* *aAM)
|
||||
{
|
||||
if (!aAM) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aAM = m_accountManager;
|
||||
NS_ADDREF(m_accountManager);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
// nsIMsgMailSession support
|
||||
NS_IMETHOD GetCurrentIdentity(nsIMsgIdentity ** aIdentity);
|
||||
NS_IMETHOD GetCurrentServer(nsIMsgIncomingServer **aServer);
|
||||
NS_IMETHOD GetAccountManager(nsIMsgAccountManager* *aAM);
|
||||
|
||||
protected:
|
||||
nsIMsgAccountManager *m_accountManager;
|
||||
|
|
Загрузка…
Ссылка в новой задаче