Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

nsIAsyncInputStream Interface Reference

import "nsIAsyncInputStream.idl";

Inheritance diagram for nsIAsyncInputStream:

nsIInputStream nsISupports

List of all members.


Detailed Description

If an input stream is non-blocking, it may return NS_BASE_STREAM_WOULD_BLOCK when read. The caller must then wait for the stream to have some data to read. If the stream implements nsIAsyncInputStream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the AsyncWait method).

While this interface is almost exclusively used with non-blocking streams, it is not necessary that nsIInputStream::isNonBlocking return true. Nor is it necessary that a non-blocking nsIInputStream implementation also implement nsIAsyncInputStream.

Definition at line 56 of file nsIAsyncInputStream.idl.


Public Member Functions

void asyncWait (in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget)
unsigned long available ()
void close ()
void closeWithStatus (in nsresult aStatus)
boolean isNonBlocking ()
unsigned long read (in charPtr aBuf, in unsigned long aCount)
unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount)
Methods
 NS_IMETHOD_ (nsrefcnt) Release(void)=0
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

Public Attributes

struct nsISupports_vtblvtbl
const unsigned long WAIT_CLOSURE_ONLY = (1<<0)

The documentation for this interface was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index