netwerk/protocol/http/nsIHttpEventSink.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/protocol/http/nsIHttpEventSink.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     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 nsIChannel;
    1.12 +interface nsIHttpChannel;
    1.13 +interface nsIURI;
    1.14 +
    1.15 +/**
    1.16 + * nsIHttpEventSink
    1.17 + *
    1.18 + * Implement this interface to receive control over various HTTP events.  The
    1.19 + * HTTP channel will try to get this interface from its notificationCallbacks
    1.20 + * attribute, and if it doesn't find it there it will look for it from its
    1.21 + * loadGroup's notificationCallbacks attribute.
    1.22 + *
    1.23 + * These methods are called before onStartRequest, and should be handled
    1.24 + * SYNCHRONOUSLY.
    1.25 + *
    1.26 + * @deprecated Newly written code should use nsIChannelEventSink instead of this
    1.27 + * interface.
    1.28 + */
    1.29 +[scriptable, uuid(9475a6af-6352-4251-90f9-d65b1cd2ea15)]
    1.30 +interface nsIHttpEventSink : nsISupports
    1.31 +{
    1.32 +    /**
    1.33 +     * Called when a redirect occurs due to a HTTP response like 302.  The
    1.34 +     * redirection may be to a non-http channel.
    1.35 +     *
    1.36 +     * @return failure cancels redirect
    1.37 +     */
    1.38 +    void onRedirect(in nsIHttpChannel httpChannel,
    1.39 +                    in nsIChannel newChannel);
    1.40 +};

mercurial