1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/places/mozIPlacesAutoComplete.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,123 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: sw=2 ts=2 sts=2 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIURI; 1.13 + 1.14 +/** 1.15 + * This interface provides some constants used by the Places AutoComplete 1.16 + * search provider as well as methods to track opened pages for AutoComplete 1.17 + * purposes. 1.18 + */ 1.19 +[scriptable, uuid(3bf895a0-d6d9-4ba7-b8db-f2f0e0f32d23)] 1.20 +interface mozIPlacesAutoComplete : nsISupports 1.21 +{ 1.22 + ////////////////////////////////////////////////////////////////////////////// 1.23 + //// Matching Constants 1.24 + 1.25 + /** 1.26 + * Match anywhere in each searchable term. 1.27 + */ 1.28 + const long MATCH_ANYWHERE = 0; 1.29 + 1.30 + /** 1.31 + * Match first on word boundaries, and if we do not get enough results, then 1.32 + * match anywhere in each searchable term. 1.33 + */ 1.34 + const long MATCH_BOUNDARY_ANYWHERE = 1; 1.35 + 1.36 + /** 1.37 + * Match on word boundaries in each searchable term. 1.38 + */ 1.39 + const long MATCH_BOUNDARY = 2; 1.40 + 1.41 + /** 1.42 + * Match only the beginning of each search term. 1.43 + */ 1.44 + const long MATCH_BEGINNING = 3; 1.45 + 1.46 + /** 1.47 + * Match anywhere in each searchable term without doing any transformation 1.48 + * or stripping on the underlying data. 1.49 + */ 1.50 + const long MATCH_ANYWHERE_UNMODIFIED = 4; 1.51 + 1.52 + /** 1.53 + * Match only the beginning of each search term using a case sensitive 1.54 + * comparator. 1.55 + */ 1.56 + const long MATCH_BEGINNING_CASE_SENSITIVE = 5; 1.57 + 1.58 + ////////////////////////////////////////////////////////////////////////////// 1.59 + //// Search Behavior Constants 1.60 + 1.61 + /** 1.62 + * Search through history. 1.63 + */ 1.64 + const long BEHAVIOR_HISTORY = 1 << 0; 1.65 + 1.66 + /** 1.67 + * Search though bookmarks. 1.68 + */ 1.69 + const long BEHAVIOR_BOOKMARK = 1 << 1; 1.70 + 1.71 + /** 1.72 + * Search through tags. 1.73 + */ 1.74 + const long BEHAVIOR_TAG = 1 << 2; 1.75 + 1.76 + /** 1.77 + * Search the title of pages. 1.78 + */ 1.79 + const long BEHAVIOR_TITLE = 1 << 3; 1.80 + 1.81 + /** 1.82 + * Search the URL of pages. 1.83 + */ 1.84 + const long BEHAVIOR_URL = 1 << 4; 1.85 + 1.86 + /** 1.87 + * Search for typed pages. 1.88 + */ 1.89 + const long BEHAVIOR_TYPED = 1 << 5; 1.90 + 1.91 + /** 1.92 + * Search javascript: URLs. 1.93 + */ 1.94 + const long BEHAVIOR_JAVASCRIPT = 1 << 6; 1.95 + 1.96 + /** 1.97 + * Search for pages that have been marked as being opened, such as a tab 1.98 + * in a tabbrowser. 1.99 + */ 1.100 + const long BEHAVIOR_OPENPAGE = 1 << 7; 1.101 + 1.102 + /** 1.103 + * Mark a page as being currently open. 1.104 + * 1.105 + * @note Pages will not be automatically unregistered when Private Browsing 1.106 + * mode is entered or exited. Therefore, consumers MUST unregister or 1.107 + * register themselves. 1.108 + * 1.109 + * @param aURI 1.110 + * The URI to register as an open page. 1.111 + */ 1.112 + void registerOpenPage(in nsIURI aURI); 1.113 + 1.114 + /** 1.115 + * Mark a page as no longer being open (either by closing the window or tab, 1.116 + * or by navigating away from that page). 1.117 + * 1.118 + * @note Pages will not be automatically unregistered when Private Browsing 1.119 + * mode is entered or exited. Therefore, consumers MUST unregister or 1.120 + * register themselves. 1.121 + * 1.122 + * @param aURI 1.123 + * The URI to unregister as an open page. 1.124 + */ 1.125 + void unregisterOpenPage(in nsIURI aURI); 1.126 +};