Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <W32STD.H>

Class RWsGraphicMsgBuf

class RWsGraphicMsgBuf : private RBuf8;

Description

Utility class for building data buffers to be attached to CWindowGc::DrawWsGraphic(const TWsGraphicId &,const TRect &) commands Useful when there is more than one piece of data to be attached to the draw command

Derivation

Members

Defined in RWsGraphicMsgBuf:

Inherited from RBuf8:

Inherited from TDes8:

Inherited from TDesC8:


Construction and destruction


RWsGraphicMsgBuf()

IMPORT_C RWsGraphicMsgBuf();

Description

Default Constructor

[Top]


Member functions


Close()

IMPORT_C void Close();

Description


CleanupClosePushL()

IMPORT_C void CleanupClosePushL();

Description


Append(TUid,const TDesC8 &)

IMPORT_C TInt Append(TUid aTypeId, const TDesC8 &aData);

Description

Append a descriptor as data

Parameters

TUid aTypeId

the type of the message to append

const TDesC8 &aData

arbitrary length data consisting of the whole message

Return value

TInt

KErrNone if successful, else a system-wide error code


Append(TUid,const TDesC16 &)

IMPORT_C TInt Append(TUid aTypeId, const TDesC16 &aData);

Description

Append a descriptor as data

Parameters

TUid aTypeId

the type of the message to append

const TDesC16 &aData

arbitrary length data consisting of the whole message

Return value

TInt

KErrNone if successful, else a system-wide error code


Append(TUid,TInt,TPtr8 &)

IMPORT_C TInt Append(TUid aTypeId, TInt aLen, TPtr8 &aPtr);

Description

Append a message of the specified length and type, and return a pointer to allow client code to modify the message. aPtr is only set if the append succeeds. aPtr is only valid until the next message is appended to the buffer.

Parameters

TUid aTypeId

the type of the message to append

TInt aLen

the length of the message to be reserved

TPtr8 &aPtr

a modifiable descriptor to be used by the client code to write into the message body

Return value

TInt

KErrNone if successful, else a system-wide error code


Append(const TWsGraphicMsgFixedBase &)

IMPORT_C TInt Append(const TWsGraphicMsgFixedBase &aMsg);

Description

Append a fixed-size message

Parameters

const TWsGraphicMsgFixedBase &aMsg

the fixed-size message to append

Return value

TInt

KErrNone if successful, else a system-wide error code


Remove(TInt)

IMPORT_C void Remove(TInt aIndex);

Description

Remove a message from the buffer

Parameters

TInt aIndex

the ordinal position of message to be removed

Panic codes

if

the index is out of bounds


Count()const

IMPORT_C TInt Count() const;

Description

Returns the number of messages in the buffer

Return value

TInt

the number of messages in the buffer


TypeId(TInt)const

IMPORT_C TUid TypeId(TInt aIndex) const;

Description

Returns the Type ID of a message in the buffer

Parameters

TInt aIndex

the ordinal position of the message

Return value

TUid

the Type ID of the message

Panic codes

if

the index is out of bounds


Data(TInt)const

IMPORT_C TPtrC8 Data(TInt aIndex) const;

Description

Returns a non-modifiable descriptor of a message body in the buffer

Parameters

TInt aIndex

the ordinal position of the message

Return value

TPtrC8

the message body

Panic codes

if

the index is out of bounds


Data(TInt)

IMPORT_C TPtr8 Data(TInt aIndex);

Description

Returns a modifiable descriptor of a message body in the buffer The returned TPtr8 is only valid until the next message is appended to the buffer.

Parameters

TInt aIndex

the ordinal position of the message

Return value

TPtr8

the message body

Panic codes

if

the index is out of bounds


GetFixedMsg(TWsGraphicMsgFixedBase &,TInt)const

IMPORT_C void GetFixedMsg(TWsGraphicMsgFixedBase &aMsg, TInt aIndex) const;

Description

Returns a copy of a fixed-size message in the buffer

Parameters

TWsGraphicMsgFixedBase &aMsg

TInt aIndex

the ordinal position of the message

Panic codes

if

the index is out of bounds

the

message specified is not of the correct type


Pckg()const

IMPORT_C const TDesC8& Pckg() const;

Description

Returns the message buffer as a descriptor. Example:

    RWsGraphicMsgBuf msgBuf;
    msgBuf.Append(...);
    ...
    TWsGraphicId id(...);
    SystemGc().DrawWsGraphic(id,Rect(),msgBuf.Pckg());
    msgBuf.Close();

Return value

const TDesC8 &

the message buffer to be attached a command to draw a CWsGraphic

See also: