tor-browser

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

nsIRequestObserver.idl (1478B)


      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 nsIRequest;
      9 
     10 /**
     11 * nsIRequestObserver
     12 */
     13 [scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)]
     14 interface nsIRequestObserver : nsISupports
     15 {
     16    /**
     17     * Called to signify the beginning of an asynchronous request.
     18     *
     19     * @param aRequest request being observed
     20     *
     21     * An exception thrown from onStartRequest has the side-effect of
     22     * causing the request to be canceled.
     23     *
     24     * Note: if this request is an nsIMultiPartChannelListener then
     25     * OnStartRequest may be called multiple times.
     26     */
     27    void onStartRequest(in nsIRequest aRequest);
     28 
     29    /**
     30     * Called to signify the end of an asynchronous request.  This
     31     * call is always preceded by a call to onStartRequest.
     32     *
     33     * @param aRequest request being observed
     34     * @param aStatusCode reason for stopping (NS_OK if completed successfully)
     35     *
     36     * An exception thrown from onStopRequest is generally ignored.
     37     *
     38     * Note: if this request is an nsIMultiPartChannelListener then
     39     * OnStopRequest may be called multiple times.
     40     */
     41    void onStopRequest(in nsIRequest aRequest,
     42                       in nsresult aStatusCode);
     43 };