TTlvStructBase Class Reference

class TTlvStructBase

Provides methods to append, remove or perform iterative lookup for items in container buffer. Classes ItemIdType and ItemDataLengthType have to implement interfaces MTlvItemIdType and MTlvItemDataLengthType in order to enable proper encoding and decoding of the first two fields in the unit.

Constructor & Destructor Documentation

TTlvStructBase(TPtr8 &, TUint8)

IMPORT_C TTlvStructBase ( TPtr8 & ,
TUint8
) [protected]

Default constructor initializes data members

Parameters

TPtr8 &
TUint8

Member Functions Documentation

AnyNextItemL(MTlvItemIdType &, TPtr8 &, MTlvItemIdType &, MTlvItemDataLengthType &)

IMPORT_C TInt AnyNextItemL ( MTlvItemIdType & aIdFound,
TPtr8 & aData,
MTlvItemIdType & aId,
MTlvItemDataLengthType & aDataLength
) [protected]

Parameters

MTlvItemIdType & aIdFound
TPtr8 & aData
MTlvItemIdType & aId
MTlvItemDataLengthType & aDataLength

AppendItemL(MTlvItemIdType &, MTlvItemDataLengthType &, const TPtr8 &)

IMPORT_C TInt AppendItemL ( MTlvItemIdType & aId,
MTlvItemDataLengthType & aDataLengthType,
const TPtr8 & aData
) [protected]

Base class implementation of methods in the templated class

Parameters

MTlvItemIdType & aId
MTlvItemDataLengthType & aDataLengthType
const TPtr8 & aData

NextItemL(const MTlvItemIdType &, TPtr8 &, MTlvItemIdType &, MTlvItemDataLengthType &)

IMPORT_C TInt NextItemL ( const MTlvItemIdType & aWantedId,
TPtr8 & aData,
MTlvItemIdType & aId,
MTlvItemDataLengthType & aDataLength
) [protected]

Parameters

const MTlvItemIdType & aWantedId
TPtr8 & aData
MTlvItemIdType & aId
MTlvItemDataLengthType & aDataLength

RemoveNextItemL(MTlvItemIdType &, MTlvItemIdType &, MTlvItemDataLengthType &)

IMPORT_C TInt RemoveNextItemL ( MTlvItemIdType & aIdToRemove,
MTlvItemIdType & aId,
MTlvItemDataLengthType & aDataLength
) [protected]

Parameters

MTlvItemIdType & aIdToRemove
MTlvItemIdType & aId
MTlvItemDataLengthType & aDataLength

ResetCursorPos()

IMPORT_C void ResetCursorPos ( )

Sets position of the cursor to start position (0)

Member Data Documentation

TUint iCursorPos

TUint iCursorPos [protected]

Cursor indicates last accessed item in the buffer

TUint8 iFreeSpaceChar

TUint8 iFreeSpaceChar [protected]

Character used to populate the zone that hasn't been assigned to any element. this free zone ends at the end of the buffer

TUint iFreeSpacePos

TUint iFreeSpacePos [protected]

Position in the buffer that indicates start of the zone that hasn't been assigned to any element. this free zone ends at the end of the buffer

TPtr8 & iPtr

TPtr8 & iPtr [protected]

Reference to external buffer that holds encoded TLV data