netwerk/base/public/nsITraceableChannel.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 nsIStreamListener;
    10 /**
    11  * A channel implementing this interface allows one to intercept its data by
    12  * inserting intermediate stream listeners.
    13  */
    14 [scriptable, uuid(68167b0b-ef34-4d79-a09a-8045f7c5140e)]
    15 interface nsITraceableChannel : nsISupports
    16 {
    17     /*
    18      * Replace the channel's listener with a new one, and return the listener 
    19      * the channel used to have. The new listener intercepts OnStartRequest, 
    20      * OnDataAvailable and OnStopRequest calls and must pass them to 
    21      * the original listener after examination. If multiple callers replace 
    22      * the channel's listener, a chain of listeners is created.
    23      * The caller of setNewListener has no way to control at which place 
    24      * in the chain its listener is placed.
    25      *
    26      * Note: The caller of setNewListener must not delay passing 
    27      * OnStartRequest to the original listener.
    28      *
    29      * Note2: A channel may restrict when the listener can be replaced.
    30      * It is not recommended to allow listener replacement after OnStartRequest
    31      * has been called.
    32      */
    33     nsIStreamListener setNewListener(in nsIStreamListener aListener);
    34 };

mercurial