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]
pub fn coerce<T: nsIURIFixupCoerce>(&self) -> &T
[src]
Cast this nsIURIFixup
to one of its base interfaces.
impl nsIURIFixup
[src]
pub const FIXUP_FLAG_NONE: i64
FIXUP_FLAG_NONE: i64 = 0
/** No fixup flags. */
pub const FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP: i64
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.
*/
pub const FIXUP_FLAGS_MAKE_ALTERNATE_URI: i64
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.
*/
pub const FIXUP_FLAG_FIX_SCHEME_TYPOS: i64
FIXUP_FLAG_FIX_SCHEME_TYPOS: i64 = 8
pub unsafe fn CreateExposableURI(
&self,
aURI: *const nsIURI,
_retval: *mut *const nsIURI
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: *mut *const nsIURI
) -> nsresult
/**
* 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);
pub unsafe fn CreateFixupURI(
&self,
aURIText: &nsACString,
aFixupFlags: uint32_t,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURI
) -> nsresult
[src]
&self,
aURIText: &nsACString,
aFixupFlags: uint32_t,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURI
) -> nsresult
/**
* 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);
pub unsafe fn GetFixupURIInfo(
&self,
aURIText: &nsACString,
aFixupFlags: uint32_t,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURIFixupInfo
) -> nsresult
[src]
&self,
aURIText: &nsACString,
aFixupFlags: uint32_t,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURIFixupInfo
) -> nsresult
/**
* 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);
pub unsafe fn KeywordToURI(
&self,
aKeyword: &nsACString,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURIFixupInfo
) -> nsresult
[src]
&self,
aKeyword: &nsACString,
aPostData: *mut *const nsIInputStream,
_retval: *mut *const nsIURIFixupInfo
) -> nsresult
/**
* 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);
pub unsafe fn IsDomainWhitelisted(
&self,
aDomain: &nsACString,
aDotPos: uint32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
aDomain: &nsACString,
aDotPos: uint32_t,
_retval: *mut bool
) -> nsresult
/**
* 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>
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 nsIURIFixup
[src]
const IID: nsIID
IID: nsIID = nsID(497543636, 25099, 18761, [132, 154, 28, 214, 7, 123, 27, 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 nsIURIFixup
[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 nsIURIFixup
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.