TStreamExchange Class Reference
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
RShareBuf
Private Member Functions |
---|
| TStreamExchange(const TStreamExchange &) |
MStreamBuf & | Buf() |
MStreamBuf & | BufL() |
IMPORT_C TInt | DoReadL(TAny *, TInt, TStreamMark &) |
IMPORT_C TInt | DoReadL(TDes8 &, TInt, TRequestStatus &, TStreamMark &) |
IMPORT_C TStreamTransfer | DoReadL(MStreamInput &, TStreamTransfer, TStreamMark &) |
IMPORT_C TStreamPos | DoSeekL(TStreamMark &, TStreamLocation, TInt) |
IMPORT_C void | DoWriteL(const TAny *, TInt, TStreamMark &) |
IMPORT_C TInt | DoWriteL(const TDesC8 &, TInt, TRequestStatus &, TStreamMark &) |
IMPORT_C TStreamTransfer | DoWriteL(MStreamOutput &, TStreamTransfer, TStreamMark &) |
IMPORT_C void | Drop(const TStreamMark &) |
IMPORT_C void | GetL(TStreamMark &) |
TStreamPos
| MarkSeekL(TStreamMark &, TStreamLocation, TInt) |
TInt
| PrepareAndReadL(TAny *, TInt, TStreamMark &) |
TInt
| PrepareAndReadL(TDes8 &, TInt, TRequestStatus &, TStreamMark &) |
TStreamTransfer
| PrepareAndReadL(MStreamInput &, TStreamTransfer, TStreamMark &) |
void | PrepareAndWriteL(const TAny *, TInt, TStreamMark &) |
TInt
| PrepareAndWriteL(const TDesC8 &, TInt, TRequestStatus &, TStreamMark &) |
TStreamTransfer
| PrepareAndWriteL(MStreamOutput &, TStreamTransfer, TStreamMark &) |
void | PrepareForReadingL(TStreamMark &) |
void | PrepareForWritingL(TStreamMark &) |
IMPORT_C TBool | RefersTo(const TStreamMark &) |
TStreamExchange & | operator=(const TStreamExchange &) |
Constructor & Destructor Documentation
TStreamExchange()
TStreamExchange | ( | ) | [inline] |
Constructs an empty object.
Call Share() to prepare for access to a shared stream buffer.
TStreamExchange(MStreamBuf *)
Constructs the object, specifying the stream buffer that will act as the shared host.
Parameters
MStreamBuf * aHost | A pointer to a stream buffer that will act as the shared host. |
TStreamExchange(const TStreamExchange &)
Constructs an empty object.
Call Share() to prepare for access to a shared stream buffer.
Member Functions Documentation
DoReadL(TAny *, TInt, TStreamMark &)
DoReadL(TDes8 &, TInt, TRequestStatus &, TStreamMark &)
DoReadL(MStreamInput &, TStreamTransfer, TStreamMark &)
DoSeekL(TStreamMark &, TStreamLocation, TInt)
DoWriteL(const TAny *, TInt, TStreamMark &)
DoWriteL(const TDesC8 &, TInt, TRequestStatus &, TStreamMark &)
DoWriteL(MStreamOutput &, TStreamTransfer, TStreamMark &)
Drop(const TStreamMark &)
Host()
Gets a pointer to the stream buffer that acts as the shared host.
The function refreshes the active read/write marks and gives the caller exclusive use of the shared host.
HostL()
Gets a pointer to the stream buffer that acts as the shared host, and leaves if this object is not active.
The function refreshes the active read/write marks and gives the caller exclusive use of the shared host.
IsActive()
IsActive()
TBool
| IsActive | ( | ) | const [inline] |
Tests whether this object is using a stream buffer that is acting as shared host.
MarkSeekL(TStreamMark &, TStreamLocation, TInt)
PrepareAndReadL(TAny *, TInt, TStreamMark &)
PrepareAndReadL(TDes8 &, TInt, TRequestStatus &, TStreamMark &)
PrepareAndReadL(MStreamInput &, TStreamTransfer, TStreamMark &)
PrepareAndWriteL(const TAny *, TInt, TStreamMark &)
PrepareAndWriteL(const TDesC8 &, TInt, TRequestStatus &, TStreamMark &)
PrepareAndWriteL(MStreamOutput &, TStreamTransfer, TStreamMark &)
PrepareForReadingL(TStreamMark &)
PrepareForWritingL(TStreamMark &)
RefersTo(const TStreamMark &)
Release()
Releases the reference to the shared host, and drops any active read or write marks.
Share(MStreamBuf *)
Tells the object to use the specified stream buffer that will act as the shared host.
Parameters
MStreamBuf * aHost | A pointer to a stream buffer that will act as the shared host. |
SizeL()
IMPORT_C TInt | SizeL | ( | ) | const |
Gets the size of the shared host buffer.
operator=(const TStreamExchange &)
Member Type Definitions Documentation
Typedef TMark
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.
MStreamBuf::TRead MStreamBuf::TWrite
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.