Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: S32SHARE.H
Link against: estor.lib

Class TStreamExchange

class TStreamExchange;

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

Members

Defined in TStreamExchange:
Host(), HostL(), IsActive(), Release(), Share(), SizeL(), TStreamExchange(), TStreamExchange()

See also:


Construction and destruction


TStreamExchange()

inline TStreamExchange();

Description

Constructs an empty object.

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


TStreamExchange()

inline TStreamExchange(MStreamBuf *aHost);

Description

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.

[Top]


Member functions


Share()

inline void Share(MStreamBuf *aHost);

Description

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.


IsActive()

inline TBool IsActive() const;

Description

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

Return value

TBool

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


Host()

IMPORT_C MStreamBuf *Host();

Description

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.

Return value

MStreamBuf *

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


HostL()

IMPORT_C MStreamBuf *HostL();

Description

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.

Return value

MStreamBuf *

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

See also:


Release()

IMPORT_C void Release();

Description

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


SizeL()

IMPORT_C TInt SizeL() const;

Description

Gets the size of the shared host buffer.

Return value

TInt

The size of the shared host buffer.