netwerk/base/public/nsIMIMEInputStream.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:d96b37c1a83f
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/. */
5
6 #include "nsIInputStream.idl"
7
8 /**
9 * The MIME stream separates headers and a datastream. It also allows
10 * automatic creation of the content-length header.
11 */
12
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;
24
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);
32
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