Bug 1804798 - Explicitly set auto page name (and corresponding debug flag) when inser...
[gecko.git] / netwerk / base / nsIMIMEInputStream.idl
blob1842cdb40ce742f60596ebda4d3553615799f71a
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 "nsIHttpHeaderVisitor.idl"
7 #include "nsIInputStream.idl"
9 /**
10 * The MIME stream separates headers and a datastream. It also allows
11 * automatic creation of the content-length header.
14 [scriptable, builtinclass, uuid(dcbce63c-1dd1-11b2-b94d-91f6d49a3161)]
15 interface nsIMIMEInputStream : nsIInputStream
17 /**
18 * Adds an additional header to the stream on the form "name: value". May
19 * not be called once the stream has been started to be read.
20 * @param name name of the header
21 * @param value value of the header
23 void addHeader(in string name, in string value);
25 /**
26 * Visits all headers which have been added via addHeader. Calling
27 * addHeader while visiting request headers has undefined behavior.
29 * @param aVisitor
30 * The header visitor instance.
32 void visitHeaders(in nsIHttpHeaderVisitor visitor);
34 /**
35 * Sets data-stream. May not be called once the stream has been started
36 * to be read.
37 * The cursor of the new stream should be located at the beginning of the
38 * stream if the implementation of the nsIMIMEInputStream also is used as
39 * an nsISeekableStream.
40 * @param stream stream containing the data for the stream
42 void setData(in nsIInputStream stream);
44 /**
45 * Get the wrapped data stream
47 readonly attribute nsIInputStream data;