michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIRequest; michael@0: michael@0: /** michael@0: * nsIRequestObserver michael@0: */ michael@0: [scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)] michael@0: interface nsIRequestObserver : nsISupports michael@0: { michael@0: /** michael@0: * Called to signify the beginning of an asynchronous request. michael@0: * michael@0: * @param aRequest request being observed michael@0: * @param aContext user defined context michael@0: * michael@0: * An exception thrown from onStartRequest has the side-effect of michael@0: * causing the request to be canceled. michael@0: */ michael@0: void onStartRequest(in nsIRequest aRequest, michael@0: in nsISupports aContext); michael@0: michael@0: /** michael@0: * Called to signify the end of an asynchronous request. This michael@0: * call is always preceded by a call to onStartRequest. michael@0: * michael@0: * @param aRequest request being observed michael@0: * @param aContext user defined context michael@0: * @param aStatusCode reason for stopping (NS_OK if completed successfully) michael@0: * michael@0: * An exception thrown from onStopRequest is generally ignored. michael@0: */ michael@0: void onStopRequest(in nsIRequest aRequest, michael@0: in nsISupports aContext, michael@0: in nsresult aStatusCode); michael@0: };