Visit Mozilla.org

nsIAutoCompleteSearch

From MDC

This article covers features introduced in Firefox 3


The nsIAutoCompleteSearch interface is implemented by database services to start and stop autocomplete. Users call startSearch() and pass in an nsIAutoCompleteObserver when the search starts. Results can be sent to the listener either synchronously or asynchronously, depending on the implementation.

Contents

nsIAutoCompleteSearch is defined in toolkit/components/autocomplete/public/nsIAutoCompleteSearch.idl. It is scriptable and unfrozen (hasn't changed since Mozilla 1.7).

Inherits from: nsISupports

[edit] Method overview

void startSearch(in AString searchString, in AString searchParam, in nsIAutoCompleteResult previousResult, in nsIAutoCompleteObserver listener);
void stopSearch();

[edit] Methods

[edit] startSearch()

Search for a given string and notify a listener (either synchronously or asynchronously) of the result.

 startSearch(AString searchString,
             AString searchParam,
             nsIAutoCompleteResult previousResult,
             nsIAutoCompleteObserver listener);
[edit] Parameters
searchString
The string to search for.
searchParam
An extra parameter. Optional.
previousResult
The previous nsIAutoCompleteResult to use for faster searching. Optional
listener
An nsIAutoCompleteObserver listener to notify when the search is complete.

[edit] stopSearch()

Stop all searches that are in progress.

 void stopSearch();
[edit] Parameters

None.

[edit] See also