1 /* -*- Mode: C++; tab-width: 2; 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.org code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
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 #include "nsISupports.idl"
39
40 %{ C++
41 // {738CFD52-ABCF-11d2-AB4B-0080C787AD96}
42 #define NS_WALLETSERVICE_CID \
43 { 0x738cfd52, 0xabcf, 0x11d2, { 0xab, 0x4b, 0x0, 0x80, 0xc7, 0x87, 0xad, 0x96 } }
44
45 #define NS_WALLETSERVICE_CONTRACTID "@mozilla.org/wallet/wallet-service;1"
46 #define NS_WALLETSERVICE_CLASSNAME "Auto Form Fill and Wallet"
47 %}
48
49 interface nsIDOMNode;
50 interface nsIDOMWindowInternal;
51 interface nsIPrompt;
52
53 /**
54 * The nsIWalletService interface provides an API to the wallet service.
55 * This is a preliminary interface which <B>will</B> change over time!
56 *
57 */
58 [scriptable, uuid(FEDBF066-9C29-4307-86B1-2C0F69717FC5)]
59 interface nsIWalletService : nsISupports {
60 void WALLET_PreEdit(out AString walletList);
61 void WALLET_PostEdit(in AString walletList);
62 boolean WALLET_ChangePassword();
63 void WALLET_DeleteAll();
64 unsigned long WALLET_RequestToCapture(in nsIDOMWindowInternal win);
65 boolean WALLET_Prefill(in boolean quick, in nsIDOMWindowInternal win);
66 wstring WALLET_PrefillOneElement
67 (in nsIDOMWindowInternal win, in nsIDOMNode elementNode);
68 void WALLET_PrefillReturn(in AString results);
69 boolean WALLET_ExpirePassword();
70 void WALLET_InitReencryptCallback(in nsIDOMWindowInternal win);
71
72 boolean haveData(in nsIPrompt dialog, in string key, in wstring userName);
73
74 void WALLET_GetNopreviewListForViewer(out AString aNopreviewList);
75 void WALLET_GetNocaptureListForViewer(out AString aNocaptureList);
76 void WALLET_GetPrefillListForViewer(out AString aPrefillList);
77 void SI_SignonViewerReturn(in AString results);
78
79 string WALLET_Encrypt(in wstring text);
80 wstring WALLET_Decrypt(in string crypt);
81 };
82
83
84 %{C++
85
86 #define NS_SINGLESIGNONPROMPT_CID \
87 { /* 64997e60-17fe-11d4-8cee-0060b0fc14a3 */ \
88 0x64997e60, \
89 0x17fe, \
90 0x11d4, \
91 {0x8c, 0xee, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
92 }
93
94 #define NS_SINGLESIGNONPROMPT_CLASSNAME "Single Sign-On Prompt"
95 #define NS_SINGLESIGNONPROMPT_CONTRACTID "@mozilla.org/wallet/single-sign-on-prompt;1"
96
97 %}