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 nsIChannel; michael@0: interface nsIHttpChannel; michael@0: interface nsIURI; michael@0: michael@0: /** michael@0: * nsIHttpEventSink michael@0: * michael@0: * Implement this interface to receive control over various HTTP events. The michael@0: * HTTP channel will try to get this interface from its notificationCallbacks michael@0: * attribute, and if it doesn't find it there it will look for it from its michael@0: * loadGroup's notificationCallbacks attribute. michael@0: * michael@0: * These methods are called before onStartRequest, and should be handled michael@0: * SYNCHRONOUSLY. michael@0: * michael@0: * @deprecated Newly written code should use nsIChannelEventSink instead of this michael@0: * interface. michael@0: */ michael@0: [scriptable, uuid(9475a6af-6352-4251-90f9-d65b1cd2ea15)] michael@0: interface nsIHttpEventSink : nsISupports michael@0: { michael@0: /** michael@0: * Called when a redirect occurs due to a HTTP response like 302. The michael@0: * redirection may be to a non-http channel. michael@0: * michael@0: * @return failure cancels redirect michael@0: */ michael@0: void onRedirect(in nsIHttpChannel httpChannel, michael@0: in nsIChannel newChannel); michael@0: };