Struct xpcom::interfaces::nsIBrowserSearchService [] [src]

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

interface nsIBrowserSearchService : nsISupports

Methods

impl nsIBrowserSearchService
[src]

[src]

Cast this nsIBrowserSearchService to one of its base interfaces.

impl nsIBrowserSearchService
[src]

[src]

/**
   * Start asynchronous initialization.
   *
   * The callback is triggered once initialization is complete, which may be
   * immediately, if initialization has already been completed by some previous
   * call to this method. The callback is always invoked asynchronously.
   *
   * @param aObserver An optional object observing the end of initialization.
   */

void init ([optional] in nsIBrowserSearchInitObserver aObserver);

[src]

/**
   * Determine whether initialization has been completed.
   *
   * Clients of the service can use this attribute to quickly determine whether
   * initialization is complete, and decide to trigger some immediate treatment,
   * to launch asynchronous initialization or to bailout.
   *
   * Note that this attribute does not indicate that initialization has succeeded.
   *
   * @return |true| if the search service is now initialized, |false| if
   * initialization has not been triggered yet.
   */

readonly attribute bool isInitialized;

[src]

/**
   * Resets the default engine to its original value.
   */

void resetToOriginalDefaultEngine ();

[src]

/**
   * Adds a new search engine from the file at the supplied URI, optionally
   * asking the user for confirmation first.  If a confirmation dialog is
   * shown, it will offer the option to begin using the newly added engine
   * right away.
   *
   * @param engineURL
   *        The URL to the search engine's description file.
   *
   * @param dataType
   *        Obsolete, the value is ignored.
   *
   * @param iconURL
   *        A URL string to an icon file to be used as the search engine's
   *        icon. This value may be overridden by an icon specified in the
   *        engine description file.
   *
   * @param confirm
   *        A boolean value indicating whether the user should be asked for
   *        confirmation before this engine is added to the list.  If this
   *        value is false, the engine will be added to the list upon successful
   *        load, but it will not be selected as the current engine.
   *
   * @param callback
   *        A nsISearchInstallCallback that will be notified when the
   *        addition is complete, or if the addition fails. It will not be
   *        called if addEngine throws an exception.
   *
   * @param extensionID [optional]
   *        Optional: The correct extensionID if called by an add-on.
   *
   * @throws NS_ERROR_FAILURE if the description file cannot be successfully
   *         loaded.
   */

void addEngine (in AString engineURL, in long dataType, in AString iconURL, in boolean confirm, [optional] in nsISearchInstallCallback callback, [optional] in AString extensionID);

[src]

/**
   * Un-hides all engines in the set of engines returned by getDefaultEngines.
   */

void restoreDefaultEngines ();

[src]

/**
   * Returns an engine with the specified alias.
   *
   * @param   alias
   *          The search engine's alias.
   * @returns The corresponding nsISearchEngine object, or null if it doesn't
   *          exist.
   */

nsISearchEngine getEngineByAlias (in AString alias);

[src]

/**
   * Returns an engine with the specified name.
   *
   * @param   aEngineName
   *          The name of the engine.
   * @returns The corresponding nsISearchEngine object, or null if it doesn't
   *          exist.
   */

nsISearchEngine getEngineByName (in AString aEngineName);

[src]

/**
   * Returns an array of all installed search engines.
   *
   * @returns an array of nsISearchEngine objects.
   */

void getEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines);

[src]

/**
   * Returns an array of all installed search engines whose hidden attribute is
   * false.
   *
   * @returns an array of nsISearchEngine objects.
   */

void getVisibleEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines);

[src]

/**
   * Returns an array of all default search engines. This includes all loaded
   * engines that aren't in the user's profile directory
   * (NS_APP_USER_SEARCH_DIR).
   *
   * @returns an array of nsISearchEngine objects.
   */

void getDefaultEngines ([optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines);

[src]

/**
   * Returns an array of search engines installed by a given extension.
   *
   * @returns an array of nsISearchEngine objects.
   */

void getEnginesByExtensionID (in AString extensionID, [optional] out unsigned long engineCount, [array, size_is (engineCount), retval] out nsISearchEngine engines);

[src]

/**
   * Moves a visible search engine.
   *
   * @param  engine
   *         The engine to move.
   * @param  newIndex
   *         The engine's new index in the set of visible engines.
   *
   * @throws NS_ERROR_FAILURE if newIndex is out of bounds, or if engine is
   *         hidden.
   */

void moveEngine (in nsISearchEngine engine, in long newIndex);

[src]

/**
   * Removes the search engine. If the search engine is installed in a global
   * location, this will just hide the engine. If the engine is in the user's
   * profile directory, it will be removed from disk.
   *
   * @param  engine
   *         The engine to remove.
   */

void removeEngine (in nsISearchEngine engine);

[src]

/**
   * The original Engine object that is the default for this region,
   * ignoring changes the user may have subsequently made.
   */

readonly attribute nsISearchEngine originalDefaultEngine;

[src]

/**
   * Alias for the currentEngine attribute, kept for add-on compatibility.
   */

attribute nsISearchEngine defaultEngine;

[src]

/**
   * Alias for the currentEngine attribute, kept for add-on compatibility.
   */

attribute nsISearchEngine defaultEngine;

[src]

/**
   * The currently active search engine.
   * Unless the application doesn't ship any search plugin, this should never
   * be null. If the currently active engine is removed, this attribute will
   * fallback first to the original default engine if it's not hidden, then to
   * the first visible engine, and as a last resort it will unhide the original
   * default engine.
   */

attribute nsISearchEngine currentEngine;

[src]

/**
   * The currently active search engine.
   * Unless the application doesn't ship any search plugin, this should never
   * be null. If the currently active engine is removed, this attribute will
   * fallback first to the original default engine if it's not hidden, then to
   * the first visible engine, and as a last resort it will unhide the original
   * default engine.
   */

attribute nsISearchEngine currentEngine;

[src]

/**
   * Determines if the provided URL represents results from a search engine, and
   * provides details about the match.
   *
   * The lookup mechanism checks whether the domain name and path of the
   * provided HTTP or HTTPS URL matches one of the known values for the visible
   * search engines.  The match does not depend on which of the schemes is used.
   * The expected URI parameter for the search terms must exist in the query
   * string, but other parameters are ignored.
   *
   * @param url
   *        String containing the URL to parse, for example
   *        "https://www.google.com/search?q=terms".
   */

nsISearchParseSubmissionResult parseSubmissionURL (in AString url);

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

IID: nsIID = nsID(353302304, 48098, 16745, [185, 243, 239, 126, 192, 101, 76, 237])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIBrowserSearchService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.