netwerk/protocol/res/nsIResProtocolHandler.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsIProtocolHandler.idl"
     8 /**
     9  * Protocol handler interface for the resource:// protocol
    10  */
    11 [scriptable, uuid(067ca872-e947-4bd6-8946-a479cb6ba5dd)]
    12 interface nsIResProtocolHandler : nsIProtocolHandler
    13 {
    14     /**
    15      * Sets the substitution for the root key:
    16      *   resource://root/path ==> baseURI.resolve(path)
    17      *
    18      * A null baseURI removes the specified substitution.
    19      *
    20      * A root key should always be lowercase; however, this may not be
    21      * enforced.
    22      */
    23     void setSubstitution(in ACString root, in nsIURI baseURI);
    25     /**
    26      * Gets the substitution for the root key.
    27      *
    28      * @throws NS_ERROR_NOT_AVAILABLE if none exists.
    29      */
    30     nsIURI getSubstitution(in ACString root);
    32     /**
    33      * Returns TRUE if the substitution exists and FALSE otherwise.
    34      */
    35     boolean hasSubstitution(in ACString root);
    37     /**
    38      * Utility function to resolve a resource URI.  A resolved URI is not 
    39      * guaranteed to reference a resource that exists (ie. opening a channel to
    40      * the resolved URI may fail).
    41      *
    42      * @throws NS_ERROR_NOT_AVAILABLE if resURI.host() is an unknown root key.
    43      */
    44     AUTF8String resolveURI(in nsIURI resURI);
    45 };

mercurial