Struct xpcom::interfaces::nsIResProtocolHandler
[−]
[src]
#[repr(C)]pub struct nsIResProtocolHandler { /* fields omitted */ }
interface nsIResProtocolHandler : nsISubstitutingProtocolHandler
/**
* Protocol handler interface for the resource:// protocol
*/
Methods
impl nsIResProtocolHandler
[src]
pub fn coerce<T: nsIResProtocolHandlerCoerce>(&self) -> &T
[src]
Cast this nsIResProtocolHandler
to one of its base interfaces.
impl nsIResProtocolHandler
[src]
pub unsafe fn AllowContentToAccess(
&self,
url: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
url: *const nsIURI,
_retval: *mut bool
) -> nsresult
boolean allowContentToAccess (in nsIURI url);
Methods from Deref<Target = nsISubstitutingProtocolHandler>
pub fn coerce<T: nsISubstitutingProtocolHandlerCoerce>(&self) -> &T
[src]
Cast this nsISubstitutingProtocolHandler
to one of its base interfaces.
pub const ALLOW_CONTENT_ACCESS: i64
pub unsafe fn SetSubstitution(
&self,
root: &nsACString,
baseURI: *const nsIURI
) -> nsresult
[src]
&self,
root: &nsACString,
baseURI: *const nsIURI
) -> nsresult
/**
* Sets the substitution for the root key:
* resource://root/path ==> baseURI.resolve(path)
*
* A null baseURI removes the specified substitution.
*
* A root key should always be lowercase; however, this may not be
* enforced.
*/
[must_use] void setSubstitution (in ACString root, in nsIURI baseURI);
pub unsafe fn SetSubstitutionWithFlags(
&self,
root: &nsACString,
baseURI: *const nsIURI,
flags: uint32_t
) -> nsresult
[src]
&self,
root: &nsACString,
baseURI: *const nsIURI,
flags: uint32_t
) -> nsresult
/**
* Same as setSubstitution, but with specific flags.
*/
[must_use] void setSubstitutionWithFlags (in ACString root, in nsIURI baseURI, in uint32_t flags);
pub unsafe fn GetSubstitution(
&self,
root: &nsACString,
_retval: *mut *const nsIURI
) -> nsresult
[src]
&self,
root: &nsACString,
_retval: *mut *const nsIURI
) -> nsresult
/**
* Gets the substitution for the root key.
*
* @throws NS_ERROR_NOT_AVAILABLE if none exists.
*/
[must_use] nsIURI getSubstitution (in ACString root);
pub unsafe fn HasSubstitution(
&self,
root: &nsACString,
_retval: *mut bool
) -> nsresult
[src]
&self,
root: &nsACString,
_retval: *mut bool
) -> nsresult
/**
* Returns TRUE if the substitution exists and FALSE otherwise.
*/
[must_use] boolean hasSubstitution (in ACString root);
pub unsafe fn ResolveURI(
&self,
resURI: *const nsIURI,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
resURI: *const nsIURI,
_retval: &mut nsACString
) -> nsresult
/**
* Utility function to resolve a substituted URI. A resolved URI is not
* guaranteed to reference a resource that exists (ie. opening a channel to
* the resolved URI may fail).
*
* @throws NS_ERROR_NOT_AVAILABLE if resURI.host() is an unknown root key.
*/
[must_use] AUTF8String resolveURI (in nsIURI resURI);
pub unsafe fn AddObserver(
&self,
observer: *const nsISubstitutionObserver
) -> nsresult
[src]
&self,
observer: *const nsISubstitutionObserver
) -> nsresult
/**
* Adds an observer that will be notified on the main thread whenever a
* substitition is set or unset. Notifications are not sent for substitutions
* that were set prior to the observer being added. Holds an owning reference
* to the observer until removeObserver is called or the protocol handler is
* destroyed.
*/
[must_use] void addObserver (in nsISubstitutionObserver observer);
pub unsafe fn RemoveObserver(
&self,
observer: *const nsISubstitutionObserver
) -> nsresult
[src]
&self,
observer: *const nsISubstitutionObserver
) -> nsresult
/**
* Removes the observer.
*/
[must_use] void removeObserver (in nsISubstitutionObserver observer);
Trait Implementations
impl XpCom for nsIResProtocolHandler
[src]
const IID: nsIID
IID: nsIID = nsID(605893804, 40661, 18135, [145, 12, 122, 157, 145, 74, 160, 197])
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 nsIResProtocolHandler
[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 nsIResProtocolHandler
[src]
type Target = nsISubstitutingProtocolHandler
The resulting type after dereferencing.
fn deref(&self) -> &nsISubstitutingProtocolHandler
[src]
Dereferences the value.