2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-04-10 09:43:26 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIRequest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nsIRequestObserver
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)]
|
|
|
|
interface nsIRequestObserver : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Called to signify the beginning of an asynchronous request.
|
|
|
|
*
|
2002-05-03 11:49:43 +04:00
|
|
|
* @param aRequest request being observed
|
2001-04-10 09:43:26 +04:00
|
|
|
*
|
2002-05-03 11:49:43 +04:00
|
|
|
* An exception thrown from onStartRequest has the side-effect of
|
2001-04-10 09:43:26 +04:00
|
|
|
* causing the request to be canceled.
|
|
|
|
*/
|
2019-02-28 02:41:04 +03:00
|
|
|
void onStartRequest(in nsIRequest aRequest);
|
2001-04-10 09:43:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called to signify the end of an asynchronous request. This
|
|
|
|
* call is always preceded by a call to onStartRequest.
|
|
|
|
*
|
2002-05-03 11:49:43 +04:00
|
|
|
* @param aRequest request being observed
|
|
|
|
* @param aStatusCode reason for stopping (NS_OK if completed successfully)
|
2001-04-10 09:43:26 +04:00
|
|
|
*
|
2002-05-03 11:49:43 +04:00
|
|
|
* An exception thrown from onStopRequest is generally ignored.
|
2001-04-10 09:43:26 +04:00
|
|
|
*/
|
2002-05-03 11:49:43 +04:00
|
|
|
void onStopRequest(in nsIRequest aRequest,
|
|
|
|
in nsresult aStatusCode);
|
2001-04-10 09:43:26 +04:00
|
|
|
};
|