Interface nsISubstitutingProtocolHandlerType

Protocol handler superinterface for a protocol which performs substitutions from URIs of its scheme to URIs of another scheme.

Hierarchy

Properties

scheme: string

The scheme of this protocol (e.g., "file").

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Allows a protocol to override blacklisted ports.

    This method will be called when there is an attempt to connect to a port that is blacklisted. For example, for most protocols, port 25 (Simple Mail Transfer) is banned. When a URI containing this "known-to-do-bad-things" port number is encountered, this function will be called to ask if the protocol handler wants to override the ban.

    Parameters

    • port: number
    • scheme: string

    Returns boolean

  • Gets the substitution for the root key.

    Throws

    NS_ERROR_NOT_AVAILABLE if none exists.

    Parameters

    • root: string

    Returns nsIURI

  • Returns TRUE if the substitution exists and FALSE otherwise.

    Parameters

    • root: string

    Returns boolean

  • Constructs a new channel from the given URI for this protocol handler and sets the loadInfo for the constructed channel.

    Parameters

    • aURI: nsIURI
    • aLoadinfo: nsILoadInfo

    Returns nsIChannel

  • 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.

    Parameters

    • resURI: nsIURI

    Returns string

  • Sets the substitution for the root key: resource://root/path ==> baseURI.resolve(path)

    A null baseURI removes the specified substitution.

    The root key will be converted to lower-case to conform to case-insensitive URI hostname matching behavior.

    Parameters

    • root: string
    • baseURI: nsIURI

    Returns void

  • Same as setSubstitution, but with specific flags.

    Parameters

    • root: string
    • baseURI: nsIURI
    • flags: uint32_t

    Returns void

Generated using TypeDoc