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 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsIInputStream; |
michael@0 | 8 | interface nsIURI; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * nsIInputStreamChannel |
michael@0 | 12 | * |
michael@0 | 13 | * This interface provides methods to initialize an input stream channel. |
michael@0 | 14 | * The input stream channel serves as a data pump for an input stream. |
michael@0 | 15 | */ |
michael@0 | 16 | [scriptable, uuid(17a17ce4-9a07-43fb-a0a3-947a6e21476c)] |
michael@0 | 17 | interface nsIInputStreamChannel : nsISupports |
michael@0 | 18 | { |
michael@0 | 19 | /** |
michael@0 | 20 | * Sets the URI for this channel. This must be called before the |
michael@0 | 21 | * channel is opened, and it may only be called once. |
michael@0 | 22 | */ |
michael@0 | 23 | void setURI(in nsIURI aURI); |
michael@0 | 24 | |
michael@0 | 25 | /** |
michael@0 | 26 | * Get/set the content stream |
michael@0 | 27 | * |
michael@0 | 28 | * This stream contains the data that will be pushed to the channel's |
michael@0 | 29 | * stream listener. If the stream is non-blocking and supports the |
michael@0 | 30 | * nsIAsyncInputStream interface, then the stream will be read directly. |
michael@0 | 31 | * Otherwise, the stream will be read on a background thread. |
michael@0 | 32 | * |
michael@0 | 33 | * This attribute must be set before the channel is opened, and it may |
michael@0 | 34 | * only be set once. |
michael@0 | 35 | * |
michael@0 | 36 | * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel |
michael@0 | 37 | * has been opened. |
michael@0 | 38 | */ |
michael@0 | 39 | attribute nsIInputStream contentStream; |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * Get/set the srcdoc data string. When the input stream channel is |
michael@0 | 43 | * created to load a srcdoc iframe, this is set to hold the value of the |
michael@0 | 44 | * srcdoc attribute. |
michael@0 | 45 | * |
michael@0 | 46 | * This should be the same value used to create contentStream, but this is |
michael@0 | 47 | * not checked. |
michael@0 | 48 | * |
michael@0 | 49 | * Changing the value of this attribute will not otherwise affect the |
michael@0 | 50 | * functionality of the channel or input stream. |
michael@0 | 51 | */ |
michael@0 | 52 | attribute AString srcdocData; |
michael@0 | 53 | |
michael@0 | 54 | /** |
michael@0 | 55 | * Returns true if srcdocData has been set within the channel. |
michael@0 | 56 | */ |
michael@0 | 57 | readonly attribute boolean isSrcdocChannel; |
michael@0 | 58 | |
michael@0 | 59 | /** |
michael@0 | 60 | * The base URI to be used for the channel. Used when the base URI cannot |
michael@0 | 61 | * be inferred by other means, for example when this is a srcdoc channel. |
michael@0 | 62 | */ |
michael@0 | 63 | attribute nsIURI baseURI; |
michael@0 | 64 | }; |