Bug 443880. Comment-only change to IDL. r=me, b=443880
[wine-gecko.git] / toolkit / components / passwordmgr / public / nsILoginInfo.idl
blobb905cf61270debc6e6a2fa1b32e66a52e7dcb8cb
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is mozilla.org code.
16 * The Initial Developer of the Original Code is Mozilla Corporation.
17 * Portions created by the Initial Developer are Copyright (C) 2007
18 * the Initial Developer. All Rights Reserved.
20 * Contributor(s):
21 * Justin Dolske <dolske@mozilla.com> (original author)
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
40 [scriptable, uuid(9c87a9bd-bf8b-4fae-bdb8-70513b2877df)]
42 /**
43 * An object containing information for a login stored by the
44 * password manager.
46 interface nsILoginInfo : nsISupports {
47 /**
48 * The hostname the login applies to.
50 * The hostname should be formatted as an URL. For example,
51 * "https://site.com", "http://site.com:1234", "ftp://ftp.site.com".
53 attribute AString hostname;
55 /**
56 * The URL a form-based login was submitted to.
58 * For logins obtained from HTML forms, this field is the |action|
59 * attribute from the |form| element, with the path removed. For
60 * example "http://www.site.com". [Forms with no |action| attribute
61 * default to submitting to their origin URL, so we store that.]
63 * For logins obtained from a HTTP or FTP protocol authentication,
64 * this field is NULL.
66 attribute AString formSubmitURL;
68 /**
69 * The HTTP Realm a login was requested for.
71 * When an HTTP server sends a 401 result, the WWW-Authenticate
72 * header includes a realm to identify the "protection space." See
73 * RFC2617. If the response sent has a missing or blank realm, the
74 * hostname is used instead.
76 * For logins obtained from HTML forms, this field is NULL.
78 attribute AString httpRealm;
80 /**
81 * The username for the login.
83 attribute AString username;
85 /**
86 * The |name| attribute for the username input field.
88 * For logins obtained from a HTTP or FTP protocol authentication,
89 * this field is an empty string.
91 attribute AString usernameField;
93 /**
94 * The password for the login.
96 attribute AString password;
98 /**
99 * The |name| attribute for the password input field.
101 * For logins obtained from a HTTP or FTP protocol authentication,
102 * this field is an empty string.
104 attribute AString passwordField;
107 * Initialize a newly created nsLoginInfo object.
109 * The arguments are the fields for the new object.
111 void init(in AString aHostname,
112 in AString aFormSubmitURL, in AString aHttpRealm,
113 in AString aUsername, in AString aPassword,
114 in AString aUsernameField, in AString aPasswordField);
117 * Test for strict equality with another nsILoginInfo object.
119 * @param aLoginInfo
120 * The other object to test.
122 boolean equals(in nsILoginInfo aLoginInfo);
125 * Test for loose equivalency with another nsILoginInfo object. The
126 * passwordField and usernameField values are ignored, and the password
127 * values may be optionally ignored. If one login's formSubmitURL is an
128 * empty string (but not null), it will be treated as a wildcard. [The
129 * blank value indicates the login was stored before bug 360493 was fixed.]
131 * @param aLoginInfo
132 * The other object to test.
133 * @param ignorePassword
134 * If true, ignore the password when checking for match.
136 boolean matches(in nsILoginInfo aLoginInfo, in boolean ignorePassword);
139 %{C++
141 #define NS_LOGININFO_CONTRACTID "@mozilla.org/login-manager/loginInfo;1"