RCommsBuf Class Reference

class RCommsBuf

Represents the COMMS specific metadata and payload of a shared buffer

Constructor & Destructor Documentation

RCommsBuf()

RCommsBuf ( ) [protected, inline]

RCommsBuf(TInt, TUint, TInt, TInt)

RCommsBuf ( TInt aRawDataOffset,
TUint aBufSize,
TInt aHandle,
TInt aPool
) [protected, inline]

Parameters

TInt aRawDataOffset
TUint aBufSize
TInt aHandle
TInt aPool

RCommsBuf(TInt, TUint, TInt)

RCommsBuf ( TInt aRawDataOffset,
TUint aBufSize,
TInt aPool
) [protected, inline]

Parameters

TInt aRawDataOffset
TUint aBufSize
TInt aPool

RCommsBuf(const RCommsBuf &)

RCommsBuf ( const RCommsBuf & ) [private]

Parameters

const RCommsBuf &

Member Functions Documentation

AdjustDataEnd(TInt)

void AdjustDataEnd ( TInt aDelta ) [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)

void AdjustDataStart ( TInt aDelta ) [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 ( TUint aSize,
TCommsBufAllocator & aAccessor
) [static]

Allocates memory for a RCommsBuf object.

Parameters

TUint aSize Requested total size
TCommsBufAllocator & aAccessor A handle to the allocator

Append(const TDesC8 &)

IMPORT_C void Append ( 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 & aSrc Data to append

AppendLimit()

TInt AppendLimit ( ) const [inline]

Returns the length of the bytes that can be appended

AssertCommsBufInvariants()

void AssertCommsBufInvariants ( ) const [private, inline]

DesC8()

TPtrC8 DesC8 ( ) const [inline]

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

Free()

IMPORT_C void Free ( )

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 void Prepend ( 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 & aSrc Data 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 void Read ( TDes8 & aDest,
TInt aOffset = 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 = 0 The offset

Reset()

void Reset ( ) [inline]

Resets the length and offset of the RCommsBuf data

SetDataRange(TInt, TInt)

void SetDataRange ( TInt aOffset,
TInt aLength
) [inline]

Sets the offset and length of the data

Parameters

TInt aOffset An offset
TInt aLength A length

SetNext(RCommsBuf *)

void SetNext ( RCommsBuf * aBuf ) [protected, inline]

Parameters

RCommsBuf * aBuf

SetOffset(TInt)

void SetOffset ( TInt aOffset ) [protected, inline]

Sets the RCommsBuf data offset

Parameters

TInt aOffset An offset

Write(const TDesC8 &, TInt)

IMPORT_C void Write ( const TDesC8 & aSrc,
TInt aOffset = 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 & aSrc Data to be written
TInt aOffset = 0 Offset within the CommsBuf

operator delete(TAny *, const TUint8 *)

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

Parameters

TAny * aPtr
const TUint8 *

operator new(TUint, const TUint8 *)

TAny * operator new ( TUint aSize,
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[] ( TInt aPos ) const [inline]

Parameters

TInt aPos

operator[](TInt)

TUint8 & operator[] ( TInt aPos ) [inline]

Parameters

TInt aPos

Member Data Documentation

TCommsBuf iCommsBufMetaData

TCommsBuf iCommsBufMetaData [protected]