netwerk/base/public/nsIInputStreamChannel.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIInputStreamChannel.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsIInputStream;
    1.11 +interface nsIURI;
    1.12 +
    1.13 +/**
    1.14 + * nsIInputStreamChannel
    1.15 + *
    1.16 + * This interface provides methods to initialize an input stream channel.
    1.17 + * The input stream channel serves as a data pump for an input stream.
    1.18 + */
    1.19 +[scriptable, uuid(17a17ce4-9a07-43fb-a0a3-947a6e21476c)]
    1.20 +interface nsIInputStreamChannel : nsISupports
    1.21 +{
    1.22 +    /**
    1.23 +     * Sets the URI for this channel.  This must be called before the
    1.24 +     * channel is opened, and it may only be called once.
    1.25 +     */
    1.26 +    void setURI(in nsIURI aURI);
    1.27 +
    1.28 +    /**
    1.29 +     * Get/set the content stream
    1.30 +     *
    1.31 +     * This stream contains the data that will be pushed to the channel's
    1.32 +     * stream listener.  If the stream is non-blocking and supports the
    1.33 +     * nsIAsyncInputStream interface, then the stream will be read directly.
    1.34 +     * Otherwise, the stream will be read on a background thread.
    1.35 +     *
    1.36 +     * This attribute must be set before the channel is opened, and it may
    1.37 +     * only be set once.
    1.38 +     *
    1.39 +     * @throws NS_ERROR_IN_PROGRESS if the setter is called after the channel
    1.40 +     * has been opened.
    1.41 +     */
    1.42 +    attribute nsIInputStream contentStream;
    1.43 +
    1.44 +    /**
    1.45 +     * Get/set the srcdoc data string.  When the input stream channel is 
    1.46 +     * created to load a srcdoc iframe, this is set to hold the value of the
    1.47 +     * srcdoc attribute.
    1.48 +     *
    1.49 +     * This should be the same value used to create contentStream, but this is
    1.50 +     * not checked.
    1.51 +     *
    1.52 +     * Changing the value of this attribute will not otherwise affect the 
    1.53 +     * functionality of the channel or input stream.
    1.54 +     */
    1.55 +    attribute AString srcdocData;
    1.56 +
    1.57 +    /**
    1.58 +     * Returns true if srcdocData has been set within the channel.
    1.59 +     */
    1.60 +    readonly attribute boolean isSrcdocChannel;
    1.61 +
    1.62 +    /**
    1.63 +     * The base URI to be used for the channel.  Used when the base URI cannot
    1.64 +     * be inferred by other means, for example when this is a srcdoc channel.
    1.65 +     */
    1.66 +    attribute nsIURI baseURI;
    1.67 +};

mercurial