Struct xpcom::interfaces::nsISimpleStreamListener [] [src]

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

interface nsISimpleStreamListener : nsIStreamListener

/**
 * A simple stream listener can be used with AsyncRead to supply data to
 * a output stream.
 */

Methods

impl nsISimpleStreamListener
[src]

[src]

Cast this nsISimpleStreamListener to one of its base interfaces.

impl nsISimpleStreamListener
[src]

[src]

/**
     * Initialize the simple stream listener.
     *
     * @param aSink data will be read from the channel to this output stream.
     *              Must implement writeFrom.
     * @param aObserver optional stream observer (can be NULL)
     */

void init (in nsIOutputStream aSink, in nsIRequestObserver aObserver);

Methods from Deref<Target = nsIStreamListener>

[src]

Cast this nsIStreamListener to one of its base interfaces.

[src]

/**
     * Called when the next chunk of data (corresponding to the request) may
     * be read without blocking the calling thread.  The onDataAvailable impl
     * must read exactly |aCount| bytes of data before returning.
     *
     * @param aRequest request corresponding to the source of the data
     * @param aContext user defined context
     * @param aInputStream input stream containing the data chunk
     * @param aOffset
     *        Number of bytes that were sent in previous onDataAvailable calls
     *        for this request. In other words, the sum of all previous count
     *        parameters.
     * @param aCount number of bytes available in the stream
     *
     * NOTE: The aInputStream parameter must implement readSegments.
     *
     * An exception thrown from onDataAvailable has the side-effect of
     * causing the request to be canceled.
     */

void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long long aOffset, in unsigned long aCount);

Trait Implementations

impl XpCom for nsISimpleStreamListener
[src]

IID: nsIID = nsID(2847428458, 2084, 17016, [186, 230, 191, 202, 5, 112, 162, 110])

[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 nsISimpleStreamListener
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsISimpleStreamListener
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.