Interface nsIStreamLoaderObserverType

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

  • Called when the entire stream has been loaded.

    Parameters

    • loader: nsIStreamLoader

      the stream loader that loaded the stream.

    • ctxt: nsISupports

      the context parameter of the underlying channel

    • status: number

      the status of the underlying channel

    • resultLength: number

      the length of the data loaded

    • result: number

      the data

      This method will always be called asynchronously by the nsIStreamLoader involved, on the thread that called the loader's init() method.

      If the observer wants to take over responsibility for the data buffer (result), it returns NS_SUCCESS_ADOPTED_DATA in place of NS_OK as its success code. The loader will then "forget" about the data and not free() it after onStreamComplete() returns; observer must call free() when the data is no longer required.

    Returns void

Generated using TypeDoc