netwerk/base/public/nsIInputStreamChannel.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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
    12  *
    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.
    15  */
    16 [scriptable, uuid(17a17ce4-9a07-43fb-a0a3-947a6e21476c)]
    17 interface nsIInputStreamChannel : nsISupports
    18 {
    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.
    22      */
    23     void setURI(in nsIURI aURI);
    25     /**
    26      * Get/set the content stream
    27      *
    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.
    32      *
    33      * This attribute must be set before the channel is opened, and it may
    34      * only be set once.
    35      *
    36      * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
    37      * has been opened.
    38      */
    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.
    45      *
    46      * This should be the same value used to create contentStream, but this is
    47      * not checked.
    48      *
    49      * Changing the value of this attribute will not otherwise affect the 
    50      * functionality of the channel or input stream.
    51      */
    52     attribute AString srcdocData;
    54     /**
    55      * Returns true if srcdocData has been set within the channel.
    56      */
    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.
    62      */
    63     attribute nsIURI baseURI;
    64 };

mercurial