Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
* vim: sw=2 ts=2 sts=2
3
* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "nsISupports.idl"
8
9
interface nsIURI;
10
11
/**
12
* This interface provides some constants used by the Places AutoComplete
13
* search provider as well as methods to track opened pages for AutoComplete
14
* purposes.
15
*/
16
[scriptable, uuid(61b6348a-09e1-4810-8057-f8cb3cec6ef8)]
17
interface mozIPlacesAutoComplete : nsISupports
18
{
19
//////////////////////////////////////////////////////////////////////////////
20
//// Matching Constants
21
22
// A few of these are not used in Firefox, but are still referenced in
23
// comm-central.
24
25
/**
26
* Match anywhere in each searchable term.
27
*/
28
const long MATCH_ANYWHERE = 0;
29
30
/**
31
* Match first on word boundaries, and if we do not get enough results, then
32
* match anywhere in each searchable term.
33
*/
34
const long MATCH_BOUNDARY_ANYWHERE = 1;
35
36
/**
37
* Match on word boundaries in each searchable term.
38
*/
39
const long MATCH_BOUNDARY = 2;
40
41
/**
42
* Match only the beginning of each search term.
43
*/
44
const long MATCH_BEGINNING = 3;
45
46
/**
47
* Match anywhere in each searchable term without doing any transformation
48
* or stripping on the underlying data.
49
*/
50
const long MATCH_ANYWHERE_UNMODIFIED = 4;
51
52
/**
53
* Match only the beginning of each search term using a case sensitive
54
* comparator.
55
*/
56
const long MATCH_BEGINNING_CASE_SENSITIVE = 5;
57
58
//////////////////////////////////////////////////////////////////////////////
59
//// Search Behavior Constants
60
61
/**
62
* Search through history.
63
*/
64
const long BEHAVIOR_HISTORY = 1 << 0;
65
66
/**
67
* Search though bookmarks.
68
*/
69
const long BEHAVIOR_BOOKMARK = 1 << 1;
70
71
/**
72
* Search through tags.
73
*/
74
const long BEHAVIOR_TAG = 1 << 2;
75
76
/**
77
* Search the title of pages.
78
*/
79
const long BEHAVIOR_TITLE = 1 << 3;
80
81
/**
82
* Search the URL of pages.
83
*/
84
const long BEHAVIOR_URL = 1 << 4;
85
86
/**
87
* Search for typed pages.
88
* No more supported by Firefox, it is still being used by comm-central clients.
89
*/
90
const long BEHAVIOR_TYPED = 1 << 5;
91
92
/**
93
* Search javascript: URLs.
94
*/
95
const long BEHAVIOR_JAVASCRIPT = 1 << 6;
96
97
/**
98
* Search for pages that have been marked as being opened, such as a tab
99
* in a tabbrowser.
100
*/
101
const long BEHAVIOR_OPENPAGE = 1 << 7;
102
103
/**
104
* Use intersection between history, typed, bookmark, tag and openpage
105
* instead of union, when the restrict bit is set.
106
*/
107
const long BEHAVIOR_RESTRICT = 1 << 8;
108
109
/**
110
* Include search suggestions from the currently selected search provider.
111
*/
112
const long BEHAVIOR_SEARCH = 1 << 9;
113
114
/**
115
* Populate list of Preloaded Sites from JSON.
116
*
117
* @param sites
118
* Array of [url,title] to populate from.
119
*/
120
void populatePreloadedSiteStorage(in jsval sites);
121
};