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