class TStreamExchange |
Manages access to a shared host buffer for shared stream buffers.
The class maintains independent markers for the shared stream buffer that has most recently read or written to the shared host buffer.
This is the way in which multiple requests from the same shared stream buffer are handled without the need for repeated seeking. The shared host buffer only needs to seek when a new shared buffer needs to use it
Public Member Functions | |
---|---|
TStreamExchange() | |
TStreamExchange(MStreamBuf *) | |
IMPORT_C MStreamBuf * | Host() |
IMPORT_C MStreamBuf * | HostL() |
TBool | IsActive() |
IMPORT_C void | Release() |
void | Share(MStreamBuf *) |
IMPORT_C TInt | SizeL() |
Private Member Type Definitions | |
---|---|
typedef | MStreamBuf::TMark TMark |
Private Attributes | |
---|---|
MStreamBuf * | iHost |
TStreamMark * | iRMrk |
TStreamMark * | iWMrk |
TStreamExchange | ( | ) | [inline] |
Constructs an empty object.
Call Share() to prepare for access to a shared stream buffer.
TStreamExchange | ( | MStreamBuf * | aHost | ) | [inline] |
Constructs the object, specifying the stream buffer that will act as the shared host.
MStreamBuf * aHost | A pointer to a stream buffer that will act as the shared host. |
TStreamExchange | ( | const TStreamExchange & | ) | [private] |
Constructs an empty object.
Call Share() to prepare for access to a shared stream buffer.
const TStreamExchange & |
IMPORT_C TInt | DoReadL | ( | TAny * | aPtr, |
TInt | aMaxLength, | |||
TStreamMark & | aMark | |||
) | [private] |
TAny * aPtr | |
TInt aMaxLength | |
TStreamMark & aMark |
IMPORT_C TInt | DoReadL | ( | TDes8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus, | |||
TStreamMark & | aMark | |||
) | [private] |
TDes8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus | |
TStreamMark & aMark |
IMPORT_C TStreamTransfer | DoReadL | ( | MStreamInput & | anInput, |
TStreamTransfer | aTransfer, | |||
TStreamMark & | aMark | |||
) | [private] |
MStreamInput & anInput | |
TStreamTransfer aTransfer | |
TStreamMark & aMark |
IMPORT_C TStreamPos | DoSeekL | ( | TStreamMark & | aMark, |
TStreamLocation | aLocation, | |||
TInt | anOffset | |||
) | [private] |
TStreamMark & aMark | |
TStreamLocation aLocation | |
TInt anOffset |
IMPORT_C void | DoWriteL | ( | const TAny * | aPtr, |
TInt | aLength, | |||
TStreamMark & | aMark | |||
) | [private] |
const TAny * aPtr | |
TInt aLength | |
TStreamMark & aMark |
IMPORT_C TInt | DoWriteL | ( | const TDesC8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus, | |||
TStreamMark & | aMark | |||
) | [private] |
const TDesC8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus | |
TStreamMark & aMark |
IMPORT_C TStreamTransfer | DoWriteL | ( | MStreamOutput & | anOutput, |
TStreamTransfer | aTransfer, | |||
TStreamMark & | aMark | |||
) | [private] |
MStreamOutput & anOutput | |
TStreamTransfer aTransfer | |
TStreamMark & aMark |
IMPORT_C void | Drop | ( | const TStreamMark & | aMark | ) | [private] |
const TStreamMark & aMark |
TBool | IsActive | ( | ) | const [inline] |
Tests whether this object is using a stream buffer that is acting as shared host.
True, if this object is using a shared host ; false, otherwise.
TStreamPos | MarkSeekL | ( | TStreamMark & | aMark, |
TStreamLocation | aLocation, | |||
TInt | anOffset | |||
) | [private] |
TStreamMark & aMark | |
TStreamLocation aLocation | |
TInt anOffset |
TInt | PrepareAndReadL | ( | TAny * | aPtr, |
TInt | aMaxLength, | |||
TStreamMark & | aMark | |||
) | [private] |
TAny * aPtr | |
TInt aMaxLength | |
TStreamMark & aMark |
TInt | PrepareAndReadL | ( | TDes8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus, | |||
TStreamMark & | aMark | |||
) | [private] |
TDes8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus | |
TStreamMark & aMark |
TStreamTransfer | PrepareAndReadL | ( | MStreamInput & | anInput, |
TStreamTransfer | aTransfer, | |||
TStreamMark & | aMark | |||
) | [private] |
MStreamInput & anInput | |
TStreamTransfer aTransfer | |
TStreamMark & aMark |
void | PrepareAndWriteL | ( | const TAny * | aPtr, |
TInt | aLength, | |||
TStreamMark & | aMark | |||
) | [private] |
const TAny * aPtr | |
TInt aLength | |
TStreamMark & aMark |
TInt | PrepareAndWriteL | ( | const TDesC8 & | aDes, |
TInt | aMaxLength, | |||
TRequestStatus & | aStatus, | |||
TStreamMark & | aMark | |||
) | [private] |
const TDesC8 & aDes | |
TInt aMaxLength | |
TRequestStatus & aStatus | |
TStreamMark & aMark |
TStreamTransfer | PrepareAndWriteL | ( | MStreamOutput & | anOutput, |
TStreamTransfer | aTransfer, | |||
TStreamMark & | aMark | |||
) | [private] |
MStreamOutput & anOutput | |
TStreamTransfer aTransfer | |
TStreamMark & aMark |
void | PrepareForReadingL | ( | TStreamMark & | aMark | ) | [private] |
TStreamMark & aMark |
void | PrepareForWritingL | ( | TStreamMark & | aMark | ) | [private] |
TStreamMark & aMark |
IMPORT_C TBool | RefersTo | ( | const TStreamMark & | aMark | ) | [private] |
const TStreamMark & aMark |
void | Share | ( | MStreamBuf * | aHost | ) | [inline] |
Tells the object to use the specified stream buffer that will act as the shared host.
MStreamBuf * aHost | A pointer to a stream buffer that will act as the shared host. |
TStreamExchange & | operator= | ( | const TStreamExchange & | ) | [private] |
const TStreamExchange & |
typedef MStreamBuf::TMark | TMark | [private] |
Used to identify the type of mark in a stream.
The type is used by functions of this class and derived classes that perform seek operations to marks within a stream.
The type uses the ERead and EWrite enumeration values, as bit flags, to identify the read and write marks respectively.
ERead is an MStreamBuf::TRead enumerator. EWrite is an MStreamBuf::EWrite enumerator.