Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / netwerk / base / nsIInputStreamChannel.idl
blob9172a2b283e635ccdee5b4f3c55783528445dcce
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;
8 interface nsIURI;
10 /**
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
19 /**
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);
25 /**
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
34 * only be set once.
36 * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
37 * has been opened.
39 attribute nsIInputStream contentStream;
41 /**
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
44 * srcdoc attribute.
46 * This should be the same value used to create contentStream, but this is
47 * not checked.
49 * Changing the value of this attribute will not otherwise affect the
50 * functionality of the channel or input stream.
52 attribute AString srcdocData;
54 /**
55 * Returns true if srcdocData has been set within the channel.
57 readonly attribute boolean isSrcdocChannel;
59 /**
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;