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.
Public Member Functions | |
---|---|
CPhoneBookBuffer() | |
IMPORT_C TInt | AddNewEntryTag() |
IMPORT_C TInt | AddNewNumberTag() |
IMPORT_C TInt | BufferLength() |
IMPORT_C TInt | GetTagAndType(TUint8 &, TPhBkTagType &) |
IMPORT_C TInt | GetValue(TUint8 &) |
IMPORT_C TInt | GetValue(TUint16 &) |
IMPORT_C TInt | GetValue(TUint32 &) |
IMPORT_C TInt | GetValue(TPtrC8 &) |
IMPORT_C TInt | GetValue(TPtrC16 &) |
IMPORT_C TInt | PutTagAndValue(TUint8, TUint8) |
IMPORT_C TInt | PutTagAndValue(TUint8, TUint16) |
IMPORT_C TInt | PutTagAndValue(TUint8, TUint32) |
IMPORT_C TInt | PutTagAndValue(TUint8, const TDesC8 &) |
IMPORT_C TInt | PutTagAndValue(TUint8, const TDesC16 &) |
IMPORT_C TInt | RemainingReadLength() |
IMPORT_C TInt | RemovePartialEntry() |
IMPORT_C void | Set(TDes8 *) |
IMPORT_C void | SkipValue(TPhBkTagType) |
IMPORT_C void | StartRead() |
Private Member Functions | |
---|---|
TInt | AppendInt16(TUint16) |
TInt | AppendInt32(TUint32) |
TInt | AppendInt8(TUint8) |
Public Member Enumerations | |
---|---|
enum | TPhBkTagType { EPhBkTypeNoData, EPhBkTypeInt8, EPhBkTypeInt16, EPhBkTypeInt32, EPhBkTypeDes8, EPhBkTypeDes16 } |
Private Attributes | |
---|---|
TPtr8 | iMonitor |
TDes8 * | iPtr |
TPtrC8 | iRead |
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.
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.
IMPORT_C TInt | AddNewNumberTag | ( | ) |
This function member puts a new number tag byte (ETagPBAnrStart) into the buffer.
IMPORT_C TInt | BufferLength | ( | ) |
This function member returns the length of the populated buffer.
IMPORT_C TInt | GetTagAndType | ( | TUint8 & | aTagValue, |
TPhBkTagType & | aDataType | |||
) |
This function member reads the next tag value from the buffer.
TUint8 & aTagValue | On completion, the next Tag type from the buffer. |
TPhBkTagType & aDataType | On completion, the data type associated with the tag value. |
IMPORT_C TInt | GetValue | ( | TUint8 & | aInteger | ) |
Gets a 8-bit integer value from the buffer.
TUint8 & aInteger | On completion, the 8-bit value from the buffer. |
IMPORT_C TInt | GetValue | ( | TUint16 & | aInteger | ) |
Gets a 16-bit integer value from the buffer.
TUint16 & aInteger | On completion, the 16-bit value from the buffer. |
IMPORT_C TInt | GetValue | ( | TUint32 & | aInteger | ) |
Gets a 32-bit integer value from the buffer.
TUint32 & aInteger | On completion, the 32-bit value from the buffer. |
IMPORT_C TInt | GetValue | ( | TPtrC8 & | aData | ) |
Gets a 8-bit descriptor from the buffer. The read pointer is then incremented past the read value.
TPtrC8 & aData | On completion, the 8-bit descriptor from the buffer. |
IMPORT_C TInt | GetValue | ( | TPtrC16 & | aData | ) |
Gets a 16-bit descriptor from the buffer.
TPtrC16 & aData | On completion, the 16-bit descriptor from the buffer. The read pointer is then incremented past the read value. |
IMPORT_C TInt | PutTagAndValue | ( | TUint8 | aTagValue, |
TUint8 | aInteger | |||
) |
Puts a 8-bit integer value into buffer.
The valid tags for use with 8-bit integers are:
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:
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.
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.
IMPORT_C TInt | PutTagAndValue | ( | TUint8 | aTagValue, |
const TDesC16 & | aData | |||
) |
Puts a 16-bit descriptor value into buffer.
The valid tags for use with 16-bit descriptors are:
IMPORT_C TInt | RemainingReadLength | ( | ) |
This function member returns the length of the remaining data to read in the populated buffer.
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.
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.
TDes8 * aData | A pointer to the buffer |
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.
TPhBkTagType aDataType | The data type of the value to skip |
IMPORT_C void | StartRead | ( | ) |
phone Book Tag Type.
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. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.