Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: s32buf.h

Class MStreamInput

MStreamInput

Support

Supported from 5.0

Description

An interface to an object that acts as a target for read operations from a stream.

The object behaves as a generic data sink.

A stream input 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 after reading from a stream.

The class is pure interface and requires an implementation.

Defined in MStreamInput:
PushL(), ReadFromL()

See also:


Interface functions


ReadFromL()

virtual    TStreamTransfer ReadFromL(MStreamBuf& aSource,TStreamTransfer aTransfer)=0;

Description

Reads data from the specified stream into this stream input object.

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

Parameters

MStreamBuf& aSource

The stream from which data is to be read.

TStreamTransfer aTransfer

Defines the amount of data available to be read.

Return value

TStreamTransfer

The amount of data that was not consumed.

See also:


PushL()

virtual TInt PushL(const TAny* aPtr,TInt aMaxLength)=0;

Description

Reads data from an intermediate buffer into this stream input object.

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

Parameters

const TAny* aPtr

A pointer into the intermediate buffer from which the read operation starts.

TInt aMaxLength

The maximum amount of data to be read.

Return value

TInt

The amount of data read.

See also: