michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=2 sts=2 michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIURI; michael@0: michael@0: /** michael@0: * This interface provides some constants used by the Places AutoComplete michael@0: * search provider as well as methods to track opened pages for AutoComplete michael@0: * purposes. michael@0: */ michael@0: [scriptable, uuid(3bf895a0-d6d9-4ba7-b8db-f2f0e0f32d23)] michael@0: interface mozIPlacesAutoComplete : nsISupports michael@0: { michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //// Matching Constants michael@0: michael@0: /** michael@0: * Match anywhere in each searchable term. michael@0: */ michael@0: const long MATCH_ANYWHERE = 0; michael@0: michael@0: /** michael@0: * Match first on word boundaries, and if we do not get enough results, then michael@0: * match anywhere in each searchable term. michael@0: */ michael@0: const long MATCH_BOUNDARY_ANYWHERE = 1; michael@0: michael@0: /** michael@0: * Match on word boundaries in each searchable term. michael@0: */ michael@0: const long MATCH_BOUNDARY = 2; michael@0: michael@0: /** michael@0: * Match only the beginning of each search term. michael@0: */ michael@0: const long MATCH_BEGINNING = 3; michael@0: michael@0: /** michael@0: * Match anywhere in each searchable term without doing any transformation michael@0: * or stripping on the underlying data. michael@0: */ michael@0: const long MATCH_ANYWHERE_UNMODIFIED = 4; michael@0: michael@0: /** michael@0: * Match only the beginning of each search term using a case sensitive michael@0: * comparator. michael@0: */ michael@0: const long MATCH_BEGINNING_CASE_SENSITIVE = 5; michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //// Search Behavior Constants michael@0: michael@0: /** michael@0: * Search through history. michael@0: */ michael@0: const long BEHAVIOR_HISTORY = 1 << 0; michael@0: michael@0: /** michael@0: * Search though bookmarks. michael@0: */ michael@0: const long BEHAVIOR_BOOKMARK = 1 << 1; michael@0: michael@0: /** michael@0: * Search through tags. michael@0: */ michael@0: const long BEHAVIOR_TAG = 1 << 2; michael@0: michael@0: /** michael@0: * Search the title of pages. michael@0: */ michael@0: const long BEHAVIOR_TITLE = 1 << 3; michael@0: michael@0: /** michael@0: * Search the URL of pages. michael@0: */ michael@0: const long BEHAVIOR_URL = 1 << 4; michael@0: michael@0: /** michael@0: * Search for typed pages. michael@0: */ michael@0: const long BEHAVIOR_TYPED = 1 << 5; michael@0: michael@0: /** michael@0: * Search javascript: URLs. michael@0: */ michael@0: const long BEHAVIOR_JAVASCRIPT = 1 << 6; michael@0: michael@0: /** michael@0: * Search for pages that have been marked as being opened, such as a tab michael@0: * in a tabbrowser. michael@0: */ michael@0: const long BEHAVIOR_OPENPAGE = 1 << 7; michael@0: michael@0: /** michael@0: * Mark a page as being currently open. michael@0: * michael@0: * @note Pages will not be automatically unregistered when Private Browsing michael@0: * mode is entered or exited. Therefore, consumers MUST unregister or michael@0: * register themselves. michael@0: * michael@0: * @param aURI michael@0: * The URI to register as an open page. michael@0: */ michael@0: void registerOpenPage(in nsIURI aURI); michael@0: michael@0: /** michael@0: * Mark a page as no longer being open (either by closing the window or tab, michael@0: * or by navigating away from that page). michael@0: * michael@0: * @note Pages will not be automatically unregistered when Private Browsing michael@0: * mode is entered or exited. Therefore, consumers MUST unregister or michael@0: * register themselves. michael@0: * michael@0: * @param aURI michael@0: * The URI to unregister as an open page. michael@0: */ michael@0: void unregisterOpenPage(in nsIURI aURI); michael@0: };