class RShareBuf : public MStreamBuf |
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.
RFileBuf
Public Member Functions | |
---|---|
RShareBuf() | |
IMPORT_C void | Open(TStreamExchange &, TStreamPos, TInt) |
void | Open(TStreamExchange &, TInt) |
Protected Member Functions | |
---|---|
IMPORT_C TInt | DoReadL(TAny *, TInt) |
IMPORT_C TInt | DoReadL(TDes8 &, TInt, TRequestStatus &) |
IMPORT_C TStreamTransfer | DoReadL(MStreamInput &, TStreamTransfer) |
IMPORT_C void | DoRelease() |
IMPORT_C TStreamPos | DoSeekL(TMark, TStreamLocation, TInt) |
IMPORT_C void | DoWriteL(const TAny *, TInt) |
IMPORT_C TInt | DoWriteL(const TDesC8 &, TInt, TRequestStatus &) |
IMPORT_C TStreamTransfer | DoWriteL(MStreamOutput &, TStreamTransfer) |
Private Member Functions | |
---|---|
TStreamExchange & | Host() |
Inherited Enumerations | |
---|---|
MStreamBuf:TRead | |
MStreamBuf:TWrite |
Private Attributes | |
---|---|
TStreamExchange * | iHost |
TStreamMark | iRMark |
TStreamMark | iWMark |
IMPORT_C TInt | DoReadL | ( | TDes8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
TDes8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus |
IMPORT_C TStreamTransfer | DoReadL | ( | MStreamInput & | anInput, |
TStreamTransfer | aTransfer | |||
) | [protected, virtual] |
MStreamInput & anInput | |
TStreamTransfer aTransfer |
IMPORT_C TStreamPos | DoSeekL | ( | TMark | aMark, |
TStreamLocation | aLocation, | |||
TInt | anOffset | |||
) | [protected, virtual] |
TMark aMark | |
TStreamLocation aLocation | |
TInt anOffset |
IMPORT_C void | DoWriteL | ( | const TAny * | aPtr, |
TInt | aLength | |||
) | [protected, virtual] |
IMPORT_C TInt | DoWriteL | ( | const TDesC8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus | |||
) | [protected, virtual] |
const TDesC8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus |
IMPORT_C TStreamTransfer | DoWriteL | ( | MStreamOutput & | anOutput, |
TStreamTransfer | aTransfer | |||
) | [protected, virtual] |
MStreamOutput & anOutput | |
TStreamTransfer aTransfer |
IMPORT_C void | Open | ( | TStreamExchange & | aHost, |
TStreamPos | aPos, | |||
TInt | aMode = ERead|EWrite | |||
) |
TStreamExchange & aHost | |
TStreamPos aPos | |
TInt aMode = ERead|EWrite |
void | Open | ( | TStreamExchange & | aHost, |
TInt | aMode = ERead|EWrite | |||
) | [inline] |
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.
KStreamBeginning
TStreamExchange & aHost | The object that manages shared streaming. |
TInt aMode = ERead|EWrite | The streaming mode. This can be read and/or write, as indicated by the ERead and EWrite bits. |