Struct xpcom::interfaces::nsIStreamListener
[−]
[src]
#[repr(C)]pub struct nsIStreamListener { /* fields omitted */ }
interface nsIStreamListener : nsIRequestObserver
/**
* nsIStreamListener
*/
Methods
impl nsIStreamListener
[src]
pub fn coerce<T: nsIStreamListenerCoerce>(&self) -> &T
[src]
Cast this nsIStreamListener
to one of its base interfaces.
impl nsIStreamListener
[src]
pub unsafe fn OnDataAvailable(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aInputStream: *const nsIInputStream,
aOffset: uint64_t,
aCount: uint32_t
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aInputStream: *const nsIInputStream,
aOffset: uint64_t,
aCount: uint32_t
) -> nsresult
/**
* 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);
Methods from Deref<Target = nsIRequestObserver>
pub fn coerce<T: nsIRequestObserverCoerce>(&self) -> &T
[src]
Cast this nsIRequestObserver
to one of its base interfaces.
pub unsafe fn OnStartRequest(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports
) -> nsresult
/**
* Called to signify the beginning of an asynchronous request.
*
* @param aRequest request being observed
* @param aContext user defined context
*
* An exception thrown from onStartRequest has the side-effect of
* causing the request to be canceled.
*/
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext);
pub unsafe fn OnStopRequest(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aStatusCode: nsresult
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aStatusCode: nsresult
) -> nsresult
/**
* Called to signify the end of an asynchronous request. This
* call is always preceded by a call to onStartRequest.
*
* @param aRequest request being observed
* @param aContext user defined context
* @param aStatusCode reason for stopping (NS_OK if completed successfully)
*
* An exception thrown from onStopRequest is generally ignored.
*/
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode);
Trait Implementations
impl XpCom for nsIStreamListener
[src]
const IID: nsIID
IID: nsIID = nsID(994871927, 30394, 17936, [179, 22, 103, 140, 115, 163, 184, 140])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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 nsIStreamListener
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIStreamListener
[src]
type Target = nsIRequestObserver
The resulting type after dereferencing.
fn deref(&self) -> &nsIRequestObserver
[src]
Dereferences the value.