netwerk/base/public/nsIRequestObserver.idl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:942b821be8a6
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 * @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);
27
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 };

mercurial