diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/mapi/mapihook/src/msgMapiImp.h | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | comm/mailnews/mapi/mapihook/src/msgMapiImp.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/comm/mailnews/mapi/mapihook/src/msgMapiImp.h b/comm/mailnews/mapi/mapihook/src/msgMapiImp.h new file mode 100644 index 0000000000..b83f0566a0 --- /dev/null +++ b/comm/mailnews/mapi/mapihook/src/msgMapiImp.h @@ -0,0 +1,79 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef MSG_MAPI_IMP_H +#define MSG_MAPI_IMP_H + +#include "msgMapi.h" +#include "nspr.h" +#include "nscore.h" +#include "nsISupportsImpl.h" // ThreadSafeAutoRefCnt + +class nsIMsgFolder; +class MsgMapiListContext; + +const CLSID CLSID_CMapiImp = {0x29f458be, + 0x8866, + 0x11d5, + {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}}; + +// this class implements the MS COM interface nsIMapi that provides the methods +// called by mapi32.dll to perform the mail operations as specified by MAPI. +// These class methods in turn use the Mozilla Mail XPCOM interfaces to do so. +class CMapiImp : public nsIMapi { + public: + // IUnknown + + STDMETHODIMP QueryInterface(const IID& aIid, void** aPpv); + STDMETHODIMP_(ULONG) AddRef(); + STDMETHODIMP_(ULONG) Release(); + + // Interface INsMapi + + STDMETHODIMP Login(unsigned long aUIArg, LPSTR aLogin, LPSTR aPassWord, + unsigned long aFlags, unsigned long* aSessionId); + + STDMETHODIMP SendMail(unsigned long aSession, lpnsMapiMessage aMessage, + unsigned long aFlags, unsigned long aReserved); + + STDMETHODIMP SendDocuments(unsigned long aSession, LPSTR aDelimChar, + LPSTR aFilePaths, LPSTR aFileNames, ULONG aFlags); + + STDMETHODIMP FindNext(unsigned long aSession, unsigned long ulUIParam, + LPSTR lpszMessageType, LPSTR lpszSeedMessageID, + unsigned long flFlags, unsigned long ulReserved, + unsigned char lpszMessageID[64]); + + STDMETHODIMP ReadMail(unsigned long lhSession, unsigned long ulUIParam, + LPSTR lpszMessageID, unsigned long flFlags, + unsigned long ulReserved, lpnsMapiMessage* lppMessage); + STDMETHODIMP DeleteMail(unsigned long lhSession, unsigned long ulUIParam, + LPSTR lpszMessageID, unsigned long flFlags, + unsigned long ulReserved); + STDMETHODIMP SaveMail(unsigned long lhSession, unsigned long ulUIParam, + lpnsMapiMessage lppMessage, unsigned long flFlags, + unsigned long ulReserved, LPSTR lpszMessageID); + + STDMETHODIMP Initialize(); + STDMETHODIMP IsValid(); + STDMETHODIMP IsValidSession(unsigned long aSession); + + STDMETHODIMP SendMailW(unsigned long aSession, lpnsMapiMessageW aMessage, + unsigned long aFlags, unsigned long aReserved); + + STDMETHODIMP Logoff(unsigned long aSession); + STDMETHODIMP CleanUp(); + + CMapiImp(); + virtual ~CMapiImp(); + + LONG InitContext(unsigned long session, MsgMapiListContext** listContext); + nsresult GetDefaultInbox(nsIMsgFolder** inboxFolder); + + private: + PRLock* m_Lock; + mozilla::ThreadSafeAutoRefCnt m_cRef; +}; + +#endif // MSG_MAPI_IMP_H |