Inherits from: nsISupports
void addParam(in AString name, in AString value, in AString responseType); |
nsISearchSubmission getSubmission(in AString data, [optional] in AString responseType, [optional] in AString purpose ); |
boolean supportsResponseType(in AString responseType); |
Attribute | Type | Description |
alias |
AString |
An optional shortcut alias for the engine. When non-null , this is a unique identifier. |
description |
AString |
A text description describing the engine. Read only. |
hidden |
boolean |
Whether the engine should be hidden from the user. |
iconURI |
|
A nsIURI corresponding to the engine's icon, stored locally. May be null . Read only. |
name |
AString |
The display name of the search engine. This is a unique identifier. Read only. |
searchForm |
AString |
A URL string pointing to the engine's search form. Read only. |
type |
long |
The search engine type . Read only. |
Constant | Value | Description |
TYPE_MOZSEARCH |
1 |
|
TYPE_SHERLOCK |
2 |
|
TYPE_OPENSEARCH |
3 |
Constant | Value | Description |
DATA_XML |
1 |
Data type is XML |
DATA_TEXT |
2 |
Data type is Text. |
Adds a parameter to the search engine's submission data. This should only be called on engines created via nsIBrowserSearchService.addEngineWithDetails()
.
void addParam( in AString name, in AString value, in AString responseType );
name
value
null
.responseType
null
, will default to "text/html"NS_ERROR_INVALID_ARG
name
or value are null
.NS_ERROR_FAILURE
Gets a nsISearchSubmission
object that contains information about what to send to the search engine, including the URI and postData, if applicable.
nsISearchSubmission getSubmission( in AString data, [optional] in AString responseType, [optional] in AString purpose );
data
responseType
type
that we'd like to receive in response to this submission. If null
, will default to "text/html".purpose
nsISearchSubmission
depending on e.g. where the search is triggered in the UI. Possible values depend on the application's installed search engines.Determines whether the engine can return responses in the given MIME type
.
boolean supportsResponseType( in AString responseType );
responseType
type
to check for.Returns true
if the engine spec has a URL with the given responseType, false
otherwise.