MStreamOutput Class Reference

#include <s32buf.h>

class MStreamOutput
Public Member Functions
pure virtual TInt PullL(TAny *, TInt)
pure virtual TStreamTransfer WriteToL(MStreamBuf &, TStreamTransfer)

Detailed Description

An interface to an object that acts as source for write operations to a stream. The object behaves as a generic data source.

A stream output object can act as an intelligent buffer, and is useful for performing filtering, compression or any other general kind of conversion operation that might be needed before writing to a stream.

The class is pure interface and requires an implementation.

See also: MStreamBuf::WriteL()

Member Function Documentation

PullL ( TAny *, TInt )

TInt PullL(TAny *aPtr,
TIntaMaxLength
)[pure virtual]

Writes data to an intermediate buffer from this stream output object.

This function is called by the default implementation of TStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer) and assumes that the target is a stream buffer's intermediate buffer.

See also: TStreamBuf::DoWriteL() TStreamBuf

Parameters
aPtrA pointer into the intermediate buffer where the write operation starts.
aMaxLengthThe maximum amount of data to be written.
Return Value
The amount of data written.

WriteToL ( MStreamBuf &, TStreamTransfer )

TStreamTransfer WriteToL(MStreamBuf &aSink,
TStreamTransferaTransfer
)[pure virtual]

Writes data to the specified stream from this stream output object.

This function is called by the default implementation of MStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer). It may also be called by TStreamBuf::DoWriteL(MStreamOutput&,TStreamTransfer), depending on the amount of data to be transferred and the nature of the buffering scheme.

See also: MStreamBuf::DoWriteL() TStreamBuf::DoWriteL()

Parameters
aSinkThe stream to which data is to be written.
aTransferDefines the amount of data available to be written.
Return Value
The amount of data that was not consumed.