toolkit/components/places/mozIPlacesAutoComplete.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     7 #include "nsISupports.idl"
     9 interface nsIURI;
    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(3bf895a0-d6d9-4ba7-b8db-f2f0e0f32d23)]
    17 interface mozIPlacesAutoComplete : nsISupports
    18 {
    19   //////////////////////////////////////////////////////////////////////////////
    20   //// Matching Constants
    22   /**
    23    * Match anywhere in each searchable term.
    24    */
    25   const long MATCH_ANYWHERE = 0;
    27   /**
    28    * Match first on word boundaries, and if we do not get enough results, then
    29    * match anywhere in each searchable term.
    30    */
    31   const long MATCH_BOUNDARY_ANYWHERE = 1;
    33   /**
    34    * Match on word boundaries in each searchable term.
    35    */
    36   const long MATCH_BOUNDARY = 2;
    38   /**
    39    * Match only the beginning of each search term.
    40    */
    41   const long MATCH_BEGINNING = 3;
    43   /**
    44    * Match anywhere in each searchable term without doing any transformation
    45    * or stripping on the underlying data.
    46    */
    47   const long MATCH_ANYWHERE_UNMODIFIED = 4;
    49   /**
    50    * Match only the beginning of each search term using a case sensitive
    51    * comparator.
    52    */
    53   const long MATCH_BEGINNING_CASE_SENSITIVE = 5;
    55   //////////////////////////////////////////////////////////////////////////////
    56   //// Search Behavior Constants
    58   /**
    59    * Search through history.
    60    */
    61   const long BEHAVIOR_HISTORY = 1 << 0;
    63   /**
    64    * Search though bookmarks.
    65    */
    66   const long BEHAVIOR_BOOKMARK = 1 << 1;
    68   /**
    69    * Search through tags.
    70    */
    71   const long BEHAVIOR_TAG = 1 << 2;
    73   /**
    74    * Search the title of pages.
    75    */
    76   const long BEHAVIOR_TITLE = 1 << 3;
    78   /**
    79    * Search the URL of pages.
    80    */
    81   const long BEHAVIOR_URL = 1 << 4;
    83   /**
    84    * Search for typed pages.
    85    */
    86   const long BEHAVIOR_TYPED = 1 << 5;
    88   /**
    89    * Search javascript: URLs.
    90    */
    91   const long BEHAVIOR_JAVASCRIPT = 1 << 6;
    93   /**
    94    * Search for pages that have been marked as being opened, such as a tab
    95    * in a tabbrowser.
    96    */
    97   const long BEHAVIOR_OPENPAGE = 1 << 7;
    99   /**
   100    * Mark a page as being currently open.
   101    *
   102    * @note Pages will not be automatically unregistered when Private Browsing
   103    *       mode is entered or exited.  Therefore, consumers MUST unregister or
   104    *       register themselves.
   105    *
   106    * @param aURI
   107    *        The URI to register as an open page.
   108    */
   109   void registerOpenPage(in nsIURI aURI);
   111   /**
   112    * Mark a page as no longer being open (either by closing the window or tab,
   113    * or by navigating away from that page).
   114    *
   115    * @note Pages will not be automatically unregistered when Private Browsing
   116    *       mode is entered or exited.  Therefore, consumers MUST unregister or
   117    *       register themselves.
   118    *
   119    * @param aURI
   120    *        The URI to unregister as an open page.
   121    */
   122   void unregisterOpenPage(in nsIURI aURI);
   123 };

mercurial