nsIChannelEventSink

IID:6757d790-2916-498e-aaca-6b668a956875
Inherits From:nsISupports

Implement this interface to receive control over various channel events. Channels will try to get this interface from a channel's notificationCallbacks or, if not available there, from the loadGroup's notificationCallbacks.

These methods are called before onStartRequest, and should be handled SYNCHRONOUSLY.


Constants

This is a temporary redirect. New requests for this resource should continue to use the URI of the old channel.

The new URI may be identical to the old one.

PRUint32 REDIRECT_TEMPORARY = 1
This is a permanent redirect. New requests for this resource should use the URI of the new channel (This might be an HTTP 301 reponse). If this flag is not set, this is a temporary redirect.

The new URI may be identical to the old one.

PRUint32 REDIRECT_PERMANENT = 2
This is an internal redirect, i.e. it was not initiated by the remote server, but is specific to the channel implementation.

The new URI may be identical to the old one.

PRUint32 REDIRECT_INTERNAL = 4

Methods

void onChannelRedirect ( nsIChannel oldChannel , nsIChannel newChannel , PRUint32 flags )

void onChannelRedirect ( nsIChannel oldChannel , nsIChannel newChannel , PRUint32 flags )

Called when a redirect occurs. This may happen due to an HTTP 3xx status code.

Arguments:
oldChannel: The channel that's being redirected.
newChannel: The new channel. This channel is not opened yet.
flags: Flags indicating the type of redirect. A bitmask consisting of flags from above. One of REDIRECT_TEMPORARY and REDIRECT_PERMANENT will always be set.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999-2006 XULPlanet.com