Struct xpcom::interfaces::nsISearchEngine [] [src]

#[repr(C)]
pub struct nsISearchEngine { /* fields omitted */ }

interface nsISearchEngine : nsISupports

Methods

impl nsISearchEngine
[src]

[src]

Cast this nsISearchEngine to one of its base interfaces.

impl nsISearchEngine
[src]

[src]

/**
   * 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);

[src]

/**
   * 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);

[src]

/**
   * 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);

[src]

/**
   * 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);

[src]

/**
   * An optional shortcut alias for the engine.
   * When non-null, this is a unique identifier.
   */

attribute AString alias;

[src]

/**
   * An optional shortcut alias for the engine.
   * When non-null, this is a unique identifier.
   */

attribute AString alias;

[src]

/**
   * A text description describing the engine.
   */

readonly attribute AString description;

[src]

/**
   * Whether the engine should be hidden from the user.
   */

attribute boolean hidden;

[src]

/**
   * Whether the engine should be hidden from the user.
   */

attribute boolean hidden;

[src]

/**
   * A nsIURI corresponding to the engine's icon, stored locally. May be null.
   */

readonly attribute nsIURI iconURI;

[src]

/**
   * The display name of the search engine. This is a unique identifier.
   */

readonly attribute AString name;

[src]

/**
   * A URL string pointing to the engine's search form.
   */

readonly attribute AString searchForm;

[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;

[src]

/**
   * 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>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsISearchEngine
[src]

IID: nsIID = nsID(1644943648, 1169, 18632, [153, 168, 214, 4, 126, 100, 128, 45])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsISearchEngine
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.