Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIChannelEventSink Interface Reference

Implement this interface to receive control over various channel events. More...

import "nsIChannelEventSink.idl";

Inheritance diagram for nsIChannelEventSink:
Inheritance graph
[legend]
Collaboration diagram for nsIChannelEventSink:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void onChannelRedirect (in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags)
 Called when a redirect occurs.

Public Attributes

const unsigned long REDIRECT_TEMPORARY = 1 << 0
 This is a temporary redirect.
const unsigned long REDIRECT_PERMANENT = 1 << 1
 This is a permanent redirect.
const unsigned long REDIRECT_INTERNAL = 1 << 2
 This is an internal redirect, i.e.

Detailed Description

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.

Definition at line 56 of file nsIChannelEventSink.idl.


Member Function Documentation

void nsIChannelEventSink::onChannelRedirect ( in nsIChannel  oldChannel,
in nsIChannel  newChannel,
in unsigned long  flags 
)

Called when a redirect occurs.

This may happen due to an HTTP 3xx status code.

Parameters:
oldChannelThe channel that's being redirected.
newChannelThe new channel. This channel is not opened yet.
flagsFlags indicating the type of redirect. A bitmask consisting of flags from above. One of REDIRECT_TEMPORARY and REDIRECT_PERMANENT will always be set.
Exceptions:
<any>Throwing an exception will cancel the load. No network request for the new channel will be made.

Member Data Documentation

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.

Definition at line 81 of file nsIChannelEventSink.idl.

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.

Definition at line 73 of file nsIChannelEventSink.idl.

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.

Definition at line 64 of file nsIChannelEventSink.idl.


The documentation for this interface was generated from the following file: