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_CCPhoneBookBuffer()

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 TIntAddNewEntryTag()

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 TIntAddNewNumberTag()

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

AppendInt16(TUint16)

TInt AppendInt16(TUint16aInteger)[private]

Parameters

TUint16 aInteger

AppendInt32(TUint32)

TInt AppendInt32(TUint32aInteger)[private]

Parameters

TUint32 aInteger

AppendInt8(TUint8)

TInt AppendInt8(TUint8aInteger)[private]

Parameters

TUint8 aInteger

BufferLength()

IMPORT_C TIntBufferLength()

This function member returns the length of the populated buffer.

capability
None

GetTagAndType(TUint8 &, TPhBkTagType &)

IMPORT_C TIntGetTagAndType(TUint8 &aTagValue,
TPhBkTagType &aDataType
)

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

capability
None

Parameters

TUint8 & aTagValueOn completion, the next Tag type from the buffer.
TPhBkTagType & aDataTypeOn completion, the data type associated with the tag value.

GetValue(TUint8 &)

IMPORT_C TIntGetValue(TUint8 &aInteger)

Gets a 8-bit integer value from the buffer.

capability
None

Parameters

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

GetValue(TUint16 &)

IMPORT_C TIntGetValue(TUint16 &aInteger)

Gets a 16-bit integer value from the buffer.

capability
None

Parameters

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

GetValue(TUint32 &)

IMPORT_C TIntGetValue(TUint32 &aInteger)

Gets a 32-bit integer value from the buffer.

capability
None

Parameters

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

GetValue(TPtrC8 &)

IMPORT_C TIntGetValue(TPtrC8 &aData)

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

capability
None

Parameters

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

GetValue(TPtrC16 &)

IMPORT_C TIntGetValue(TPtrC16 &aData)

Gets a 16-bit descriptor from the buffer.

capability
None

Parameters

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

PutTagAndValue(TUint8, TUint8)

IMPORT_C TIntPutTagAndValue(TUint8aTagValue,
TUint8aInteger
)

Parameters

TUint8 aTagValueTag byte to use.
TUint8 aIntegerValue to put in the buffer.

PutTagAndValue(TUint8, TUint16)

IMPORT_C TIntPutTagAndValue(TUint8aTagValue,
TUint16aInteger
)

Puts a 16-bit integer value into buffer.

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

Parameters

TUint8 aTagValueTag byte to use.
TUint16 aIntegerValue to put in the buffer.

PutTagAndValue(TUint8, TUint32)

IMPORT_C TIntPutTagAndValue(TUint8aTagValue,
TUint32aInteger
)

Puts a 32-bit integer value into buffer.

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

  • None.

capability
None

Parameters

TUint8 aTagValueTag byte to use.
TUint32 aIntegerValue to put in the buffer.

PutTagAndValue(TUint8, const TDesC8 &)

IMPORT_C TIntPutTagAndValue(TUint8aTagValue,
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 aTagValueTag byte to use.
const TDesC8 & aDataValue to put in the buffer.

PutTagAndValue(TUint8, const TDesC16 &)

IMPORT_C TIntPutTagAndValue(TUint8aTagValue,
const TDesC16 &aData
)

Parameters

TUint8 aTagValueTag byte to use.
const TDesC16 & aDataValue to put in the buffer.

RemainingReadLength()

IMPORT_C TIntRemainingReadLength()

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

capability
None

RemovePartialEntry()

IMPORT_C TIntRemovePartialEntry()

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 voidSet(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 * aDataA pointer to the buffer

SkipValue(TPhBkTagType)

IMPORT_C voidSkipValue(TPhBkTagTypeaDataType)

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 aDataTypeThe data type of the value to skip

StartRead()

IMPORT_C voidStartRead()
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]