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/build | |
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/build')
-rw-r--r-- | mailnews/mapi/mapihook/build/Makefile.in | 36 | ||||
-rw-r--r-- | mailnews/mapi/mapihook/build/MapiProxy.def | 13 | ||||
-rw-r--r-- | mailnews/mapi/mapihook/build/module.ver | 6 | ||||
-rw-r--r-- | mailnews/mapi/mapihook/build/moz.build | 22 | ||||
-rw-r--r-- | mailnews/mapi/mapihook/build/msgMapi.idl | 93 |
5 files changed, 170 insertions, 0 deletions
diff --git a/mailnews/mapi/mapihook/build/Makefile.in b/mailnews/mapi/mapihook/build/Makefile.in new file mode 100644 index 000000000..0614220e9 --- /dev/null +++ b/mailnews/mapi/mapihook/build/Makefile.in @@ -0,0 +1,36 @@ +# +# 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/. + +MIDL_GENERATED_FILES = msgMapi.h msgMapi_p.c msgMapi_i.c dlldata.c + +INSTALL_TARGETS += msgmapi +msgmapi_FILES := msgMapi.h +msgmapi_DEST = $(DIST)/include +msgmapi_TARGET := export + +SRCDIR_CSRCS = $(addprefix $(srcdir)/,$(CSRCS)) + +GARBAGE += $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS) + +EMBED_MANIFEST_AT = 2 + +CSRCS += \ + dlldata.c \ + msgMapi_i.c \ + msgMapi_p.c \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + +$(MIDL_GENERATED_FILES): done_gen + +done_gen: msgMapi.idl + $(RM) $(SRCDIR_CSRCS) + $(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl + touch $@ + +export:: done_gen + + diff --git a/mailnews/mapi/mapihook/build/MapiProxy.def b/mailnews/mapi/mapihook/build/MapiProxy.def new file mode 100644 index 000000000..4da08eb7d --- /dev/null +++ b/mailnews/mapi/mapihook/build/MapiProxy.def @@ -0,0 +1,13 @@ +; 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/. + +LIBRARY MapiProxy.dll + +EXPORTS + DllGetClassObject PRIVATE + DllCanUnloadNow PRIVATE + GetProxyDllInfo PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE + diff --git a/mailnews/mapi/mapihook/build/module.ver b/mailnews/mapi/mapihook/build/module.ver new file mode 100644 index 000000000..7691020c2 --- /dev/null +++ b/mailnews/mapi/mapihook/build/module.ver @@ -0,0 +1,6 @@ +WIN32_MODULE_FILEVERSION=0,8,0,0 +WIN32_MODULE_FILEVERSION_STRING=0.8 +WIN32_MODULE_COPYRIGHT=ŠThunderbird and Mozilla Developers, according to the MPL 1.1/GPL 2.0/LGPL 2.1 licenses, as applicable. +WIN32_MODULE_COMPANYNAME=Mozilla.org +WIN32_MODULE_TRADEMARKS=Mozilla +WIN32_MODULE_COMMENT=Mozilla Thunderbird Thunderbird MAPI Proxy Dll diff --git a/mailnews/mapi/mapihook/build/moz.build b/mailnews/mapi/mapihook/build/moz.build new file mode 100644 index 000000000..5c42875cc --- /dev/null +++ b/mailnews/mapi/mapihook/build/moz.build @@ -0,0 +1,22 @@ +# vim: set filetype=python: +# 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/. + +SharedLibrary('MapiProxy') + +OS_LIBS += [ + 'rpcrt4', +] + +for var in ('REGISTER_PROXY_DLL', 'UNICODE', '_UNICODE'): + DEFINES[var] = True + +# This produces a compile warning mozilla-config.h(145): warning C4005: '_WIN32_WINNT': macro redefinition +#DEFINES['_WIN32_WINNT'] = '0x400' + +if not CONFIG['MOZ_INCOMPLETE_EXTERNAL_LINKAGE']: + DEFINES['MOZILLA_INTERNAL_API'] = True + +DEFFILE = SRCDIR + '/MapiProxy.def' + diff --git a/mailnews/mapi/mapihook/build/msgMapi.idl b/mailnews/mapi/mapihook/build/msgMapi.idl new file mode 100644 index 000000000..3ca3fd493 --- /dev/null +++ b/mailnews/mapi/mapihook/build/msgMapi.idl @@ -0,0 +1,93 @@ +/* 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/. */ + +// This idl will be compiled by MIDL. MS-COM is used +// as bridge between MAPI clients and the Mozilla. + +import "unknwn.idl"; + +typedef wchar_t LOGIN_PW_TYPE[256]; + +typedef struct +{ + unsigned long ulReserved; + unsigned long flFlags; /* Flags */ + unsigned long nPosition_NotUsed; /* character in text to be replaced by attachment */ + LPTSTR lpszPathName; /* Full path name including file name */ + LPTSTR lpszFileName; /* Real (original) file name */ + unsigned char * lpFileType_NotUsed ; +} nsMapiFileDesc, * lpnsMapiFileDesc; + + +typedef struct +{ + unsigned long ulReserved; + unsigned long ulRecipClass; /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */ + LPSTR lpszName; /* Recipient name to display */ + LPSTR lpszAddress; /* Recipient email address */ + unsigned long ulEIDSize_NotUsed; + unsigned char * lpEntryID_NotUsed ; +} nsMapiRecipDesc, * lpnsMapiRecipDesc; + +typedef struct +{ + unsigned long ulReserved; + LPSTR lpszSubject; /* Message Subject */ + LPSTR lpszNoteText; /* Message Text */ + LPSTR lpszMessageType; + LPSTR lpszDateReceived; /* in YYYY/MM/DD HH:MM format */ + LPSTR lpszConversationID_NotUsed; /* conversation thread ID */ + unsigned long flFlags; /* unread,return receipt */ + lpnsMapiRecipDesc lpOriginator; /* Originator descriptor */ + unsigned long nRecipCount; /* Number of recipients */ + [size_is (nRecipCount)] lpnsMapiRecipDesc lpRecips;/* Recipient descriptors */ + unsigned long nFileCount; /* # of file attachments */ + [size_is (nFileCount)] lpnsMapiFileDesc lpFiles; /* Attachment descriptors */ +} nsMapiMessage, * lpnsMapiMessage; + +[ + object, + uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7), + helpstring("nsIMapi Inteface"), + pointer_default(unique) +] + +interface nsIMapi : IUnknown +{ + HRESULT Login([in] unsigned long aUIArg, [in, unique] LOGIN_PW_TYPE aLogin, + [in, unique] LOGIN_PW_TYPE aPassWord, [in] unsigned long aFlags, + [out] unsigned long *aSessionId); + + HRESULT Initialize(); + HRESULT IsValid(); + HRESULT IsValidSession([in] unsigned long aSession); + + HRESULT SendMail([in] unsigned long aSession, [in, unique] lpnsMapiMessage aMessage, + [in] short aRecipCount, [in, size_is(aRecipCount)] lpnsMapiRecipDesc aRecips, + [in] short aFileCount, [in, size_is(aFileCount)] lpnsMapiFileDesc aFiles, + [in] unsigned long aFlags, [in] unsigned long aReserved) ; + + HRESULT SendDocuments( [in] unsigned long aSession, + [in, unique] LPTSTR aDelimChar, [in, unique] LPTSTR aFilePaths, + [in, unique] LPTSTR aFileNames, [in] ULONG aFlags ) ; + + HRESULT FindNext( [in] unsigned long aSession, [in] ULONG ulUIParam, [in, unique] LPTSTR lpszMessageType, + [in, unique] LPTSTR lpszSeedMessageID, [in] ULONG flFlags, [in] ULONG ulReserved, + [in] [out] char lpszMessageID[64] ) ; + + HRESULT ReadMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in, unique] LPTSTR lpszMessageID, + [in] ULONG flFlags, [in] ULONG ulReserved, [out] lpnsMapiMessage *lppMessage); + + HRESULT DeleteMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in, unique] LPTSTR lpszMessageID, + [in] ULONG flFlags, [in] ULONG ulReserved); + + HRESULT SaveMail( [in] unsigned long lhSession, [in] ULONG ulUIParam, [in, unique] lpnsMapiMessage lppMessage, + [in] ULONG flFlags, [in] ULONG ulReserved, [in, unique] LPTSTR lpszMessageID); + + HRESULT Logoff (unsigned long aSession); + HRESULT CleanUp(); +}; + + + |