netwerk/base/public/nsIMIMEInputStream.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial