Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface nsIAutoCompleteResult;
8 interface nsIAutoCompleteObserver;
10 [scriptable, uuid(DE8DB85F-C1DE-4d87-94BA-7844890F91FE)]
11 interface nsIAutoCompleteSearch : nsISupports
12 {
13 /*
14 * Search for a given string and notify a listener (either synchronously
15 * or asynchronously) of the result
16 *
17 * @param searchString - The string to search for
18 * @param searchParam - An extra parameter
19 * @param previousResult - A previous result to use for faster searching
20 * @param listener - A listener to notify when the search is complete
21 */
22 void startSearch(in AString searchString,
23 in AString searchParam,
24 in nsIAutoCompleteResult previousResult,
25 in nsIAutoCompleteObserver listener);
27 /*
28 * Stop all searches that are in progress
29 */
30 void stopSearch();
31 };
33 [scriptable, uuid(8bd1dbbc-dcce-4007-9afa-b551eb687b61)]
34 interface nsIAutoCompleteObserver : nsISupports
35 {
36 /*
37 * Called when a search is complete and the results are ready
38 *
39 * @param search - The search object that processed this search
40 * @param result - The search result object
41 */
42 void onSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result);
44 /*
45 * Called to update with new results
46 *
47 * @param search - The search object that processed this search
48 * @param result - The search result object
49 */
50 void onUpdateSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result);
51 };
53 [scriptable, uuid(02314d6e-b730-40cc-a215-221554d77064)]
54 interface nsIAutoCompleteSearchDescriptor : nsISupports
55 {
56 // The search is started after the timeout specified by the corresponding
57 // nsIAutoCompleteInput implementation.
58 const unsigned short SEARCH_TYPE_DELAYED = 0;
59 // The search is started synchronously, before any delayed searches.
60 const unsigned short SEARCH_TYPE_IMMEDIATE = 1;
62 /**
63 * Identifies the search behavior.
64 * Should be one of the SEARCH_TYPE_* constants above.
65 * Defaults to SEARCH_TYPE_DELAYED.
66 */
67 readonly attribute unsigned short searchType;
68 };