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]

[src]

Cast this nsIResProtocolHandler to one of its base interfaces.

impl nsIResProtocolHandler
[src]

[src]

boolean allowContentToAccess (in nsIURI url);

Methods from Deref<Target = nsISubstitutingProtocolHandler>

[src]

Cast this nsISubstitutingProtocolHandler to one of its base interfaces.

[src]

/**
   * 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);

[src]

/**
   * Same as setSubstitution, but with specific flags.
   */

[must_use] void setSubstitutionWithFlags (in ACString root, in nsIURI baseURI, in uint32_t flags);

[src]

/**
   * Gets the substitution for the root key.
   *
   * @throws NS_ERROR_NOT_AVAILABLE if none exists.
   */

[must_use] nsIURI getSubstitution (in ACString root);

[src]

/**
   * Returns TRUE if the substitution exists and FALSE otherwise.
   */

[must_use] boolean hasSubstitution (in ACString root);

[src]

/**
   * 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);

[src]

/**
   * 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);

[src]

/**
   * Removes the observer.
   */

[must_use] void removeObserver (in nsISubstitutionObserver observer);

Trait Implementations

impl XpCom for nsIResProtocolHandler
[src]

IID: nsIID = nsID(605893804, 40661, 18135, [145, 12, 122, 157, 145, 74, 160, 197])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIResProtocolHandler
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.