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"
9 * The multiplex stream concatenates a list of input streams into a single
13 [scriptable
, uuid(a076fd12
-1dd1
-11b2
-b19a
-d53b5dffaade
)]
14 interface nsIMultiplexInputStream
: nsIInputStream
17 * Number of streams in this multiplex-stream
19 readonly attribute
unsigned long count
;
22 * Appends a stream to the end of the streams. The cursor of the stream
23 * should be located at the beginning of the stream if the implementation
24 * of this nsIMultiplexInputStream also is used as an nsISeekableStream.
25 * @param stream stream to append
27 void appendStream
(in nsIInputStream stream
);
30 * Insert a stream at specified index. If the cursor of this stream is at
31 * the beginning of the stream at index, the cursor will be placed at the
32 * beginning of the inserted stream instead.
33 * The cursor of the new stream should be located at the beginning of the
34 * stream if the implementation of this nsIMultiplexInputStream also is
35 * used as an nsISeekableStream.
36 * @param stream stream to insert
37 * @param index index to insert stream at, must be <= count
39 void insertStream
(in nsIInputStream stream
, in unsigned long index
);
42 * Remove stream at specified index. If this stream is the one currently
43 * being read the readcursor is moved to the beginning of the next
45 * @param index remove stream at this index, must be < count
47 void removeStream
(in unsigned long index
);
50 * Get stream at specified index.
51 * @param index return stream at this index, must be < count
52 * @return stream at specified index
54 nsIInputStream getStream
(in unsigned long index
);