1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
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/
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
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by Netscape are Copyright (C) 2002
20 * Netscape Communications Corporation. All Rights Reserved.
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.
36 * ***** END LICENSE BLOCK ***** */
38 #include
"nsISupports.idl"
41 * An optional interface for obtaining fields of
42 * logins that were collected by the password manager
47 [scriptable
, uuid(a448531f
-dc92
-4dc1
-9012-da841febcbe0
)]
48 interface nsIPasswordManagerInternal
: nsISupports
52 * A Call to find a login in the password manager list that matches the
53 * specified parameters. If any input parameter is null, it is
54 * not tested for when looking for the match.
56 * @param aHostURI The uri part of a login to search for, or null
57 * @param aUsername The username part of a login to search for, or null
58 * @param aPassword The password part of a login to search for, or null
59 * @param aHostURIFound The uri found in the login
60 * @param aUsernameFound The username found in the login
61 * @param aPasswordFound The password found in the login
63 void findPasswordEntry
64 (in AUTF8String aHostURI
, in AString aUsername
, in AString aPassword
,
65 out AUTF8String aHostURIFound
, out AString aUsernameFound
, out AString aPasswordFound
);
68 * Called to add an individual login to the list of saved logins.
69 * All parameters are clear text.
71 * @param aKey The key for which the login is being remembered (often the page URI)
72 * @param aUser The username portion of the login
73 * @param aPassword The password portion of the login
74 * @param aUserFieldName The name of the field that contained the username
75 * @param aPassFieldName The name of the field that contained the password
77 void addUserFull
(in AUTF8String aKey
,
80 in AString aUserFieldName
,
81 in AString aPassFieldName
);
83 void addUserFull2
(in AUTF8String aKey
,
86 in AString aUserFieldName
,
87 in AString aPassFieldName
,
88 in AUTF8String ActionURL
);
91 * Reads logins from a Mozilla Password Manager file, augmenting the current
92 * in-memory set. If a duplicate entry is encountered, the data from the file
93 * being read replaces that currently held.
95 * @param aPasswordFile The file to read logins from.
97 void readPasswords
(in nsIFile aPasswordFile
);