RCommsBuf Class Reference

class RCommsBuf

Represents the COMMS specific metadata and payload of a shared buffer

Public Member Functions
voidAdjustDataEnd(TInt)
voidAdjustDataStart(TInt)
IMPORT_C RCommsBuf *Alloc(TUint, TCommsBufAllocator &)
IMPORT_C voidAppend(const TDesC8 &)
TInt AppendLimit()
TPtrC8 DesC8()
IMPORT_C voidFree()
TInt Length()
TInt Offset()
IMPORT_C voidPrepend(const TDesC8 &)
TInt PrependLimit()
const TUint8 *Ptr()
TUint8 *Ptr()
const TUint8 *RawBase()
TUint8 *RawBase()
TInt RawSize()
IMPORT_C voidRead(TDes8 &, TInt)
voidReset()
voidSetDataRange(TInt, TInt)
IMPORT_C voidWrite(const TDesC8 &, TInt)
TUint8 operator[](TInt)
TUint8 &operator[](TInt)
Protected Member Functions
RCommsBuf()
RCommsBuf(TInt, TUint, TInt, TInt)
RCommsBuf(TInt, TUint, TInt)
RCommsBuf *Next()
const RCommsBuf *Next()
voidSetNext(RCommsBuf *)
voidSetOffset(TInt)
Private Member Functions
RCommsBuf(const RCommsBuf &)
voidAssertCommsBufInvariants()
TInt Handle()
CCommsBufPool *Pool()
voidoperator delete(TAny *, const TUint8 *)
TAny *operator new(TUint, const TUint8 *)
RCommsBuf &operator=(const RCommsBuf &)
Protected Attributes
TCommsBuf iCommsBufMetaData

Constructor & Destructor Documentation

RCommsBuf()

RCommsBuf()[protected, inline]

RCommsBuf(TInt, TUint, TInt, TInt)

RCommsBuf(TIntaRawDataOffset,
TUintaBufSize,
TIntaHandle,
TIntaPool
)[protected, inline]

Parameters

TInt aRawDataOffset
TUint aBufSize
TInt aHandle
TInt aPool

RCommsBuf(TInt, TUint, TInt)

RCommsBuf(TIntaRawDataOffset,
TUintaBufSize,
TIntaPool
)[protected, inline]

Parameters

TInt aRawDataOffset
TUint aBufSize
TInt aPool

RCommsBuf(const RCommsBuf &)

RCommsBuf(const RCommsBuf &)[private]

Parameters

const RCommsBuf &

Member Functions Documentation

AdjustDataEnd(TInt)

voidAdjustDataEnd(TIntaDelta)[inline]

Adjust the RCommsBuf data length with the given delta value. ie; the data length is incremented by the given value

Parameters

TInt aDelta

AdjustDataStart(TInt)

voidAdjustDataStart(TIntaDelta)[inline]

Adjust the RCommsBuf data offset and length with the given delta value. ie; the data offset is incremented by the given delta value and the data length is decremented by the given delta value

Parameters

TInt aDelta

Alloc(TUint, TCommsBufAllocator &)

IMPORT_C RCommsBuf *Alloc(TUintaSize,
TCommsBufAllocator &aAccessor
)[static]

Allocates memory for a RCommsBuf object.

Parameters

TUint aSizeRequested total size
TCommsBufAllocator & aAccessorA handle to the allocator

Append(const TDesC8 &)

IMPORT_C voidAppend(const TDesC8 &aSrc)

Append data onto the end of RCommsBuf data. The length of the CommsBuf data is incremented to reflect the new content

Parameters

const TDesC8 & aSrcData to append

AppendLimit()

TInt AppendLimit()const [inline]

Returns the length of the bytes that can be appended

AssertCommsBufInvariants()

voidAssertCommsBufInvariants()const [private, inline]

DesC8()

TPtrC8 DesC8()const [inline]

Creates and returns a non-modifiable pointer descriptor representing the contained data

Free()

IMPORT_C voidFree()

Frees the RCommsBuf

Handle()

TInt Handle()const [private, inline]

Length()

TInt Length()const [inline]

Returns the length of the RCommsBuf data

Next()

RCommsBuf *Next()[protected, inline]

Next()

const RCommsBuf *Next()const [protected, inline]

Offset()

TInt Offset()const [inline]

Returns the offset of the RCommsBuf data

Pool()

CCommsBufPool *Pool()const [private, inline]

Prepend(const TDesC8 &)

IMPORT_C voidPrepend(const TDesC8 &aSrc)

Prepend data onto the beginning of RCommsBuf data. The length and offset of the will be adjusted to reflect the new content

Parameters

const TDesC8 & aSrcData to append

PrependLimit()

TInt PrependLimit()const [inline]

Returns the length of the data that can be prepended

Ptr()

const TUint8 *Ptr()const [inline]

Returns a const pointer to the actual location of the data start. Actual data start location may differ from the start of the data

RCommsBuf::RawBase

Ptr()

TUint8 *Ptr()[inline]

Returns a pointer to the actual location of the data start.

RCommsBuf::RawBase

RawBase()

const TUint8 *RawBase()const [inline]

Returns a const ponter to the start of the data represented by the RCommsBuf

RawBase()

TUint8 *RawBase()[inline]

Returns a ponter to the start of the data represented by the RCommsBuf

RawSize()

TInt RawSize()const [inline]

Returns the raw size of the RCommsBuf data

Read(TDes8 &, TInt)

IMPORT_C voidRead(TDes8 &aDest,
TIntaOffset = 0
)const

The supplied descriptor will be read from the specified offset within the RCommsBuf data

panic
MBuf::11 If the given offset is negative or greater than the length of the CommsBuf data

Parameters

TDes8 & aDest
TInt aOffset = 0The offset

Reset()

voidReset()[inline]

Resets the length and offset of the RCommsBuf data

SetDataRange(TInt, TInt)

voidSetDataRange(TIntaOffset,
TIntaLength
)[inline]

Sets the offset and length of the data

Parameters

TInt aOffsetAn offset
TInt aLengthA length

SetNext(RCommsBuf *)

voidSetNext(RCommsBuf *aBuf)[protected, inline]

Parameters

RCommsBuf * aBuf

SetOffset(TInt)

voidSetOffset(TIntaOffset)[protected, inline]

Sets the RCommsBuf data offset

Parameters

TInt aOffsetAn offset

Write(const TDesC8 &, TInt)

IMPORT_C voidWrite(const TDesC8 &aSrc,
TIntaOffset = 0
)

The supplied descriptor will be written to the specified offset within the RCommsBuf data

panic
MBuf::11 If the given offset is negative

Parameters

const TDesC8 & aSrcData to be written
TInt aOffset = 0Offset within the CommsBuf

operator delete(TAny *, const TUint8 *)

voidoperator delete(TAny *aPtr,
const TUint8 *
)[private, inline]

Parameters

TAny * aPtr
const TUint8 *

operator new(TUint, const TUint8 *)

TAny *operator new(TUintaSize,
const TUint8 *aPtr
)[private, inline]

Parameters

TUint aSize
const TUint8 * aPtr

operator=(const RCommsBuf &)

RCommsBuf &operator=(const RCommsBuf &)[private]

Parameters

const RCommsBuf &

operator[](TInt)

TUint8 operator[](TIntaPos)const [inline]

Parameters

TInt aPos

operator[](TInt)

TUint8 &operator[](TIntaPos)[inline]

Parameters

TInt aPos

Member Data Documentation

TCommsBuf iCommsBufMetaData

TCommsBuf iCommsBufMetaData[protected]