Struct xpcom::interfaces::nsIIncrementalStreamLoaderObserver [] [src]

#[repr(C)]
pub struct nsIIncrementalStreamLoaderObserver { /* fields omitted */ }

interface nsIIncrementalStreamLoaderObserver : nsISupports

Methods

impl nsIIncrementalStreamLoaderObserver
[src]

[src]

Cast this nsIIncrementalStreamLoaderObserver to one of its base interfaces.

impl nsIIncrementalStreamLoaderObserver
[src]

[src]

/**
     * Called when new data has arrived on the stream.
     *
     * @param loader the stream loader that loaded the stream.
     * @param ctxt the context parameter of the underlying channel
     * @param dataLength the length of the new data received
     * @param data the contents of the new data received.
     *
     * This method will always be called asynchronously by the
     * nsIIncrementalStreamLoader involved, on the thread that called the
     * loader's init() method.
     *
     * If the observer wants to not accumulate all or portional of the data in
     * the internal buffer, the consumedLength shall be set to the value of
     * the dataLength or less. By default the consumedLength value is assumed 0.
     * The data and dataLength reflect the non-consumed data and will be
     * accumulated if consumedLength is not set.
     *
     * In comparison with onStreamComplete(), the data buffer cannot be
     * adopted if this method returns NS_SUCCESS_ADOPTED_DATA.
     */

void onIncrementalData (in nsIIncrementalStreamLoader loader, in nsISupports ctxt, in unsigned long dataLength, [array, size_is (dataLength), const] in octet data, inout unsigned long consumedLength);

[src]

/**
     * Called when the entire stream has been loaded.
     *
     * @param loader the stream loader that loaded the stream.
     * @param ctxt the context parameter of the underlying channel
     * @param status the status of the underlying channel
     * @param resultLength the length of the data loaded
     * @param result the data
     *
     * This method will always be called asynchronously by the
     * nsIIncrementalStreamLoader 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.
     */

void onStreamComplete (in nsIIncrementalStreamLoader loader, in nsISupports ctxt, in nsresult status, in unsigned long resultLength, [array, size_is (resultLength), const] in octet result);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIIncrementalStreamLoaderObserver
[src]

IID: nsIID = nsID(130273996, 21588, 17944, [159, 79, 205, 147, 222, 149, 4, 164])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIIncrementalStreamLoaderObserver
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIIncrementalStreamLoaderObserver
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.