Interface nsITraceableChannelType

A channel implementing this interface allows one to intercept its data by inserting intermediate stream listeners.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Replace the channel's listener with a new one, and return the listener the channel used to have. The new listener intercepts OnStartRequest, OnDataAvailable and OnStopRequest calls and must pass them to the original listener after examination. If multiple callers replace the channel's listener, a chain of listeners is created. The caller of setNewListener has no way to control at which place in the chain its listener is placed.

    Parameters

    • aListener: nsIStreamListener
    • aMustApplyContentConversion: boolean

      Pass true if the new listener requires content conversion to already be applied by the channel.

      Note: The caller of setNewListener must not delay passing OnStartRequest to the original listener.

      Note2: A channel may restrict when the listener can be replaced. It is not recommended to allow listener replacement after OnStartRequest has been called.

    Returns nsIStreamListener

Generated using TypeDoc