security/manager/ssl/public/nsICMSMessage2.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/public/nsICMSMessage2.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsISMimeVerificationListener;
    1.11 +
    1.12 +[ptr] native UnsignedCharPtr(unsigned char);
    1.13 +
    1.14 +/*
    1.15 + * This interface is currently not marked scriptable,
    1.16 + * because its verification functions are meant to look like those
    1.17 + * in nsICMSMessage. At the time the ptr type is eliminated in both 
    1.18 + * interfaces, both should be made scriptable.
    1.19 + */
    1.20 +
    1.21 +[uuid(a99a3203-39e3-45e1-909c-175b0e471c2b)]
    1.22 +interface nsICMSMessage2 : nsISupports
    1.23 +{
    1.24 +  /**
    1.25 +    * Async version of nsICMSMessage::VerifySignature.
    1.26 +    * Code will be executed on a background thread and
    1.27 +    * availability of results will be notified using a 
    1.28 +    * call to nsISMimeVerificationListener.
    1.29 +   */
    1.30 +  void asyncVerifySignature(in nsISMimeVerificationListener listener);
    1.31 +  
    1.32 +  /**
    1.33 +    * Async version of nsICMSMessage::VerifyDetachedSignature.
    1.34 +    * Code will be executed on a background thread and
    1.35 +    * availability of results will be notified using a 
    1.36 +    * call to nsISMimeVerificationListener.
    1.37 +    *
    1.38 +    * We are using "native unsigned char" ptr, because the function 
    1.39 +    * signatures of this one and nsICMSMessage::verifyDetachedSignature 
    1.40 +    * should be the identical. Cleaning up nsICMSMessages needs to be
    1.41 +    * postponed, because this async version is needed on MOZILLA_1_8_BRANCH.
    1.42 +    *
    1.43 +    * Once both interfaces get cleaned up, the function signature should
    1.44 +    * look like:
    1.45 +    *     [array, length_is(aDigestDataLen)]
    1.46 +    *     in octet aDigestData,
    1.47 +    *     in unsigned long aDigestDataLen);
    1.48 +   */
    1.49 +  void asyncVerifyDetachedSignature(in nsISMimeVerificationListener listener,
    1.50 +                                     in UnsignedCharPtr aDigestData, 
    1.51 +                                     in unsigned long aDigestDataLen);
    1.52 +};
    1.53 +
    1.54 +[uuid(56310af6-dffc-48b4-abca-85eae4059064)]
    1.55 +interface nsISMimeVerificationListener : nsISupports {
    1.56 +
    1.57 +  /**
    1.58 +   *  Notify that results are ready, that have been requested
    1.59 +   *  using nsICMSMessage2::asyncVerify[Detached]Signature()
    1.60 +   *
    1.61 +   *  verificationResultCode matches synchronous result code from
    1.62 +   *  nsICMSMessage::verify[Detached]Signature
    1.63 +   */
    1.64 +  void notify(in nsICMSMessage2 verifiedMessage,
    1.65 +              in nsresult verificationResultCode);
    1.66 +};
    1.67 +

mercurial