netwerk/base/public/nsIEncodedChannel.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIEncodedChannel.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIUTF8StringEnumerator;
    1.12 +/**
    1.13 + * A channel interface which allows special handling of encoded content
    1.14 + */
    1.15 +
    1.16 +[scriptable, uuid(30d7ec3a-f376-4652-9276-3092ec57abb6)]
    1.17 +interface nsIEncodedChannel : nsISupports
    1.18 +{
    1.19 +    /**
    1.20 +     * This attribute holds the MIME types corresponding to the content
    1.21 +     * encodings on the channel.  The enumerator returns nsISupportsCString
    1.22 +     * objects.  The first one corresponds to the outermost encoding on the
    1.23 +     * channel and then we work our way inward.  "identity" is skipped and not
    1.24 +     * represented on the list.  Unknown encodings make the enumeration stop.
    1.25 +     * If you want the actual Content-Encoding value, use
    1.26 +     * getResponseHeader("Content-Encoding").
    1.27 +     *
    1.28 +     * When there is no Content-Encoding header, this property is null.
    1.29 +     *
    1.30 +     * Modifying the Content-Encoding header on the channel will cause
    1.31 +     * this enumerator to have undefined behavior.  Don't do it.
    1.32 +     *
    1.33 +     * Also note that contentEncodings only exist during or after OnStartRequest.
    1.34 +     * Calling contentEncodings before OnStartRequest is an error.
    1.35 +     */
    1.36 +    readonly attribute nsIUTF8StringEnumerator contentEncodings;
    1.37 +
    1.38 +    /**
    1.39 +     * This attribute controls whether or not content conversion should be
    1.40 +     * done per the Content-Encoding response header.  applyConversion can only 
    1.41 +     * be set before or during OnStartRequest.  Calling this during 
    1.42 +     * OnDataAvailable is an error. 
    1.43 +     *
    1.44 +     * TRUE by default.
    1.45 +     */
    1.46 +    attribute boolean applyConversion;
    1.47 +};

mercurial