Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
nsIInputStream.idl File Reference
import "nsISupports.idl";
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  nsIInputStream
 nsIInputStream More...

Typedefs

typedef NS_CALLBACKnsWriteSegmentFun )(nsIInputStream *aInStream, void *aClosure, const char *aFromSegment, PRUint32 aToOffset, PRUint32 aCount, PRUint32 *aWriteCount)
 The signature of the writer function passed to ReadSegments.

Functions

native nsWriteSegmentFun (nsWriteSegmentFun)

Typedef Documentation

typedef NS_CALLBACK( nsWriteSegmentFun)(nsIInputStream *aInStream, void *aClosure, const char *aFromSegment, PRUint32 aToOffset, PRUint32 aCount, PRUint32 *aWriteCount)

The signature of the writer function passed to ReadSegments.

This is the "consumer" of data that gets read from the stream's buffer.

Parameters:
aInStreamstream being read
aClosureopaque parameter passed to ReadSegments
aFromSegmentpointer to memory owned by the input stream
aToOffsetamount already read (since ReadSegments was called)
aCountlength of fromSegment
aWriteCountnumber of bytes read

Implementers should return the following:

Returns:
NS_OK and (*aWriteCount > 0) if consumed some data
<any-error> if not interested in consuming any data

Errors are never passed to the caller of ReadSegments.

NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior.

FROZEN

Definition at line 67 of file nsIInputStream.idl.


Function Documentation