Source code

Revision control

Other Tools

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
void onStartRequest(in nsIRequest aRequest);
25
26
/**
27
* Called to signify the end of an asynchronous request. This
28
* call is always preceded by a call to onStartRequest.
29
*
30
* @param aRequest request being observed
31
* @param aStatusCode reason for stopping (NS_OK if completed successfully)
32
*
33
* An exception thrown from onStopRequest is generally ignored.
34
*/
35
void onStopRequest(in nsIRequest aRequest,
36
in nsresult aStatusCode);
37
};