Merge mozilla-central to autoland. CLOSED TREE
[gecko.git] / netwerk / base / nsIRequestObserver.idl
blob674e923a32bc8a18edbcbc76ce4906b638211323
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
13 [scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)]
14 interface nsIRequestObserver : nsISupports
16 /**
17 * Called to signify the beginning of an asynchronous request.
19 * @param aRequest request being observed
21 * An exception thrown from onStartRequest has the side-effect of
22 * causing the request to be canceled.
24 * Note: if this request is an nsIMultiPartChannelListener then
25 * OnStartRequest may be called multiple times.
27 void onStartRequest(in nsIRequest aRequest);
29 /**
30 * Called to signify the end of an asynchronous request. This
31 * call is always preceded by a call to onStartRequest.
33 * @param aRequest request being observed
34 * @param aStatusCode reason for stopping (NS_OK if completed successfully)
36 * An exception thrown from onStopRequest is generally ignored.
38 * Note: if this request is an nsIMultiPartChannelListener then
39 * OnStopRequest may be called multiple times.
41 void onStopRequest(in nsIRequest aRequest,
42 in nsresult aStatusCode);