Struct xpcom::interfaces::nsIBrowserSearchService
[−]
[src]
#[repr(C)]pub struct nsIBrowserSearchService { /* fields omitted */ }
interface nsIBrowserSearchService : nsISupports
Methods
impl nsIBrowserSearchService
[src]
pub fn coerce<T: nsIBrowserSearchServiceCoerce>(&self) -> &T
[src]
Cast this nsIBrowserSearchService
to one of its base interfaces.
impl nsIBrowserSearchService
[src]
pub unsafe fn Init(
&self,
aObserver: *const nsIBrowserSearchInitObserver
) -> nsresult
[src]
&self,
aObserver: *const nsIBrowserSearchInitObserver
) -> nsresult
/**
* 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);
pub unsafe fn GetIsInitialized(&self, aIsInitialized: *mut bool) -> nsresult
[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;
pub unsafe fn ResetToOriginalDefaultEngine(&self) -> nsresult
[src]
/**
* Resets the default engine to its original value.
*/
void resetToOriginalDefaultEngine ();
pub unsafe fn AddEngine(
&self,
engineURL: &nsAString,
dataType: int32_t,
iconURL: &nsAString,
confirm: bool,
callback: *const nsISearchInstallCallback,
extensionID: &nsAString
) -> nsresult
[src]
&self,
engineURL: &nsAString,
dataType: int32_t,
iconURL: &nsAString,
confirm: bool,
callback: *const nsISearchInstallCallback,
extensionID: &nsAString
) -> nsresult
/**
* 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);
pub unsafe fn RestoreDefaultEngines(&self) -> nsresult
[src]
/**
* Un-hides all engines in the set of engines returned by getDefaultEngines.
*/
void restoreDefaultEngines ();
pub unsafe fn GetEngineByAlias(
&self,
alias: &nsAString,
_retval: *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
alias: &nsAString,
_retval: *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn GetEngineByName(
&self,
aEngineName: &nsAString,
_retval: *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
aEngineName: &nsAString,
_retval: *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn GetEngines(
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn GetVisibleEngines(
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn GetDefaultEngines(
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn GetEnginesByExtensionID(
&self,
extensionID: &nsAString,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
extensionID: &nsAString,
engineCount: *mut uint32_t,
engines: *mut *mut *const nsISearchEngine
) -> nsresult
/**
* 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);
pub unsafe fn MoveEngine(
&self,
engine: *const nsISearchEngine,
newIndex: int32_t
) -> nsresult
[src]
&self,
engine: *const nsISearchEngine,
newIndex: int32_t
) -> nsresult
/**
* 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);
pub unsafe fn RemoveEngine(&self, engine: *const nsISearchEngine) -> nsresult
[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);
pub unsafe fn GetOriginalDefaultEngine(
&self,
aOriginalDefaultEngine: *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
aOriginalDefaultEngine: *mut *const nsISearchEngine
) -> nsresult
/**
* The original Engine object that is the default for this region,
* ignoring changes the user may have subsequently made.
*/
readonly attribute nsISearchEngine originalDefaultEngine;
pub unsafe fn GetDefaultEngine(
&self,
aDefaultEngine: *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
aDefaultEngine: *mut *const nsISearchEngine
) -> nsresult
/**
* Alias for the currentEngine attribute, kept for add-on compatibility.
*/
attribute nsISearchEngine defaultEngine;
pub unsafe fn SetDefaultEngine(
&self,
aDefaultEngine: *const nsISearchEngine
) -> nsresult
[src]
&self,
aDefaultEngine: *const nsISearchEngine
) -> nsresult
/**
* Alias for the currentEngine attribute, kept for add-on compatibility.
*/
attribute nsISearchEngine defaultEngine;
pub unsafe fn GetCurrentEngine(
&self,
aCurrentEngine: *mut *const nsISearchEngine
) -> nsresult
[src]
&self,
aCurrentEngine: *mut *const nsISearchEngine
) -> nsresult
/**
* 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;
pub unsafe fn SetCurrentEngine(
&self,
aCurrentEngine: *const nsISearchEngine
) -> nsresult
[src]
&self,
aCurrentEngine: *const nsISearchEngine
) -> nsresult
/**
* 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;
pub unsafe fn ParseSubmissionURL(
&self,
url: &nsAString,
_retval: *mut *const nsISearchParseSubmissionResult
) -> nsresult
[src]
&self,
url: &nsAString,
_retval: *mut *const nsISearchParseSubmissionResult
) -> nsresult
/**
* 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>
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 nsIBrowserSearchService
[src]
const IID: nsIID
IID: nsIID = nsID(353302304, 48098, 16745, [185, 243, 239, 126, 192, 101, 76, 237])
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 nsIBrowserSearchService
[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 nsIBrowserSearchService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.