p=Sylvain Pasche <sylvain.pasche@gmail.com>
r=dolske/gavin
This commit is contained in:
asqueella%gmail.com 2007-07-17 20:48:57 +00:00
Родитель f546f591b4
Коммит 32394c2e8d
3 изменённых файлов: 222 добавлений и 222 удалений

Просмотреть файл

@ -118,25 +118,25 @@ interface nsILoginInfo : nsISupports {
in AString aUsernameField, in AString aPasswordField); in AString aUsernameField, in AString aPasswordField);
/** /**
* Test for equality with another nsILoginInfo object. * Test for equality with another nsILoginInfo object.
* *
* @param aLoginInfo * @param aLoginInfo
* The other object to test. * The other object to test.
* *
* NOTE: The formSubmitURL field is not strictly checked. A blank (but * NOTE: The formSubmitURL field is not strictly checked. A blank (but
* not NULL) value will match any value (except null) in the other * not NULL) value will match any value (except null) in the other
* object's formSubmitURL field. The blank value indicates the login * object's formSubmitURL field. The blank value indicates the login
* was stored before bug 360493 was fixed. * was stored before bug 360493 was fixed.
*/ */
boolean equals(in nsILoginInfo aLoginInfo); boolean equals(in nsILoginInfo aLoginInfo);
/** /**
* Test for equality with another nsILoginInfo object, with the * Test for equality with another nsILoginInfo object, with the
* password fields ignored. * password fields ignored.
* *
* @param aLoginInfo * @param aLoginInfo
* The other object to test. * The other object to test.
*/ */
boolean equalsIgnorePassword(in nsILoginInfo aLoginInfo); boolean equalsIgnorePassword(in nsILoginInfo aLoginInfo);
}; };

Просмотреть файл

@ -47,146 +47,146 @@ interface nsIDOMHTMLInputElement;
interface nsILoginManager : nsISupports { interface nsILoginManager : nsISupports {
/** /**
* Store a new login in the login manager. * Store a new login in the login manager.
* *
* @param aLogin * @param aLogin
* The login to be added. * The login to be added.
*/ */
void addLogin(in nsILoginInfo aLogin); void addLogin(in nsILoginInfo aLogin);
/** /**
* Remove a login from the login manager. * Remove a login from the login manager.
* *
* @param aLogin * @param aLogin
* The login to be removed. * The login to be removed.
*/ */
void removeLogin(in nsILoginInfo aLogin); void removeLogin(in nsILoginInfo aLogin);
/** /**
* Modify an existing login in the login manager. * Modify an existing login in the login manager.
* *
* @param aLogin * @param aLogin
* The login to be modified. * The login to be modified.
*/ */
void modifyLogin(in nsILoginInfo oldLogin, in nsILoginInfo newLogin); void modifyLogin(in nsILoginInfo oldLogin, in nsILoginInfo newLogin);
/** /**
* Remove all logins known to login manager. * Remove all logins known to login manager.
* *
* The browser sanitization feature allows the user to clear any stored * The browser sanitization feature allows the user to clear any stored
* passwords. This interface allows that to be done without getting each * passwords. This interface allows that to be done without getting each
* login first (which might require knowing the master password). * login first (which might require knowing the master password).
* *
*/ */
void removeAllLogins(); void removeAllLogins();
/** /**
* Fetch all logins in the login manager. An array is always returned; * Fetch all logins in the login manager. An array is always returned;
* if there are no logins the array is empty. * if there are no logins the array is empty.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |getAllLogins({})| * this out param. For example: |getAllLogins({})|
* @param logins * @param logins
* An array of nsILoginInfo objects. * An array of nsILoginInfo objects.
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.getAllLogins({}); * var logins = pwmgr.getAllLogins({});
* (|logins| is an array). * (|logins| is an array).
*/ */
void getAllLogins(out unsigned long count, void getAllLogins(out unsigned long count,
[retval, array, size_is(count)] out nsILoginInfo logins); [retval, array, size_is(count)] out nsILoginInfo logins);
/** /**
* Obtain a list of all hosts for which password saving is disabled. * Obtain a list of all hosts for which password saving is disabled.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |getAllDisabledHosts({})| * this out param. For example: |getAllDisabledHosts({})|
* @param hostnames * @param hostnames
* An array of hostname strings, in origin URL format without a * An array of hostname strings, in origin URL format without a
* pathname. For example: "https://www.site.com". * pathname. For example: "https://www.site.com".
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.getDisabledAllLogins({}); * var logins = pwmgr.getDisabledAllLogins({});
*/ */
void getAllDisabledHosts(out unsigned long count, void getAllDisabledHosts(out unsigned long count,
[retval, array, size_is(count)] out wstring hostnames); [retval, array, size_is(count)] out wstring hostnames);
/** /**
* Check to see if saving logins has been disabled for a host. * Check to see if saving logins has been disabled for a host.
* *
* @param aHost * @param aHost
* The hostname to check. This argument should be in the origin * The hostname to check. This argument should be in the origin
* URL format, without a pathname. For example: "http://foo.com". * URL format, without a pathname. For example: "http://foo.com".
*/ */
boolean getLoginSavingEnabled(in AString aHost); boolean getLoginSavingEnabled(in AString aHost);
/** /**
* Disable (or enable) storing logins for the specified host. When * Disable (or enable) storing logins for the specified host. When
* disabled, the login manager will not prompt to store logins for * disabled, the login manager will not prompt to store logins for
* that host. Existing logins are not affected. * that host. Existing logins are not affected.
* *
* @param aHost * @param aHost
* The hostname to set. This argument should be in the origin * The hostname to set. This argument should be in the origin
* URL format, without a pathname. For example: "http://foo.com". * URL format, without a pathname. For example: "http://foo.com".
* @param isEnabled * @param isEnabled
* Specify if saving logins should be enabled (true) or * Specify if saving logins should be enabled (true) or
* disabled (false) * disabled (false)
*/ */
void setLoginSavingEnabled(in AString aHost, in boolean isEnabled); void setLoginSavingEnabled(in AString aHost, in boolean isEnabled);
/** /**
* Search for logins matching the specified criteria. Called when looking * Search for logins matching the specified criteria. Called when looking
* for logins that might be applicable to a form or authentication request. * for logins that might be applicable to a form or authentication request.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |findLogins({}, hostname, ...)| * this out param. For example: |findLogins({}, hostname, ...)|
* @param aHostname * @param aHostname
* The hostname to restict searches to. When looking for form * The hostname to restict searches to. When looking for form
* logins, this argument should be in origin URL format, without * logins, this argument should be in origin URL format, without
* a pathname. For example: "http://www.site.com". For protocol * a pathname. For example: "http://www.site.com". For protocol
* logins (http//ftp), it should be the hostname with a port * logins (http//ftp), it should be the hostname with a port
* appended. For example: "www.bar.com:443". * appended. For example: "www.bar.com:443".
* @param aActionURL * @param aActionURL
* For form logins, this argument should be the URL to which the * For form logins, this argument should be the URL to which the
* form will be submitted. For protocol logins, specify null. * form will be submitted. For protocol logins, specify null.
* @param aHttpRealm * @param aHttpRealm
* For protocol logins, this argument should be the HTTP Realm * For protocol logins, this argument should be the HTTP Realm
* for which the login applies. This is obtained from the * for which the login applies. This is obtained from the
* WWW-Authenticate header. See RFC2617. For form logins, * WWW-Authenticate header. See RFC2617. For form logins,
* specify null. * specify null.
* @param logins * @param logins
* An array of nsILoginInfo objects. * An array of nsILoginInfo objects.
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.findLogins({}, hostname, ...); * var logins = pwmgr.findLogins({}, hostname, ...);
* *
*/ */
void findLogins(out unsigned long count, in AString aHostname, void findLogins(out unsigned long count, in AString aHostname,
in AString aActionURL, in AString aHttpRealm, in AString aActionURL, in AString aHttpRealm,
[retval, array, size_is(count)] out nsILoginInfo logins); [retval, array, size_is(count)] out nsILoginInfo logins);
/** /**
* Generate results for a userfield autocomplete menu. * Generate results for a userfield autocomplete menu.
* *
* NOTE: This interface is provided for use only by the FormFillController, * NOTE: This interface is provided for use only by the FormFillController,
* which calls it directly. This isn't really ideal, it should * which calls it directly. This isn't really ideal, it should
* probably be callback registered through the FFC. * probably be callback registered through the FFC.
*/ */
nsIAutoCompleteResult autoCompleteSearch(in AString aSearchString, nsIAutoCompleteResult autoCompleteSearch(in AString aSearchString,
in nsIAutoCompleteResult aPreviousResult, in nsIAutoCompleteResult aPreviousResult,
in nsIDOMHTMLInputElement aElement); in nsIDOMHTMLInputElement aElement);

Просмотреть файл

@ -51,154 +51,154 @@ interface nsILoginInfo;
*/ */
interface nsILoginManagerStorage : nsISupports { interface nsILoginManagerStorage : nsISupports {
/** /**
* Initialize the component. Not invoked automatically. * Initialize the component. Not invoked automatically.
*/ */
void init(); void init();
/** /**
* Initialize the component, but override the default filename * Initialize the component, but override the default filename
* locations. This is primarily used to the unit tests and profile * locations. This is primarily used to the unit tests and profile
* migration. * migration.
* *
* @param aInputFile * @param aInputFile
* File to read for stored logins. * File to read for stored logins.
* @param aOutputFile * @param aOutputFile
* If non-null, file to output logins to. * If non-null, file to output logins to.
* *
*/ */
void initWithFile(in nsIFile aInputFile, in nsIFile aOutputFile); void initWithFile(in nsIFile aInputFile, in nsIFile aOutputFile);
/** /**
* Store a new login. * Store a new login.
* *
* @param aLogin * @param aLogin
* The login to be added. * The login to be added.
*/ */
void addLogin(in nsILoginInfo aLogin); void addLogin(in nsILoginInfo aLogin);
/** /**
* Remove a login from the login manager. * Remove a login from the login manager.
* *
* @param aLogin * @param aLogin
* The login to be removed. * The login to be removed.
*/ */
void removeLogin(in nsILoginInfo aLogin); void removeLogin(in nsILoginInfo aLogin);
/** /**
* Modify an existing login in the login manager. * Modify an existing login in the login manager.
* *
* @param aLogin * @param aLogin
* The login to be modified. * The login to be modified.
*/ */
void modifyLogin(in nsILoginInfo oldLogin, in nsILoginInfo newLogin); void modifyLogin(in nsILoginInfo oldLogin, in nsILoginInfo newLogin);
/** /**
* Remove all stored logins. * Remove all stored logins.
* *
* The browser sanitization feature allows the user to clear any stored * The browser sanitization feature allows the user to clear any stored
* passwords. This interface allows that to be done without getting each * passwords. This interface allows that to be done without getting each
* login first (which might require knowing the master password). * login first (which might require knowing the master password).
* *
*/ */
void removeAllLogins(); void removeAllLogins();
/** /**
* Fetch all logins in the login manager. An array is always returned; * Fetch all logins in the login manager. An array is always returned;
* if there are no logins the array is empty. * if there are no logins the array is empty.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |getAllLogins({})| * this out param. For example: |getAllLogins({})|
* @param logins * @param logins
* An array of nsILoginInfo objects. * An array of nsILoginInfo objects.
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.getAllLogins({}); * var logins = pwmgr.getAllLogins({});
* (|logins| is an array). * (|logins| is an array).
*/ */
void getAllLogins(out unsigned long count, void getAllLogins(out unsigned long count,
[retval, array, size_is(count)] out nsILoginInfo logins); [retval, array, size_is(count)] out nsILoginInfo logins);
/** /**
* Obtain a list of all hosts for which password saving is disabled. * Obtain a list of all hosts for which password saving is disabled.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |getAllDisabledHosts({})| * this out param. For example: |getAllDisabledHosts({})|
* @param hostnames * @param hostnames
* An array of hostname strings, in origin URL format without a * An array of hostname strings, in origin URL format without a
* pathname. For example: "https://www.site.com". * pathname. For example: "https://www.site.com".
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.getDisabledAllLogins({}); * var logins = pwmgr.getDisabledAllLogins({});
*/ */
void getAllDisabledHosts(out unsigned long count, void getAllDisabledHosts(out unsigned long count,
[retval, array, size_is(count)] out wstring hostnames); [retval, array, size_is(count)] out wstring hostnames);
/** /**
* Check to see if saving logins has been disabled for a host. * Check to see if saving logins has been disabled for a host.
* *
* @param aHost * @param aHost
* The hostname to check. This argument should be in the origin * The hostname to check. This argument should be in the origin
* URL format, without a pathname. For example: "http://foo.com". * URL format, without a pathname. For example: "http://foo.com".
*/ */
boolean getLoginSavingEnabled(in AString aHost); boolean getLoginSavingEnabled(in AString aHost);
/** /**
* Disable (or enable) storing logins for the specified host. When * Disable (or enable) storing logins for the specified host. When
* disabled, the login manager will not prompt to store logins for * disabled, the login manager will not prompt to store logins for
* that host. Existing logins are not affected. * that host. Existing logins are not affected.
* *
* @param aHost * @param aHost
* The hostname to set. This argument should be in the origin * The hostname to set. This argument should be in the origin
* URL format, without a pathname. For example: "http://foo.com". * URL format, without a pathname. For example: "http://foo.com".
* @param isEnabled * @param isEnabled
* Specify if saving logins should be enabled (true) or * Specify if saving logins should be enabled (true) or
* disabled (false) * disabled (false)
*/ */
void setLoginSavingEnabled(in AString aHost, in boolean isEnabled); void setLoginSavingEnabled(in AString aHost, in boolean isEnabled);
/** /**
* Search for logins matching the specified criteria. Called when looking * Search for logins matching the specified criteria. Called when looking
* for logins that might be applicable to a form or authentication request. * for logins that might be applicable to a form or authentication request.
* *
* @param count * @param count
* The number of elements in the array. JS callers can simply use * The number of elements in the array. JS callers can simply use
* the array's .length property, and supply an dummy object for * the array's .length property, and supply an dummy object for
* this out param. For example: |findLogins({}, hostname, ...)| * this out param. For example: |findLogins({}, hostname, ...)|
* @param aHostname * @param aHostname
* The hostname to restict searches to. When looking for form * The hostname to restict searches to. When looking for form
* logins, this argument should be in origin URL format, without * logins, this argument should be in origin URL format, without
* a pathname. For example: "http://www.site.com". For protocol * a pathname. For example: "http://www.site.com". For protocol
* logins (http//ftp), it should be the hostname with a port * logins (http//ftp), it should be the hostname with a port
* appended. For example: "www.bar.com:443". * appended. For example: "www.bar.com:443".
* @param aActionURL * @param aActionURL
* For form logins, this argument should be the URL to which the * For form logins, this argument should be the URL to which the
* form will be submitted. For protocol logins, specify null. * form will be submitted. For protocol logins, specify null.
* @param aHttpRealm * @param aHttpRealm
* For protocol logins, this argument should be the HTTP Realm * For protocol logins, this argument should be the HTTP Realm
* for which the login applies. This is obtained from the * for which the login applies. This is obtained from the
* WWW-Authenticate header. See RFC2617. For form logins, * WWW-Authenticate header. See RFC2617. For form logins,
* specify null. * specify null.
* @param logins * @param logins
* An array of nsILoginInfo objects. * An array of nsILoginInfo objects.
* *
* NOTE: This can be called from JS as: * NOTE: This can be called from JS as:
* var logins = pwmgr.findLogins({}, hostname, ...); * var logins = pwmgr.findLogins({}, hostname, ...);
* *
*/ */
void findLogins(out unsigned long count, in AString aHostname, void findLogins(out unsigned long count, in AString aHostname,
in AString aActionURL, in AString aHttpRealm, in AString aActionURL, in AString aHttpRealm,
[retval, array, size_is(count)] out nsILoginInfo logins); [retval, array, size_is(count)] out nsILoginInfo logins);