Struct xpcom::interfaces::nsISearchEngine
[−]
[src]
#[repr(C)]pub struct nsISearchEngine { /* fields omitted */ }
interface nsISearchEngine : nsISupports
Methods
impl nsISearchEngine
[src]
pub fn coerce<T: nsISearchEngineCoerce>(&self) -> &T
[src]
Cast this nsISearchEngine
to one of its base interfaces.
impl nsISearchEngine
[src]
pub unsafe fn GetSubmission(
&self,
data: &nsAString,
responseType: &nsAString,
purpose: &nsAString,
_retval: *mut *const nsISearchSubmission
) -> nsresult
[src]
&self,
data: &nsAString,
responseType: &nsAString,
purpose: &nsAString,
_retval: *mut *const nsISearchSubmission
) -> nsresult
/**
* Gets a nsISearchSubmission object that contains information about what to
* send to the search engine, including the URI and postData, if applicable.
*
* @param data
* Data to add to the submission object.
* i.e. the search terms.
*
* @param responseType [optional]
* The MIME type that we'd like to receive in response
* to this submission. If null, will default to "text/html".
*
* @param purpose [optional]
* A string meant to indicate the context of the search request. This
* allows the search service to provide a different nsISearchSubmission
* depending on e.g. where the search is triggered in the UI.
*
* @returns A nsISearchSubmission object that contains information about what
* to send to the search engine. If no submission can be
* obtained for the given responseType, returns null.
*/
nsISearchSubmission getSubmission (in AString data, [optional] in AString responseType, [optional] in AString purpose);
pub unsafe fn AddParam(
&self,
name: &nsAString,
value: &nsAString,
responseType: &nsAString
) -> nsresult
[src]
&self,
name: &nsAString,
value: &nsAString,
responseType: &nsAString
) -> nsresult
/**
* Adds a parameter to the search engine's submission data. This should only
* be called on engines created via addEngineWithDetails.
*
* @param name
* The parameter's name. Must not be null.
*
* @param value
* The value to pass. If value is "{searchTerms}", it will be
* substituted with the user-entered data when retrieving the
* submission. Must not be null.
*
* @param responseType
* Since an engine can have several different request URLs,
* differentiated by response types, this parameter selects
* a request to add parameters to. If null, will default
* to "text/html"
*
* @throws NS_ERROR_FAILURE if the search engine is read-only.
* @throws NS_ERROR_INVALID_ARG if name or value are null.
*/
void addParam (in AString name, in AString value, in AString responseType);
pub unsafe fn SupportsResponseType(
&self,
responseType: &nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
responseType: &nsAString,
_retval: *mut bool
) -> nsresult
/**
* Determines whether the engine can return responses in the given
* MIME type. Returns true if the engine spec has a URL with the
* given responseType, false otherwise.
*
* @param responseType
* The MIME type to check for
*/
boolean supportsResponseType (in AString responseType);
pub unsafe fn GetIconURLBySize(
&self,
width: int32_t,
height: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
width: int32_t,
height: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Returns a string with the URL to an engine's icon matching both width and
* height. Returns null if icon with specified dimensions is not found.
*
* @param width
* Width of the requested icon.
* @param height
* Height of the requested icon.
*/
AString getIconURLBySize (in long width, in long height);
pub unsafe fn GetAlias(&self, aAlias: &mut nsAString) -> nsresult
[src]
/**
* An optional shortcut alias for the engine.
* When non-null, this is a unique identifier.
*/
attribute AString alias;
pub unsafe fn SetAlias(&self, aAlias: &nsAString) -> nsresult
[src]
/**
* An optional shortcut alias for the engine.
* When non-null, this is a unique identifier.
*/
attribute AString alias;
pub unsafe fn GetDescription(&self, aDescription: &mut nsAString) -> nsresult
[src]
/**
* A text description describing the engine.
*/
readonly attribute AString description;
pub unsafe fn GetHidden(&self, aHidden: *mut bool) -> nsresult
[src]
/**
* Whether the engine should be hidden from the user.
*/
attribute boolean hidden;
pub unsafe fn SetHidden(&self, aHidden: bool) -> nsresult
[src]
/**
* Whether the engine should be hidden from the user.
*/
attribute boolean hidden;
pub unsafe fn GetIconURI(&self, aIconURI: *mut *const nsIURI) -> nsresult
[src]
/**
* A nsIURI corresponding to the engine's icon, stored locally. May be null.
*/
readonly attribute nsIURI iconURI;
pub unsafe fn GetName(&self, aName: &mut nsAString) -> nsresult
[src]
/**
* The display name of the search engine. This is a unique identifier.
*/
readonly attribute AString name;
pub unsafe fn GetSearchForm(&self, aSearchForm: &mut nsAString) -> nsresult
[src]
/**
* A URL string pointing to the engine's search form.
*/
readonly attribute AString searchForm;
pub unsafe fn GetIdentifier(&self, aIdentifier: &mut nsAString) -> nsresult
[src]
/**
* An optional unique identifier for this search engine within the context of
* the distribution, as provided by the distributing entity.
*/
readonly attribute AString identifier;
pub unsafe fn GetResultDomain(
&self,
responseType: &nsAString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
responseType: &nsAString,
_retval: &mut nsAString
) -> nsresult
/**
* Gets a string representing the hostname from which search results for a
* given responseType are returned, minus the leading "www." (if present).
* This can be specified as an url attribute in the engine description file,
* but will default to host from the <Url>'s template otherwise.
*
* @param responseType [optional]
* The MIME type to get resultDomain for. Defaults to "text/html".
*
* @return the resultDomain for the given responseType.
*/
AString getResultDomain ([optional] in AString responseType);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsISearchEngine
[src]
const IID: nsIID
IID: nsIID = nsID(1644943648, 1169, 18632, [153, 168, 214, 4, 126, 100, 128, 45])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsISearchEngine
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsISearchEngine
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.