netwerk/base/public/nsIMIMEInputStream.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 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsIInputStream.idl"
     8 /**
     9  * The MIME stream separates headers and a datastream. It also allows
    10  * automatic creation of the content-length header.
    11  */
    13 [scriptable, uuid(dcbce63c-1dd1-11b2-b94d-91f6d49a3161)]
    14 interface nsIMIMEInputStream : nsIInputStream
    15 {
    16     /**
    17      * When true a "Content-Length" header is automatically added to the
    18      * stream. The value of the content-length is automatically calculated
    19      * using the available() method on the data stream. The value is
    20      * recalculated every time the stream is rewinded to the start.
    21      * Not allowed to be changed once the stream has been started to be read.
    22      */
    23     attribute boolean addContentLength;
    25     /**
    26      * Adds an additional header to the stream on the form "name: value". May
    27      * not be called once the stream has been started to be read.
    28      * @param name   name of the header
    29      * @param value  value of the header
    30      */
    31     void addHeader(in string name, in string value);
    33     /**
    34      * Sets data-stream. May not be called once the stream has been started
    35      * to be read.
    36      * The cursor of the new stream should be located at the beginning of the
    37      * stream if the implementation of the nsIMIMEInputStream also is used as
    38      * an nsISeekableStream.
    39      * @param stream  stream containing the data for the stream
    40      */
    41     void setData(in nsIInputStream stream);
    42 };

mercurial