summaryrefslogtreecommitdiffstats
path: root/mailnews/mime/public/nsICMSMessage2.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-11-03 00:17:46 -0400
commit302bf1b523012e11b60425d6eee1221ebc2724eb (patch)
treeb191a895f8716efcbe42f454f37597a545a6f421 /mailnews/mime/public/nsICMSMessage2.idl
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
downloadUXP-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/mime/public/nsICMSMessage2.idl')
-rw-r--r--mailnews/mime/public/nsICMSMessage2.idl64
1 files changed, 64 insertions, 0 deletions
diff --git a/mailnews/mime/public/nsICMSMessage2.idl b/mailnews/mime/public/nsICMSMessage2.idl
new file mode 100644
index 000000000..9360279c6
--- /dev/null
+++ b/mailnews/mime/public/nsICMSMessage2.idl
@@ -0,0 +1,64 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+interface nsISMimeVerificationListener;
+
+[ptr] native UnsignedCharPtr(unsigned char);
+
+/*
+ * This interface is currently not marked scriptable,
+ * because its verification functions are meant to look like those
+ * in nsICMSMessage. At the time the ptr type is eliminated in both
+ * interfaces, both should be made scriptable.
+ */
+
+[uuid(b21a3636-2287-4b9f-9a22-25f245981ef0)]
+interface nsICMSMessage2 : nsISupports
+{
+ /**
+ * Async version of nsICMSMessage::VerifySignature.
+ * Code will be executed on a background thread and
+ * availability of results will be notified using a
+ * call to nsISMimeVerificationListener.
+ */
+ void asyncVerifySignature(in nsISMimeVerificationListener listener);
+
+ /**
+ * Async version of nsICMSMessage::VerifyDetachedSignature.
+ * Code will be executed on a background thread and
+ * availability of results will be notified using a
+ * call to nsISMimeVerificationListener.
+ *
+ * We are using "native unsigned char" ptr, because the function
+ * signatures of this one and nsICMSMessage::verifyDetachedSignature
+ * should be the identical. Cleaning up nsICMSMessages needs to be
+ * postponed, because this async version is needed on MOZILLA_1_8_BRANCH.
+ *
+ * Once both interfaces get cleaned up, the function signature should
+ * look like:
+ * [array, length_is(aDigestDataLen)]
+ * in octet aDigestData,
+ * in unsigned long aDigestDataLen);
+ */
+ void asyncVerifyDetachedSignature(in nsISMimeVerificationListener listener,
+ in UnsignedCharPtr aDigestData,
+ in unsigned long aDigestDataLen);
+};
+
+[uuid(5226d698-0773-4f25-b94c-7944b3fc01d3)]
+interface nsISMimeVerificationListener : nsISupports {
+
+ /**
+ * Notify that results are ready, that have been requested
+ * using nsICMSMessage2::asyncVerify[Detached]Signature()
+ *
+ * verificationResultCode matches synchronous result code from
+ * nsICMSMessage::verify[Detached]Signature
+ */
+ void notify(in nsICMSMessage2 verifiedMessage,
+ in nsresult verificationResultCode);
+};
+