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
"nsISupports.idl"
8 interface nsIUTF8StringEnumerator
;
9 interface nsIStreamListener
;
10 interface nsISupports
;
13 * A channel interface which allows special handling of encoded content
16 [scriptable
, uuid(29c29ce6
-8ce4
-45e6
-8d60
-36c8fa3e255b
)]
17 interface nsIEncodedChannel
: nsISupports
20 * This attribute holds the MIME types corresponding to the content
21 * encodings on the channel. The enumerator returns nsISupportsCString
22 * objects. The first one corresponds to the outermost encoding on the
23 * channel and then we work our way inward. "identity" is skipped and not
24 * represented on the list. Unknown encodings make the enumeration stop.
25 * If you want the actual Content-Encoding value, use
26 * getResponseHeader("Content-Encoding").
28 * When there is no Content-Encoding header, this property is null.
30 * Modifying the Content-Encoding header on the channel will cause
31 * this enumerator to have undefined behavior. Don't do it.
33 * Also note that contentEncodings only exist during or after OnStartRequest.
34 * Calling contentEncodings before OnStartRequest is an error.
36 readonly attribute nsIUTF8StringEnumerator contentEncodings
;
39 * This attribute controls whether or not content conversion should be
40 * done per the Content-Encoding response header. applyConversion can only
41 * be set before or during OnStartRequest. Calling this during
42 * OnDataAvailable is an error.
46 attribute
boolean applyConversion
;
49 * This attribute indicates the content has been decompressed in
52 attribute
boolean hasContentDecompressed
;
54 * This function will start converters if they are available.
55 * aNewNextListener will be nullptr if no converter is available.
57 void doApplyContentConversions
(in nsIStreamListener aNextListener
,
58 out nsIStreamListener aNewNextListener
,
59 in nsISupports aCtxt
);