1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is Mozilla Communicator.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2002
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38 /* This is a private interface used exclusively by SMIME.
39 It provides functionality to the JS UI code,
40 that is only accessible from C++.
41 */
42
43 #include "nsISupports.idl"
44
45 interface nsIMsgCompFields;
46 interface nsIX509Cert;
47
48 [scriptable, uuid(a54e3c8f-a000-4901-898f-fafb297b1546)]
49 interface nsISMimeJSHelper : nsISupports
50 {
51 /**
52 * Obtains detailed information about the certificate availability
53 * status of email recipients.
54 *
55 * @param compFields - Attributes of the composed message
56 *
57 * @param count - The number of entries in returned arrays
58 *
59 * @param emailAddresses - The list of all recipient email addresses
60 *
61 * @param certVerification - The verification/validity status of recipient certs
62 *
63 * @param certIssuedInfos - If a recipient cert was found, when has it been issued?
64 *
65 * @param certExpiredInfos - If a recipient cert was found, when will it expire?
66 *
67 * @param certs - The recipient certificates, which can contain null for not found
68 *
69 * @param canEncrypt - whether valid certificates have been found for all recipients
70 *
71 * @exception NS_ERROR_FAILURE - unexptected failure
72 *
73 * @exception NS_ERROR_OUT_OF_MEMORY - could not create the out list
74 *
75 * @exception NS_ERROR_INVALID_ARG
76 */
77 void getRecipientCertsInfo(in nsIMsgCompFields compFields,
78 out unsigned long count,
79 [array, size_is(count)] out wstring emailAddresses,
80 [array, size_is(count)] out long certVerification,
81 [array, size_is(count)] out wstring certIssuedInfos,
82 [array, size_is(count)] out wstring certExpiresInfos,
83 [array, size_is(count)] out nsIX509Cert certs,
84 out PRBool canEncrypt);
85
86 /**
87 * Obtains a list of email addresses where valid email recipient certificates
88 * are not yet available.
89 *
90 * @param compFields - Attributes of the composed message
91 *
92 * @param count - The number of returned email addresses
93 *
94 * @param emailAddresses - The list of email addresses without valid certs
95 *
96 * @exception NS_ERROR_FAILURE - unexptected failure
97 *
98 * @exception NS_ERROR_OUT_OF_MEMORY - could not create the out list
99 *
100 * @exception NS_ERROR_INVALID_ARG
101 */
102 void getNoCertAddresses(in nsIMsgCompFields compFields,
103 out unsigned long count,
104 [array, size_is(count)] out wstring emailAddresses);
105 };