WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIResProtocolHandler

IID:067ca872-e947-4bd6-8946-a479cb6ba5dd
Inherits From:nsIProtocolHandler

Protocol handler interface for the resource:// protocol

This interface is implemented by the following components:


Methods

nsIURI getSubstitution ( ACString root ) PRBool hasSubstitution ( ACString root ) AUTF8String resolveURI ( nsIURI resURI ) void setSubstitution ( ACString root , nsIURI baseURI )

nsIURI getSubstitution ( ACString root )

Gets the substitution for the root key.

Arguments:
root

PRBool hasSubstitution ( ACString root )

Returns TRUE if the substitution exists and FALSE otherwise.

Arguments:
root

AUTF8String resolveURI ( nsIURI resURI )

Utility function to resolve a resource URI. A resolved URI is not guaranteed to reference a resource that exists (ie. opening a channel to the resolved URI may fail).

Arguments:
resURI

void setSubstitution ( ACString root , nsIURI baseURI )

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.

Arguments:
root
baseURI

Reference documentation is generated from Mozilla's source.