Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 nsIRequest;
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 * @param aContext user defined context
21 *
22 * An exception thrown from onStartRequest has the side-effect of
23 * causing the request to be canceled.
24 */
25 void onStartRequest(in nsIRequest aRequest,
26 in nsISupports aContext);
28 /**
29 * Called to signify the end of an asynchronous request. This
30 * call is always preceded by a call to onStartRequest.
31 *
32 * @param aRequest request being observed
33 * @param aContext user defined context
34 * @param aStatusCode reason for stopping (NS_OK if completed successfully)
35 *
36 * An exception thrown from onStopRequest is generally ignored.
37 */
38 void onStopRequest(in nsIRequest aRequest,
39 in nsISupports aContext,
40 in nsresult aStatusCode);
41 };