sbSearchSuggester.js File Reference

Go to the source code of this file.

Functions

function AutoCompleteResult (searchString, defaultIndex, errorDescription, results, comments)
 
function SearchSuggester ()
 
function NSGetModule (componentManager, location)
 

Variables

const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled"
 
const XPCOM_SHUTDOWN_TOPIC = "xpcom-shutdown"
 
const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed"
 
const SONGBIRD_DATAREMOTE_CONTRACTID = "@songbirdnest.com/Songbird/DataRemote;1"
 
const sbIDataRemote = Components.interfaces.sbIDataRemote
 
const SEARCH_SUGGEST_CONTRACTID
 
const SEARCH_SUGGEST_CLASSNAME = "Songbird Search Suggestions"
 
const SEARCH_SUGGEST_CLASSID
 
const SEARCH_BUNDLE = "chrome://songbird/locale/songbird.properties"
 
const Cc = Components.classes
 
const Ci = Components.interfaces
 
const Cr = Components.results
 
AutoCompleteResult prototype
 
var gModule
 

Detailed Description

BEGIN SONGBIRD GPL

This file is part of the Songbird web player.

Copyright(c) 2005-2008 POTI, Inc. http://songbirdnest.com

This file may be licensed under the terms of of the GNU General Public License Version 2 (the "GPL").

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the GPL for the specific language governing rights and limitations.

You should have received a copy of the GPL along with this program. If not, go to http://www.gnu.org/licenses/gpl.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

END SONGBIRD GPL

Provides autocomplete suggestions based on player state/context Originally based on the Mozilla nsSearchSuggestions.js implementation

Definition in file sbSearchSuggester.js.

Function Documentation

function AutoCompleteResult (   searchString,
  defaultIndex,
  errorDescription,
  results,
  comments 
)

AutoCompleteResult contains the results returned by the Suggest service - it implements nsIAutoCompleteResult and is used by the auto- complete controller to populate the front end.

Definition at line 62 of file sbSearchSuggester.js.

function NSGetModule (   componentManager,
  location 
)

Entry point for registering the components supplied by this JavaScript module.

Parameters
componentManagerthe XPCOM component manager
locationthe location of this module on disk

Definition at line 524 of file sbSearchSuggester.js.

Here is the call graph for this function:

function SearchSuggester ( )

Implements nsIAutoCompleteSearch to provide suggestions based on Songbird's state.

To access this suggester set autocompletesearch="songbird-autocomplete" on an autocomplete textbox. See the search.xml binding for details.

Definition at line 228 of file sbSearchSuggester.js.

Here is the caller graph for this function:

Variable Documentation

const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled"

Definition at line 35 of file sbSearchSuggester.js.

const Cc = Components.classes

Definition at line 51 of file sbSearchSuggester.js.

Definition at line 52 of file sbSearchSuggester.js.

const Cr = Components.results

Definition at line 53 of file sbSearchSuggester.js.

var gModule

Definition at line 451 of file sbSearchSuggester.js.

const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed"

Definition at line 37 of file sbSearchSuggester.js.

SearchSuggester prototype

Definition at line 73 of file sbSearchSuggester.js.

const sbIDataRemote = Components.interfaces.sbIDataRemote

Definition at line 40 of file sbSearchSuggester.js.

const SEARCH_BUNDLE = "chrome://songbird/locale/songbird.properties"

Definition at line 49 of file sbSearchSuggester.js.

const SEARCH_SUGGEST_CLASSID
Initial value:
=
Components.ID("{0be64502-ee00-11db-8314-0800200c9a66}")

Definition at line 46 of file sbSearchSuggester.js.

const SEARCH_SUGGEST_CLASSNAME = "Songbird Search Suggestions"

Definition at line 45 of file sbSearchSuggester.js.

const SEARCH_SUGGEST_CONTRACTID
Initial value:
=
"@mozilla.org/autocomplete/search;1?name=songbird-autocomplete"

Definition at line 43 of file sbSearchSuggester.js.

const SONGBIRD_DATAREMOTE_CONTRACTID = "@songbirdnest.com/Songbird/DataRemote;1"

Definition at line 39 of file sbSearchSuggester.js.

const XPCOM_SHUTDOWN_TOPIC = "xpcom-shutdown"

Definition at line 36 of file sbSearchSuggester.js.