tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIEncodedChannel.idl (2392B)


      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 "nsISupports.idl"
      7 
      8 interface nsIUTF8StringEnumerator;
      9 interface nsIStreamListener;
     10 interface nsISupports;
     11 
     12 /**
     13 * A channel interface which allows special handling of encoded content
     14 */
     15 
     16 [scriptable, uuid(29c29ce6-8ce4-45e6-8d60-36c8fa3e255b)]
     17 interface nsIEncodedChannel : nsISupports
     18 {
     19    /**
     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").
     27     *
     28     * When there is no Content-Encoding header, this property is null.
     29     *
     30     * Modifying the Content-Encoding header on the channel will cause
     31     * this enumerator to have undefined behavior.  Don't do it.
     32     *
     33     * Also note that contentEncodings only exist during or after OnStartRequest.
     34     * Calling contentEncodings before OnStartRequest is an error.
     35     */
     36    readonly attribute nsIUTF8StringEnumerator contentEncodings;
     37 
     38    /**
     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.
     43     *
     44     * TRUE by default.
     45     */
     46    attribute boolean applyConversion;
     47 
     48    /**
     49     * This attribute indicates the content has been decompressed in
     50     * the parent process.
     51     */
     52    attribute boolean hasContentDecompressed;
     53    /**
     54     * This function will start converters if they are available.
     55     * aNewNextListener will be nullptr if no converter is available.
     56     */
     57    void doApplyContentConversions(in nsIStreamListener aNextListener,
     58                                   out nsIStreamListener aNewNextListener,
     59                                   in nsISupports aCtxt);
     60 };