1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include
"nsISupports.idl"
7 interface nsIInputStream
;
11 * nsIInputStreamChannel
13 * This interface provides methods to initialize an input stream channel.
14 * The input stream channel serves as a data pump for an input stream.
16 [scriptable
, uuid(ea730238
-4bfd
-4015-8489-8f264d05b343
)]
17 interface nsIInputStreamChannel
: nsISupports
20 * Sets the URI for this channel. This must be called before the
21 * channel is opened, and it may only be called once.
23 void setURI
(in nsIURI aURI
);
26 * Get/set the content stream
28 * This stream contains the data that will be pushed to the channel's
29 * stream listener. If the stream is non-blocking and supports the
30 * nsIAsyncInputStream interface, then the stream will be read directly.
31 * Otherwise, the stream will be read on a background thread.
33 * This attribute must be set before the channel is opened, and it may
36 * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
39 attribute nsIInputStream contentStream
;
42 * Get/set the srcdoc data string. When the input stream channel is
43 * created to load a srcdoc iframe, this is set to hold the value of the
46 * This should be the same value used to create contentStream, but this is
49 * Changing the value of this attribute will not otherwise affect the
50 * functionality of the channel or input stream.
52 attribute AString srcdocData
;
55 * Returns true if srcdocData has been set within the channel.
57 readonly attribute
boolean isSrcdocChannel
;
60 * The base URI to be used for the channel. Used when the base URI cannot
61 * be inferred by other means, for example when this is a srcdoc channel.
63 attribute nsIURI baseURI
;