CPhoneBookBuffer Class Reference

class CPhoneBookBuffer : public CBase

This class enables the conversion from integer or descriptor data type into the TLV (Tag-Length-Value) format and vice versa.

It is a library class available for use by clients and TSYs to enable them to manage the encoding and decoding of phonebook data to/from the TLV format required by the Multimode ETel API.

Inherits from

Constructor & Destructor Documentation

CPhoneBookBuffer()

IMPORT_C CPhoneBookBuffer ( )

The CPhoneBookBuffer library class is constructed using a simple, one-phase constructor because the CPhoneBookBuffer class does not allocate any member data on the heap.

Member Functions Documentation

AddNewEntryTag()

IMPORT_C TInt AddNewEntryTag ( )

This function member puts a new entry tag byte (ETagPBNewEntry) into the buffer and sets iMonitor to point to the beginning of each new entry.

AddNewNumberTag()

IMPORT_C TInt AddNewNumberTag ( )

This function member puts a new number tag byte (ETagPBAnrStart) into the buffer.

AppendInt16(TUint16)

TInt AppendInt16 ( TUint16 aInteger ) [private]

Parameters

TUint16 aInteger

AppendInt32(TUint32)

TInt AppendInt32 ( TUint32 aInteger ) [private]

Parameters

TUint32 aInteger

AppendInt8(TUint8)

TInt AppendInt8 ( TUint8 aInteger ) [private]

Parameters

TUint8 aInteger

BufferLength()

IMPORT_C TInt BufferLength ( )

This function member returns the length of the populated buffer.

capability
None

GetTagAndType(TUint8 &, TPhBkTagType &)

IMPORT_C TInt GetTagAndType ( TUint8 & aTagValue,
TPhBkTagType & aDataType
)

This function member reads the next tag value from the buffer.

capability
None

Parameters

TUint8 & aTagValue On completion, the next Tag type from the buffer.
TPhBkTagType & aDataType On completion, the data type associated with the tag value.

GetValue(TUint8 &)

IMPORT_C TInt GetValue ( TUint8 & aInteger )

Gets a 8-bit integer value from the buffer.

capability
None

Parameters

TUint8 & aInteger On completion, the 8-bit value from the buffer.

GetValue(TUint16 &)

IMPORT_C TInt GetValue ( TUint16 & aInteger )

Gets a 16-bit integer value from the buffer.

capability
None

Parameters

TUint16 & aInteger On completion, the 16-bit value from the buffer.

GetValue(TUint32 &)

IMPORT_C TInt GetValue ( TUint32 & aInteger )

Gets a 32-bit integer value from the buffer.

capability
None

Parameters

TUint32 & aInteger On completion, the 32-bit value from the buffer.

GetValue(TPtrC8 &)

IMPORT_C TInt GetValue ( TPtrC8 & aData )

Gets a 8-bit descriptor from the buffer. The read pointer is then incremented past the read value.

capability
None

Parameters

TPtrC8 & aData On completion, the 8-bit descriptor from the buffer.

GetValue(TPtrC16 &)

IMPORT_C TInt GetValue ( TPtrC16 & aData )

Gets a 16-bit descriptor from the buffer.

capability
None

Parameters

TPtrC16 & aData On completion, the 16-bit descriptor from the buffer. The read pointer is then incremented past the read value.

PutTagAndValue(TUint8, TUint8)

IMPORT_C TInt PutTagAndValue ( TUint8 aTagValue,
TUint8 aInteger
)

Parameters

TUint8 aTagValue Tag byte to use.
TUint8 aInteger Value to put in the buffer.

PutTagAndValue(TUint8, TUint16)

IMPORT_C TInt PutTagAndValue ( TUint8 aTagValue,
TUint16 aInteger
)

Puts a 16-bit integer value into buffer.

The valid tags for use with 16-bit integers are:

Parameters

TUint8 aTagValue Tag byte to use.
TUint16 aInteger Value to put in the buffer.

PutTagAndValue(TUint8, TUint32)

IMPORT_C TInt PutTagAndValue ( TUint8 aTagValue,
TUint32 aInteger
)

Puts a 32-bit integer value into buffer.

The valid tags for use with 32-bit integers are:

  • None.

capability
None

Parameters

TUint8 aTagValue Tag byte to use.
TUint32 aInteger Value to put in the buffer.

PutTagAndValue(TUint8, const TDesC8 &)

IMPORT_C TInt PutTagAndValue ( TUint8 aTagValue,
const TDesC8 & aData
)

Puts a 8-bit descriptor value into buffer.

The valid tags for use with 8-bit descriptors are:

  • None.

capability
None

Parameters

TUint8 aTagValue Tag byte to use.
const TDesC8 & aData Value to put in the buffer.

PutTagAndValue(TUint8, const TDesC16 &)

IMPORT_C TInt PutTagAndValue ( TUint8 aTagValue,
const TDesC16 & aData
)

Parameters

TUint8 aTagValue Tag byte to use.
const TDesC16 & aData Value to put in the buffer.

RemainingReadLength()

IMPORT_C TInt RemainingReadLength ( )

This function member returns the length of the remaining data to read in the populated buffer.

capability
None

RemovePartialEntry()

IMPORT_C TInt RemovePartialEntry ( )

This function will rollback the buffer to the end of the last complete phonebook entry and remove any data after this.

capability
None

Set(TDes8 *)

IMPORT_C void Set ( TDes8 * aData )

This member function sets the buffer's internal attribute iPtr to point to the supplied 8-bit buffer, which is owned by the caller of this function member.

capability
None

Parameters

TDes8 * aData A pointer to the buffer

SkipValue(TPhBkTagType)

IMPORT_C void SkipValue ( TPhBkTagType aDataType )

This function member skips the next value in the buffer that is waiting to be read. Clients would use this function member if they do not support the field contained in the next data value.

capability
None

Parameters

TPhBkTagType aDataType The data type of the value to skip

StartRead()

IMPORT_C void StartRead ( )
This function member sets the CPhoneBookBuffer class' iRead member data to point to the start of the populated TLV buffer, ready to start data extraction from the buffer.
capability
None

Member Enumerations Documentation

Enum TPhBkTagType

phone Book Tag Type.

Enumerators

EPhBkTypeNoData

No Data.

EPhBkTypeInt8

Data is in Int8 format.

EPhBkTypeInt16

Data is in Int16 format.

EPhBkTypeInt32

Data is in Int32 format.

EPhBkTypeDes8

Data is in Des8 format.

EPhBkTypeDes16

Data is in Des16 format.

Member Data Documentation

TPtr8 iMonitor

TPtr8 iMonitor [private]

TDes8 * iPtr

TDes8 * iPtr [private]

TPtrC8 iRead

TPtrC8 iRead [private]