TStreamExchange Class Reference

#include <s32share.h>

class TStreamExchange
Public Member Functions
TStreamExchange()
TStreamExchange(MStreamBuf *)
IMPORT_C MStreamBuf *Host()
IMPORT_C MStreamBuf *HostL()
TBool IsActive()
IMPORT_C voidRelease()
voidShare(MStreamBuf *)
IMPORT_C TIntSizeL()

Detailed Description

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

See also: RShareBuf

Constructor & Destructor Documentation

TStreamExchange ( )

TStreamExchange()[inline]

Constructs an empty object.

Call Share() to prepare for access to a shared stream buffer.

TStreamExchange ( MStreamBuf * )

TStreamExchange(MStreamBuf *aHost)[inline]

Constructs the object, specifying the stream buffer that will act as the shared host.

ParameterDescription
aHostA pointer to a stream buffer that will act as the shared host.

Member Function Documentation

Host ( )

IMPORT_C MStreamBuf *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.

Returns: A pointer to a stream buffer that acts as shared host.

HostL ( )

IMPORT_C MStreamBuf *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.

See also: IsActive()

Returns: A pointer to a stream buffer that acts as shared host.

IsActive ( )

TBool IsActive()const [inline]

Tests whether this object is using a stream buffer that is acting as shared host.

Returns: True, if this object is using a shared host ; false, otherwise.

Release ( )

IMPORT_C voidRelease()

Releases the reference to the shared host, and drops any active read or write marks.

Share ( MStreamBuf * )

voidShare(MStreamBuf *aHost)[inline]

Tells the object to use the specified stream buffer that will act as the shared host.

ParameterDescription
aHostA pointer to a stream buffer that will act as the shared host.

SizeL ( )

IMPORT_C TIntSizeL()const

Gets the size of the shared host buffer.

Returns: The size of the shared host buffer.