#include <s32share.h>
class TStreamMark |
Manages the position of a read mark or a write mark within a shared stream.
A shared stream is one that shares its host with other streams. In practice, the host is a stream buffer that is, itself, hosted by a file, an RFileBuf object.
TStreamMark objects are owned by RShareBuf, one for reading and one for writing. They re-direct read/write operations through a TStreamExchange object to the RFileBuf object, which handles the actual file read and write operations.
See also: RFileBuf RShareBuf TStreamExchange
TStreamMark | ( | TStreamPos | aPos | ) | [inline] |
Constructs the shared stream mark object, setting the mark to the specified stream position.
An initialised mark means that a call to IsEmpty() returns false.
See also: IsEmpty()
Parameters | |
---|---|
aPos | The stream position |
void | ExtractL | ( | TStreamExchange & | aHost | ) | [inline] |
Refreshes this mark from the mark in the host stream buffer and tells the shared streaming manager to drop any reference it has to to this mark object.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
TBool | IsEmpty | ( | ) | const [inline] |
Tests whether this mark object is uninitialised.
TBool | IsWith | ( | TStreamExchange & | aHost | ) | const [inline] |
Tests whether the specified shared streaming manager currently refers to this mark object.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
TInt | ReadL | ( | TStreamExchange & | aHost, |
TAny * | aPtr, | |||
TInt | aMaxLength | |||
) | [inline] |
Reads data from the shared stream into the specified memory location.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aPtr | A pointer to the target memory location for the data read from the shared stream. |
aMaxLength | The maximum number of bytes to be read. |
IMPORT_C TInt | ReadL | ( | TStreamExchange & | aHost, |
TDes8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) |
TInt | ReadL | ( | TStreamExchange & | aHost, |
TDes8 & | aDes, | |||
TInt | aMaxLength, | |||
TRequestStatus & | aStatus | |||
) | [inline] |
Reads data, asynchronously, from the shared stream into the specified descriptor.
If the function leaves, then no read request will have been initiated.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aDes | The target descriptor for the data read from the shared stream. |
aMaxLength | The maximum number of bytes to be read. |
aStatus | The request status that indicates the completion status of this asynchronous request. |
TStreamTransfer | ReadL | ( | TStreamExchange & | aHost, |
MStreamInput & | anInput, | |||
TStreamTransfer | aTransfer | |||
) | [inline] |
Reads data from the shared stream into the specified data sink.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anInput | The sink which is the target for the read operation. |
aTransfer | Defines the amount of data available to be read from the shared stream. |
TInt | ReadL | ( | TStreamExchange & | aHost, |
MStreamInput & | anInput, | |||
TInt | aMaxLength | |||
) | [inline] |
Reads data from the shared stream into the specified data sink.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anInput | The sink which is the target for the read operation. |
aMaxLength | The maximum amount of data available to be read from the shared stream. |
void | ReadL | ( | TStreamExchange & | aHost, |
MStreamInput & | anInput | |||
) | [inline] |
Reads data from the shared stream into the specified data sink.
No explicit limit is placed on the amount of data that can be read.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anInput | The sink which is the target for the read operation. |
TBool | RelatesTo | ( | TStreamExchange & | aHost | ) | const [inline] |
Tests whether the specified shared streaming manager currently refers to this mark object OR whether this mark object is initialised.
See also: IsWith() TStreamExchange::IsActive()
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
void | SeekL | ( | TStreamExchange & | aHost, |
TStreamPos | aPos | |||
) | [inline] |
TStreamPos | SeekL | ( | TStreamExchange & | aHost, |
TStreamLocation | aLocation, | |||
TInt | anOffset = 0 | |||
) | [inline] |
Moves the position of the mark in the host stream.
The new position is calculated by adding the specified offset to one of:
the position of the beginning of the host stream
the position of the end of the host stream
the position of the current mark.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aLocation | The location in the host stream on which the calculation of the new position is based. |
anOffset | The offset value. |
TStreamPos | SeekL | ( | TStreamExchange & | aHost, |
TInt | anOffset | |||
) | [inline] |
Moves the position of the mark in the host stream.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anOffset | The amount by which the position of the mark is to be moved relative to the existing position of the mark. |
TStreamPos | TellL | ( | TStreamExchange & | aHost | ) | const [inline] |
Gets the position of the mark within the host stream.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
void | Withdraw | ( | TStreamExchange & | aHost | ) | [inline] |
Instructs the shared streaming manager to remove any reference it has to this mark object.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
void | WriteL | ( | TStreamExchange & | aHost, |
const TAny * | aPtr, | |||
TInt | aLength | |||
) | [inline] |
Writes data from the specified memory location into the shared stream.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aPtr | A pointer to the memory location from which data is to be written to the shared stream. |
aLength | The number of bytes to be written. |
IMPORT_C TInt | WriteL | ( | TStreamExchange & | aHost, |
const TDesC8 & | aDes, | |||
TRequestStatus & | aStatus | |||
) |
Writes data, asynchronously, from the specified descriptor into the shared stream.
The maximum number of bytes to be written is the value of the maximum length of the descriptor.
If the function leaves, then no write request will have been initiated.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aDes | The source descriptor for the data to be written into the shared stream. |
aStatus | The request status that indicates the completion status of this asynchronous request. |
TInt | WriteL | ( | TStreamExchange & | aHost, |
const TDesC8 & | aDes, | |||
TInt | aMaxLength, | |||
TRequestStatus & | aStatus | |||
) | [inline] |
Writes data, asynchronously, from the specified descriptor into the shared stream.
If the function leaves, then no write request will have been initiated.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
aDes | The source descriptor for the data to be written into the shared stream. |
aMaxLength | The maximum number of bytes to be written. |
aStatus | The request status that indicates the completion status of this asynchronous request. |
TStreamTransfer | WriteL | ( | TStreamExchange & | aHost, |
MStreamOutput & | anOutput, | |||
TStreamTransfer | aTransfer | |||
) | [inline] |
Writes data into the shared stream from the specified data source.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anOutput | The data source for the write operation. |
aTransfer | Defines the amount of data to be pulled from the output stream object. |
TInt | WriteL | ( | TStreamExchange & | aHost, |
MStreamOutput & | anOutput, | |||
TInt | aMaxLength | |||
) | [inline] |
Writes data into the shared stream from the specified data source
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anOutput | The data source for the write operation. |
aMaxLength | The maximum amount of data available to be written. |
void | WriteL | ( | TStreamExchange & | aHost, |
MStreamOutput & | anOutput | |||
) | [inline] |
Writes data into the shared stream from the specified data source.
No explicit limit is placed on the amount of data that can be written.
Parameters | |
---|---|
aHost | The object that manages shared streaming. |
anOutput | The data source for the write operation. |
operator TStreamMark * | ( | ) | [inline] |
operator const TStreamMark * | ( | ) | const [inline] |
TBool | operator!= | ( | const TStreamMark & | aMark | ) | const [inline] |
Tests whether this object and the specified shared stream mark object are different objects.
Parameters | |
---|---|
aMark | A pointer to a shared stream mark object. |
TBool | operator!= | ( | const TStreamMark * | aPtr | ) | const [inline] |
TStreamMark & | operator= | ( | TStreamPos | aPos | ) | [inline] |
Assigns the specified stream position value to this shared stream mark object.
Parameters | |
---|---|
aPos | The stream position value to be assigned. |
TBool | operator== | ( | const TStreamMark & | aMark | ) | const [inline] |
Tests whether this object and the specified referenced shared stream mark object are the same object.
Parameters | |
---|---|
aMark | A reference to a shared stream mark object. |