Bumping manifests a=b2g-bump
[gecko.git] / xpcom / io / nsIMultiplexInputStream.idl
blobd42adcbd40fa291fead4f62ee9926d6a5f27d5ac
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 multiplex stream concatenates a list of input streams into a single
10 * stream.
13 [scriptable, uuid(a076fd12-1dd1-11b2-b19a-d53b5dffaade)]
14 interface nsIMultiplexInputStream : nsIInputStream
16 /**
17 * Number of streams in this multiplex-stream
19 readonly attribute unsigned long count;
21 /**
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);
29 /**
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);
41 /**
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
44 * stream
45 * @param index remove stream at this index, must be < count
47 void removeStream(in unsigned long index);
49 /**
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);