#include <S32SHARE.H>
Link against:
estor.lib
class TStreamMark;
Description
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.
Members
Defined in TStreamMark
:
Clear()
Resets the mark object to its default state.
ExtractL(TStreamExchange &)
Refreshes this mark from the mark in the host stream buffer and tells the shared...
IsEmpty()const
Tests whether this mark object is uninitialised.
IsWith(TStreamExchange &)const
Tests whether the specified shared streaming manager currently refers to this ma...
Position()const
Gets the position of the mark.
ReadL(TStreamExchange &,MStreamInput &)
Reads data from the shared stream into the specified data sink.
ReadL(TStreamExchange &,MStreamInput &,TInt)
Reads data from the shared stream into the specified data sink.
ReadL(TStreamExchange &,MStreamInput &,TStreamTransfer)
Reads data from the shared stream into the specified data sink.
ReadL(TStreamExchange &,TAny *,TInt)
Reads data from the shared stream into the specified memory location.
ReadL(TStreamExchange &,TDes8 &,TInt,TRequestStatus &)
Reads data, asynchronously, from the shared stream into the specified descriptor...
ReadL(TStreamExchange &,TDes8 &,TRequestStatus &)
RelatesTo(TStreamExchange &)const
Tests whether the specified shared streaming manager currently refers to this ma...
SeekL(TStreamExchange &,TInt)
Moves the position of the mark in the host stream.
SeekL(TStreamExchange &,TStreamLocation,TInt)
Moves the position of the mark in the host stream.
SeekL(TStreamExchange &,TStreamPos)
TStreamMark()
Constructs a default shared stream mark object.
TStreamMark(TStreamPos)
Constructs the shared stream mark object, setting the mark to the specified stre...
TellL(TStreamExchange &)const
Gets the position of the mark within the host stream.
Withdraw(TStreamExchange &)
Instructs the shared streaming manager to remove any reference it has to this ma...
WriteL(TStreamExchange &,MStreamOutput &)
Writes data into the shared stream from the specified data source.
WriteL(TStreamExchange &,MStreamOutput &,TInt)
Writes data into the shared stream from the specified data source
WriteL(TStreamExchange &,MStreamOutput &,TStreamTransfer)
Writes data into the shared stream from the specified data source.
WriteL(TStreamExchange &,const TAny *,TInt)
Writes data from the specified memory location into the shared stream.
WriteL(TStreamExchange &,const TDesC8 &,TInt,TRequestStatus &)
Writes data, asynchronously, from the specified descriptor into the shared strea...
WriteL(TStreamExchange &,const TDesC8 &,TRequestStatus &)
Writes data, asynchronously, from the specified descriptor into the shared strea...
operator TStreamMark *()
operator const TStreamMark *()const
operator!=(const TStreamMark &)const
Tests whether this object and the specified shared stream mark object are differ...
operator!=(const TStreamMark *)const
operator=(TStreamPos)
Assigns the specified stream position value to this shared stream mark object.
operator==(const TStreamMark &)const
Tests whether this object and the specified referenced shared stream mark object...
operator==(const TStreamMark *)const
See also:
RFileBuf
A stream buffer hosted by a file. ...
Construction and destruction
inline TStreamMark();
Description
Constructs a default shared stream mark object.
The position for the mark is uninitialised.
An uninitialised mark means that a call to TStreamMark::IsEmpty()const
returns true.
See also:
inline TStreamMark(TStreamPos aPos);
Description
Constructs the shared stream mark object, setting the mark to the specified stream position.
An initialised mark means that a call to TStreamMark::IsEmpty()const
returns false.
Parameters
See also:
inline TStreamMark& operator=(TStreamPos aPos);
Description
Assigns the specified stream position value to this shared stream mark object.
Parameters
TStreamPos aPos |
The stream position value to be assigned.
|
|
Return value
TStreamMark & |
A reference to this shared stream mark object.
|
|
inline operator TStreamMark *();
Description
Return value
operator const TStreamMark *()const
inline operator const TStreamMark *() const;
Description
Return value
operator==(const TStreamMark &)const
inline TBool operator==(const TStreamMark &aMark) const;
Description
Tests whether this object and the specified referenced shared stream mark object are the same object.
Parameters
const TStreamMark &aMark |
A reference to a shared stream mark object.
|
|
Return value
TBool
|
True, if the two objects are the same object; false, otherwise.
|
|
operator==(const TStreamMark *)const
inline TBool operator==(const TStreamMark *aPtr) const;
Description
Parameters
Return value
operator!=(const TStreamMark &)const
inline TBool operator!=(const TStreamMark &aMark) const;
Description
Tests whether this object and the specified shared stream mark object are different objects.
Parameters
const TStreamMark &aMark |
A pointer to a shared stream mark object.
|
|
Return value
TBool
|
True, if the two objects are different objects; false, otherwise.
|
|
operator!=(const TStreamMark *)const
inline TBool operator!=(const TStreamMark *aPtr) const;
Description
Parameters
Return value
inline TBool IsEmpty() const;
Description
Tests whether this mark object is uninitialised.
Return value
TBool
|
True, if this mark object is uninitialised; false, otherwise.
|
|
inline void Clear();
Description
Resets the mark object to its default state.
On return from this function, the mark is uninitialised and a call to TStreamMark::IsEmpty()const
returns true.
Empties the object/makes it empty so that TStreamMark::IsEmpty()const
returns false
inline TStreamPos Position() const;
Description
Gets the position of the mark.
Return value
IsWith(TStreamExchange &)const
inline TBool IsWith(TStreamExchange &aHost) const;
Description
Tests whether the specified shared streaming manager currently refers to this mark object.
Parameters
Return value
TBool
|
True, if the shared stream manager refers to this mark; false, otherwise.
|
|
RelatesTo(TStreamExchange &)const
inline TBool RelatesTo(TStreamExchange &aHost) const;
Description
Tests whether the specified shared streaming manager currently refers to this mark object OR whether this mark object is initialised.
Parameters
Return value
TBool
|
True, if the shared stream manager refers to this mark OR if this mark object is initialised; false, otherwise.
|
|
See also:
Withdraw(TStreamExchange &)
inline void Withdraw(TStreamExchange &aHost);
Description
Instructs the shared streaming manager to remove any reference it has to this mark object.
Parameters
ExtractL(TStreamExchange &)
inline void ExtractL(TStreamExchange &aHost);
Description
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
ReadL(TStreamExchange &,TAny *,TInt)
inline TInt ReadL(TStreamExchange &aHost, TAny *aPtr, TInt aMaxLength);
Description
Reads data from the shared stream into the specified memory location.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
TAny *aPtr |
A pointer to the target memory location for the data read from the shared stream.
|
TInt aMaxLength |
The maximum number of bytes to be read.
|
|
Return value
TInt
|
The number of bytes read.
|
|
ReadL(TStreamExchange &,TDes8 &,TRequestStatus &)
IMPORT_C TInt ReadL(TStreamExchange &aHost, TDes8 &aDes, TRequestStatus &aStatus);
Description
Parameters
Return value
ReadL(TStreamExchange &,TDes8 &,TInt,TRequestStatus &)
inline TInt ReadL(TStreamExchange &aHost, TDes8 &aDes, TInt aMaxLength, TRequestStatus &aStatus);
Description
Reads data, asynchronously, from the shared stream into the specified descriptor.
If the function leaves, then no read request will have been initiated.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
TDes8 &aDes |
The target descriptor for the data read from the shared stream.
|
TInt aMaxLength |
The maximum number of bytes to be read.
|
TRequestStatus &aStatus |
The request status that indicates the completion status of this asynchronous request.
|
|
Return value
TInt
|
The maximum number of bytes to be read, as used in this request. This can be different to the value supplied in aMaxLength;
this is dependent on the implementation of the underlying stream.
|
|
ReadL(TStreamExchange &,MStreamInput &,TStreamTransfer)
inline TStreamTransfer ReadL(TStreamExchange &aHost, MStreamInput &anInput, TStreamTransfer aTransfer);
Description
Reads data from the shared stream into the specified data sink.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
MStreamInput &anInput |
The sink which is the target for the read operation.
|
TStreamTransfer aTransfer |
Defines the amount of data available to be read from the shared stream.
|
|
Return value
ReadL(TStreamExchange &,MStreamInput &,TInt)
inline TInt ReadL(TStreamExchange &aHost, MStreamInput &anInput, TInt aMaxLength);
Description
Reads data from the shared stream into the specified data sink.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
MStreamInput &anInput |
The sink which is the target for the read operation.
|
TInt aMaxLength |
The maximum amount of data available to be read from the shared stream.
|
|
Return value
TInt
|
The amount of data that was not consumed.
|
|
ReadL(TStreamExchange &,MStreamInput &)
inline void ReadL(TStreamExchange &aHost, MStreamInput &anInput);
Description
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
TStreamExchange &aHost |
The object that manages shared streaming.
|
MStreamInput &anInput |
The sink which is the target for the read operation.
|
|
WriteL(TStreamExchange &,const TAny *,TInt)
inline void WriteL(TStreamExchange &aHost, const TAny *aPtr, TInt aLength);
Description
Writes data from the specified memory location into the shared stream.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
const TAny *aPtr |
A pointer to the memory location from which data is to be written to the shared stream.
|
TInt aLength |
The number of bytes to be written.
|
|
WriteL(TStreamExchange &,const TDesC8 &,TRequestStatus &)
IMPORT_C TInt WriteL(TStreamExchange &aHost, const TDesC8 &aDes, TRequestStatus &aStatus);
Description
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
TStreamExchange &aHost |
The object that manages shared streaming.
|
const TDesC8 &aDes |
The source descriptor for the data to be written into the shared stream.
|
TRequestStatus &aStatus |
The request status that indicates the completion status of this asynchronous request.
|
|
Return value
TInt
|
The maximum number of bytes to be written, as used in this request. This can be different to the maximum length of the descriptor;
this is dependent on the implementation.
|
|
WriteL(TStreamExchange &,const TDesC8 &,TInt,TRequestStatus &)
inline TInt WriteL(TStreamExchange &aHost, const TDesC8 &aDes, TInt aMaxLength, TRequestStatus &aStatus);
Description
Writes data, asynchronously, from the specified descriptor into the shared stream.
If the function leaves, then no write request will have been initiated.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
const TDesC8 &aDes |
The source descriptor for the data to be written into the shared stream.
|
TInt aMaxLength |
The maximum number of bytes to be written.
|
TRequestStatus &aStatus |
The request status that indicates the completion status of this asynchronous request.
|
|
Return value
TInt
|
The maximum number of bytes to be written, as used in this request. This can be different to the value supplied in aMaxLength;
this is dependent on the implementation.
|
|
WriteL(TStreamExchange &,MStreamOutput &,TStreamTransfer)
inline TStreamTransfer WriteL(TStreamExchange &aHost, MStreamOutput &anOutput, TStreamTransfer aTransfer);
Description
Writes data into the shared stream from the specified data source.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
MStreamOutput &anOutput |
The data source for the write operation.
|
TStreamTransfer aTransfer |
Defines the amount of data to be pulled from the output stream object.
|
|
Return value
TStreamTransfer
|
A stream transfer object defining the amount of data that was not consumed.
|
|
WriteL(TStreamExchange &,MStreamOutput &,TInt)
inline TInt WriteL(TStreamExchange &aHost, MStreamOutput &anOutput, TInt aMaxLength);
Description
Writes data into the shared stream from the specified data source
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
MStreamOutput &anOutput |
The data source for the write operation.
|
TInt aMaxLength |
The maximum amount of data available to be written.
|
|
Return value
TInt
|
The amount of data that was not consumed.
|
|
WriteL(TStreamExchange &,MStreamOutput &)
inline void WriteL(TStreamExchange &aHost, MStreamOutput &anOutput);
Description
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
SeekL(TStreamExchange &,TStreamPos)
inline void SeekL(TStreamExchange &aHost, TStreamPos aPos);
Description
Parameters
SeekL(TStreamExchange &,TStreamLocation,TInt)
inline TStreamPos SeekL(TStreamExchange &aHost, TStreamLocation aLocation, TInt anOffset=0);
Description
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
TStreamExchange &aHost |
The object that manages shared streaming.
|
TStreamLocation aLocation |
The location in the host stream on which the calculation of the new position is based.
|
TInt anOffset |
The offset value.
|
|
Return value
SeekL(TStreamExchange &,TInt)
inline TStreamPos SeekL(TStreamExchange &aHost, TInt anOffset);
Description
Moves the position of the mark in the host stream.
Parameters
TStreamExchange &aHost |
The object that manages shared streaming.
|
TInt anOffset |
The amount by which the position of the mark is to be moved relative to the existing position of the mark.
|
|
Return value
TellL(TStreamExchange &)const
inline TStreamPos TellL(TStreamExchange &aHost) const;
Description
Gets the position of the mark within the host stream.
Parameters
Return value