netwerk/base/public/nsIRequestObserver.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIRequestObserver.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIRequest;
    1.12 +
    1.13 +/**
    1.14 + * nsIRequestObserver
    1.15 + */
    1.16 +[scriptable, uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)]
    1.17 +interface nsIRequestObserver : nsISupports
    1.18 +{
    1.19 +    /**
    1.20 +     * Called to signify the beginning of an asynchronous request.
    1.21 +     *
    1.22 +     * @param aRequest request being observed
    1.23 +     * @param aContext user defined context
    1.24 +     *
    1.25 +     * An exception thrown from onStartRequest has the side-effect of
    1.26 +     * causing the request to be canceled.
    1.27 +     */
    1.28 +    void onStartRequest(in nsIRequest aRequest,
    1.29 +                        in nsISupports aContext);
    1.30 +
    1.31 +    /**
    1.32 +     * Called to signify the end of an asynchronous request.  This
    1.33 +     * call is always preceded by a call to onStartRequest.
    1.34 +     *
    1.35 +     * @param aRequest request being observed
    1.36 +     * @param aContext user defined context
    1.37 +     * @param aStatusCode reason for stopping (NS_OK if completed successfully)
    1.38 +     *
    1.39 +     * An exception thrown from onStopRequest is generally ignored.
    1.40 +     */
    1.41 +    void onStopRequest(in nsIRequest aRequest,
    1.42 +                       in nsISupports aContext,
    1.43 +                       in nsresult aStatusCode);
    1.44 +};

mercurial