michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsISMimeVerificationListener; michael@0: michael@0: [ptr] native UnsignedCharPtr(unsigned char); michael@0: michael@0: /* michael@0: * This interface is currently not marked scriptable, michael@0: * because its verification functions are meant to look like those michael@0: * in nsICMSMessage. At the time the ptr type is eliminated in both michael@0: * interfaces, both should be made scriptable. michael@0: */ michael@0: michael@0: [uuid(a99a3203-39e3-45e1-909c-175b0e471c2b)] michael@0: interface nsICMSMessage2 : nsISupports michael@0: { michael@0: /** michael@0: * Async version of nsICMSMessage::VerifySignature. michael@0: * Code will be executed on a background thread and michael@0: * availability of results will be notified using a michael@0: * call to nsISMimeVerificationListener. michael@0: */ michael@0: void asyncVerifySignature(in nsISMimeVerificationListener listener); michael@0: michael@0: /** michael@0: * Async version of nsICMSMessage::VerifyDetachedSignature. michael@0: * Code will be executed on a background thread and michael@0: * availability of results will be notified using a michael@0: * call to nsISMimeVerificationListener. michael@0: * michael@0: * We are using "native unsigned char" ptr, because the function michael@0: * signatures of this one and nsICMSMessage::verifyDetachedSignature michael@0: * should be the identical. Cleaning up nsICMSMessages needs to be michael@0: * postponed, because this async version is needed on MOZILLA_1_8_BRANCH. michael@0: * michael@0: * Once both interfaces get cleaned up, the function signature should michael@0: * look like: michael@0: * [array, length_is(aDigestDataLen)] michael@0: * in octet aDigestData, michael@0: * in unsigned long aDigestDataLen); michael@0: */ michael@0: void asyncVerifyDetachedSignature(in nsISMimeVerificationListener listener, michael@0: in UnsignedCharPtr aDigestData, michael@0: in unsigned long aDigestDataLen); michael@0: }; michael@0: michael@0: [uuid(56310af6-dffc-48b4-abca-85eae4059064)] michael@0: interface nsISMimeVerificationListener : nsISupports { michael@0: michael@0: /** michael@0: * Notify that results are ready, that have been requested michael@0: * using nsICMSMessage2::asyncVerify[Detached]Signature() michael@0: * michael@0: * verificationResultCode matches synchronous result code from michael@0: * nsICMSMessage::verify[Detached]Signature michael@0: */ michael@0: void notify(in nsICMSMessage2 verifiedMessage, michael@0: in nsresult verificationResultCode); michael@0: }; michael@0: