summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/mapi/mapihook/build
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mailnews/mapi/mapihook/build')
-rw-r--r--comm/mailnews/mapi/mapihook/build/MapiProxy.def13
-rw-r--r--comm/mailnews/mapi/mapihook/build/module.ver6
-rw-r--r--comm/mailnews/mapi/mapihook/build/moz.build56
-rw-r--r--comm/mailnews/mapi/mapihook/build/msgMapi.idl125
4 files changed, 200 insertions, 0 deletions
diff --git a/comm/mailnews/mapi/mapihook/build/MapiProxy.def b/comm/mailnews/mapi/mapihook/build/MapiProxy.def
new file mode 100644
index 0000000000..4da08eb7d3
--- /dev/null
+++ b/comm/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/comm/mailnews/mapi/mapihook/build/module.ver b/comm/mailnews/mapi/mapihook/build/module.ver
new file mode 100644
index 0000000000..7691020c26
--- /dev/null
+++ b/comm/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/comm/mailnews/mapi/mapihook/build/moz.build b/comm/mailnews/mapi/mapihook/build/moz.build
new file mode 100644
index 0000000000..9832a5cb05
--- /dev/null
+++ b/comm/mailnews/mapi/mapihook/build/moz.build
@@ -0,0 +1,56 @@
+# 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",
+]
+
+LOCAL_INCLUDES += ["/comm/mailnews/mapi/include"]
+
+SOURCES += ["!dlldata.c", "!msgMapi_i.c", "!msgMapi_p.c"]
+
+GeneratedFile(
+ "dlldata.c",
+ "msgMapi.h",
+ "msgMapi_i.c",
+ "msgMapi_p.c",
+ inputs=["msgMapi.idl"],
+ script="/build/midl.py",
+ entry_point="midl",
+ flags=[
+ "-I",
+ SRCDIR,
+ "-I",
+ TOPSRCDIR + "/comm/mailnews/mapi/include",
+ ],
+)
+
+EXPORTS += [
+ "!msgMapi.h",
+ "!msgMapi_i.c",
+]
+
+for var in ("REGISTER_PROXY_DLL", "UNICODE", "_UNICODE"):
+ DEFINES[var] = True
+
+DEFFILE = "MapiProxy.def"
+
+# The Windows MIDL code generator creates things like:
+#
+# #endif !_MIDL_USE_GUIDDEF_
+#
+# which clang-cl complains about. MSVC doesn't, so turn this warning off.
+if CONFIG["CC_TYPE"] == "clang-cl":
+ CFLAGS += ["-Wno-extra-tokens"]
+
+# clang-cl complains about these in generated code:
+if CONFIG["CC_TYPE"] == "clang-cl":
+ CFLAGS += [
+ "-Wno-extern-initializer",
+ "-Wno-missing-braces",
+ "-Wno-unused-const-variable",
+ ]
diff --git a/comm/mailnews/mapi/mapihook/build/msgMapi.idl b/comm/mailnews/mapi/mapihook/build/msgMapi.idl
new file mode 100644
index 0000000000..e2738ae8e1
--- /dev/null
+++ b/comm/mailnews/mapi/mapihook/build/msgMapi.idl
@@ -0,0 +1,125 @@
+/* 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 struct
+{
+ unsigned long ulReserved;
+ unsigned long flFlags; /* Flags */
+ unsigned long nPosition_NotUsed; /* character in text to be replaced by attachment */
+ LPSTR lpszPathName; /* Full path name including file name */
+ LPSTR 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;
+
+typedef struct
+{
+ unsigned long ulReserved;
+ unsigned long flFlags; /* Flags */
+ unsigned long nPosition_NotUsed; /* character in text to be replaced by attachment */
+ LPWSTR lpszPathName; /* Full path name including file name */
+ LPWSTR lpszFileName; /* Real (original) file name */
+ unsigned char* lpFileType_NotUsed;
+} nsMapiFileDescW, *lpnsMapiFileDescW;
+
+typedef struct
+{
+ unsigned long ulReserved;
+ unsigned long ulRecipClass; /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */
+ LPWSTR lpszName; /* Recipient name to display */
+ LPWSTR lpszAddress; /* Recipient email address */
+ unsigned long ulEIDSize_NotUsed;
+ unsigned char* lpEntryID_NotUsed;
+} nsMapiRecipDescW, *lpnsMapiRecipDescW;
+
+typedef struct
+{
+ unsigned long ulReserved;
+ LPWSTR lpszSubject; /* Message Subject */
+ LPWSTR lpszNoteText; /* Message Text */
+ LPWSTR lpszMessageType;
+ LPWSTR lpszDateReceived; /* in YYYY/MM/DD HH:MM format */
+ LPWSTR lpszConversationID_NotUsed; /* conversation thread ID */
+ unsigned long flFlags; /* unread,return receipt */
+ lpnsMapiRecipDescW lpOriginator; /* Originator descriptor */
+ unsigned long nRecipCount; /* Number of recipients */
+ [size_is (nRecipCount)] lpnsMapiRecipDescW lpRecips; /* Recipient descriptors */
+ unsigned long nFileCount; /* # of file attachments */
+ [size_is (nFileCount)] lpnsMapiFileDescW lpFiles; /* Attachment descriptors */
+} nsMapiMessageW, *lpnsMapiMessageW;
+
+[
+ object,
+ uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7),
+ helpstring("nsIMapi Interface"),
+ pointer_default(unique)
+]
+
+interface nsIMapi : IUnknown
+{
+ HRESULT Login([in] unsigned long aUIArg, [in, unique, max_is(256)] LPSTR aLogin,
+ [in, unique, max_is(256)] LPSTR 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] unsigned long aFlags, [in] unsigned long aReserved) ;
+
+ HRESULT SendDocuments([in] unsigned long aSession,
+ [in, unique] LPSTR aDelimChar, [in, unique] LPSTR aFilePaths,
+ [in, unique] LPSTR aFileNames, [in] ULONG aFlags);
+
+ HRESULT FindNext([in] unsigned long aSession, [in] ULONG ulUIParam, [in, unique] const LPSTR lpszMessageType,
+ [in, unique] const LPSTR lpszSeedMessageID, [in] ULONG flFlags, [in] ULONG ulReserved,
+ [in] [out] char lpszMessageID[64] ) ;
+
+ HRESULT ReadMail([in] unsigned long lhSession, [in] ULONG ulUIParam, [in, unique] LPSTR lpszMessageID,
+ [in] ULONG flFlags, [in] ULONG ulReserved, [out] lpnsMapiMessage *lppMessage);
+
+ HRESULT DeleteMail([in] unsigned long lhSession, [in] ULONG ulUIParam, [in, unique] LPSTR 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] LPSTR lpszMessageID);
+
+ HRESULT SendMailW([in] unsigned long aSession, [in, unique] lpnsMapiMessageW aMessage,
+ [in] unsigned long aFlags, [in] unsigned long aReserved);
+
+ HRESULT Logoff(unsigned long aSession);
+ HRESULT CleanUp();
+};