Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: s32share.h
Link against: estor.lib

Class RShareBuf

RShareBuf

Support

Supported from 5.0

Description

A shared stream buffer.

This class is part of the framework used by CFileStore that allows multiple stream buffers to concurrently access the single hosting file buffer, an RFileBuf object.

Each shared stream buffer maintains its own read and write positions.

Read and write operations to RShareBuf are directed through separate TStreamMark objects, one for read and one for write. The TStreamMark objects re-direct read/write operations through a TStreamExchange object to the RFileBuf object, which handles the actual file read and write operations.

This stream buffer can also be accessed through RShareReadStream and RShareWriteStream objects.

Derivation

MStreamBufA stream buffer that provides a generic I/O interface for streamed data
RShareBufA shared stream buffer

Defined in RShareBuf:
Open(), RShareBuf()

Inherited from MStreamBuf:
SeekL(), Close(), DoReadL(), DoRelease(), DoSeekL(), DoSynchL(), DoWriteL(), ERead, EWrite, PushL(), Read(), ReadL(), Release(), SeekL(), SizeL(), Synch(), SynchL(), TMark, TRead, TWrite, TellL(), Write(), WriteL()

See also:


Construction


RShareBuf()

RShareBuf();

Description

Constructs an empty shared stream buffer object.

Call one of the Open() functions to prepare the stream.

[Top]


Member functions


Open()

void Open(TStreamExchange& aHost,TStreamPos aPos,TInt aMode=ERead|EWrite);

Description

Prepares the shared stream buffer for streaming.

The function sets the read mark and/or the write mark to the specified position within the host stream.

Parameters

TStreamExchange& aHost

The object that manages shared streaming.

TStreamPos aPos

The position within the host stream.

TInt aMode

The streaming mode. This can be read and/or write, as indicated by the ERead and EWrite bits.

See also:


Open()

void Open(TStreamExchange& aHost,TInt aMode=ERead|EWrite);

Description

Prepares the shared stream buffer for streaming.

The function sets the read mark and/or the write mark to the beginning of the host stream.

Parameters

TStreamExchange& aHost

The object that manages shared streaming.

TInt aMode

The streaming mode. This can be read and/or write, as indicated by the ERead and EWrite bits.

See also: