Struct xpcom::interfaces::nsIURIFixup [] [src]

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

interface nsIURIFixup : nsISupports

/**
 * Interface implemented by objects capable of fixing up strings into URIs
 */

Methods

impl nsIURIFixup
[src]

[src]

Cast this nsIURIFixup to one of its base interfaces.

impl nsIURIFixup
[src]

FIXUP_FLAG_NONE: i64 = 0
/** No fixup flags. */

FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP: i64 = 1
/**
     * Allow the fixup to use a keyword lookup service to complete the URI.
     * The fixup object implementer should honour this flag and only perform
     * any lengthy keyword (or search) operation if it is set.
     */

FIXUP_FLAGS_MAKE_ALTERNATE_URI: i64 = 2
/**
     * Tell the fixup to make an alternate URI from the input URI, for example
     * to turn foo into www.foo.com.
     */

FIXUP_FLAG_FIX_SCHEME_TYPOS: i64 = 8

[src]

/**
     * Converts an internal URI (e.g. a wyciwyg URI) into one which we can
     * expose to the user, for example on the URL bar.
     *
     * @param  aURI       The URI to be converted
     * @return nsIURI     The converted, exposable URI
     * @throws NS_ERROR_MALFORMED_URI when the exposable portion of aURI is malformed
     * @throws NS_ERROR_UNKNOWN_PROTOCOL when we can't get a protocol handler service
     *         for the URI scheme.
     */

nsIURI createExposableURI (in nsIURI aURI);

[src]

/**
     * Converts the specified string into a URI, first attempting
     * to correct any errors in the syntax or other vagaries. Returns
     * a wellformed URI or nullptr if it can't.
     *
     * @param aURIText    Candidate URI.
     * @param aFixupFlags Flags that govern ways the URI may be fixed up.
     * @param aPostData   The POST data to submit with the returned
     *                    URI (see nsISearchSubmission).
     */

nsIURI createFixupURI (in AUTF8String aURIText, in unsigned long aFixupFlags, [optional] out nsIInputStream aPostData);

[src]

/**
     * Same as createFixupURI, but returns information about what it corrected
     * (e.g. whether we could rescue the URI or "just" generated a keyword
     * search URI instead).
     *
     * @param aURIText    Candidate URI.
     * @param aFixupFlags Flags that govern ways the URI may be fixed up.
     * @param aPostData   The POST data to submit with the returned
     *                    URI (see nsISearchSubmission).
     */

nsIURIFixupInfo getFixupURIInfo (in AUTF8String aURIText, in unsigned long aFixupFlags, [optional] out nsIInputStream aPostData);

[src]

/**
     * Converts the specified keyword string into a URI.  Note that it's the
     * caller's responsibility to check whether keywords are enabled and
     * whether aKeyword is a sensible keyword.
     *
     * @param aKeyword  The keyword string to convert into a URI
     * @param aPostData The POST data to submit to the returned URI
     *                  (see nsISearchSubmission).
     *
     * @throws NS_ERROR_FAILURE if the resulting URI requires submission of POST
     *         data and aPostData is null.
     */

nsIURIFixupInfo keywordToURI (in AUTF8String aKeyword, [optional] out nsIInputStream aPostData);

[src]

/**
     * Returns true if the specified domain is whitelisted and false otherwise.
     * A whitelisted domain is relevant when we have a single word and can't be
     * sure whether to treat the word as a host name or should instead be
     * treated as a search term.
     *
     * @param aDomain A domain name to query.
     * @param aDotPos The position of the first '.' character in aDomain, or
     *                -1 if no '.' character exists.
     */

bool isDomainWhitelisted (in AUTF8String aDomain, in uint32_t aDotPos);

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

IID: nsIID = nsID(497543636, 25099, 18761, [132, 154, 28, 214, 7, 123, 27, 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 nsIURIFixup
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIURIFixup
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.