diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-03 00:17:46 -0400 |
commit | 302bf1b523012e11b60425d6eee1221ebc2724eb (patch) | |
tree | b191a895f8716efcbe42f454f37597a545a6f421 /mailnews/mapi/mapihook/src/msgMapiImp.h | |
parent | 21b3f6247403c06f85e1f45d219f87549862198f (diff) | |
download | UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.gz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.lz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.tar.xz UXP-302bf1b523012e11b60425d6eee1221ebc2724eb.zip |
Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1
Diffstat (limited to 'mailnews/mapi/mapihook/src/msgMapiImp.h')
-rw-r--r-- | mailnews/mapi/mapihook/src/msgMapiImp.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/mailnews/mapi/mapihook/src/msgMapiImp.h b/mailnews/mapi/mapihook/src/msgMapiImp.h new file mode 100644 index 000000000..875e9c6cf --- /dev/null +++ b/mailnews/mapi/mapihook/src/msgMapiImp.h @@ -0,0 +1,77 @@ +/* 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 <windows.h> +#include <mapi.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, LOGIN_PW_TYPE aLogin, + LOGIN_PW_TYPE aPassWord, unsigned long aFlags, + unsigned long *aSessionId); + + STDMETHODIMP SendMail( unsigned long aSession, lpnsMapiMessage aMessage, + short aRecipCount, lpnsMapiRecipDesc aRecips , + short aFileCount, lpnsMapiFileDesc aFiles , + unsigned long aFlags, unsigned long aReserved) ; + + STDMETHODIMP SendDocuments( unsigned long aSession, LPTSTR aDelimChar, + LPTSTR aFilePaths, LPTSTR aFileNames, ULONG aFlags); + + STDMETHODIMP FindNext( unsigned long aSession, unsigned long ulUIParam, LPTSTR lpszMessageType, + LPTSTR lpszSeedMessageID, unsigned long flFlags, unsigned long ulReserved, + unsigned char lpszMessageID[64] ); + + STDMETHODIMP ReadMail(unsigned long lhSession, unsigned long ulUIParam, LPTSTR lpszMessageID, + unsigned long flFlags, unsigned long ulReserved, lpnsMapiMessage *lppMessage); + STDMETHODIMP DeleteMail(unsigned long lhSession, unsigned long ulUIParam, LPTSTR lpszMessageID, + unsigned long flFlags, unsigned long ulReserved); + STDMETHODIMP SaveMail(unsigned long lhSession, unsigned long ulUIParam, lpnsMapiMessage lppMessage, + unsigned long flFlags, unsigned long ulReserved, LPTSTR lpszMessageID); + + STDMETHODIMP Initialize(); + STDMETHODIMP IsValid(); + STDMETHODIMP IsValidSession(unsigned long aSession); + + STDMETHODIMP Logoff (unsigned long aSession); + STDMETHODIMP CleanUp(); + + CMapiImp(); + ~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 |