CPbkFieldsInfo Class Reference

class CPbkFieldsInfo : public CBase

Phonebook field types collection class. The collection contains CPbkFieldInfo objects that contain Phonebook specific field type information. Each field Phonebook recognizes is associated with field info object. The field info objects are references to elements in this array.

Inherits from

Public Member Functions
~CPbkFieldsInfo()
voidAddFieldTypesFromResourceL(TResourceReader &, TResourceReader &, RArray< const CPbkFieldInfo * > *)
IMPORT_C TIntCount()
IMPORT_C CContactItemFieldDef *CreateContactItemFieldDefLC(const CPbkFieldIdArray *)
IMPORT_C CContactItemViewDef *CreateContactItemViewDefLC(const CPbkFieldIdArray &)
IMPORT_C TPbkMatchPriorityLevelCreateMatchPriority()
IMPORT_C CPbkFieldInfo *Find(TPbkFieldId)
IMPORT_C CPbkFieldInfo *Find(TPbkFieldId, TPbkFieldLocation)
IMPORT_C CPbkFieldInfo *Find(const CContactItemField &)
IMPORT_C const CPbkFieldInfoGroup &GroupAt(TInt)
IMPORT_C TIntGroupCount()
CPbkFieldInfo *Match(const CContactItemField &, const TPbkMatchPriorityLevel &)
IMPORT_C CPbkFieldInfo *Match(const MPbkVcardProperty &, const TPbkMatchPriorityLevel &)
CPbkFieldsInfo *NewL(RResourceFile &, RResourceFile &)
IMPORT_C CPbkFieldInfo *operator[](TInt)
Private Member Functions
CPbkFieldsInfo()
voidConstructFromResourceL(RResourceFile &, RResourceFile &)
CPbkFieldInfoGroup *FindGroup(TPbkFieldGroupId)
voidLinkGroupsL()
voidReadFieldInfoParamsL()
voidReadGroupsInfoL(RResourceFile &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
RPointerArray< CPbkFieldInfo >iEntries
RPointerArray< CPbkFieldInfoGroup >iGroups
TInt iHighestMatchPriorityLevel
CPbkFieldInfo::TPbkFieldInfoParams *iPbkFieldInfoParams
CPbkUidMap *iTypeUidMap

Constructor & Destructor Documentation

CPbkFieldsInfo()

CPbkFieldsInfo()[private, inline]

~CPbkFieldsInfo()

~CPbkFieldsInfo()

Destructor.

Member Functions Documentation

AddFieldTypesFromResourceL(TResourceReader &, TResourceReader &, RArray< const CPbkFieldInfo * > *)

voidAddFieldTypesFromResourceL(TResourceReader &aPbkResReader,
TResourceReader &aCntModelResReader,
RArray< const CPbkFieldInfo * > *aAddedFieldTypes
)

Adds fields from resource readers. Doesn't read or link group information.

Parameters

TResourceReader & aPbkResReaderInitialized resource buffer to PHONEBOOK_FIELD_ARRAY
TResourceReader & aCntModelResReaderInitialized resource buffer to ARRAY or FIELDs
RArray< const CPbkFieldInfo * > * aAddedFieldTypesIf not null the field types that were added are appended to this array. The field types are in the order they were defined in resources.

ConstructFromResourceL(RResourceFile &, RResourceFile &)

voidConstructFromResourceL(RResourceFile &aPbkResFile,
RResourceFile &aCntModelResFile
)[private]

Parameters

RResourceFile & aPbkResFile
RResourceFile & aCntModelResFile

Count()

IMPORT_C TIntCount()const

Returns the count of field infos.

CreateContactItemFieldDefLC(const CPbkFieldIdArray *)

IMPORT_C CContactItemFieldDef *CreateContactItemFieldDefLC(const CPbkFieldIdArray *aFieldTypes)const

Creates contact item field definition from an array of Phonebook field ids.

Parameters

const CPbkFieldIdArray * aFieldTypesPhonebook field types to add into the returned array. If NULL an array matching all fields is returned.

CreateContactItemViewDefLC(const CPbkFieldIdArray &)

IMPORT_C CContactItemViewDef *CreateContactItemViewDefLC(const CPbkFieldIdArray &aFieldTypes)const

Creates a contact item view definition from an array of Phonebook field ids.

Parameters

const CPbkFieldIdArray & aFieldTypesArray of Phonebook field types.

CreateMatchPriority()

IMPORT_C TPbkMatchPriorityLevelCreateMatchPriority()const

Find(TPbkFieldId)

IMPORT_C CPbkFieldInfo *Find(TPbkFieldIdaFieldId)const

Search field info by Phonebook field id.

Parameters

TPbkFieldId aFieldIdPhonebook field id to search from the array

Find(TPbkFieldId, TPbkFieldLocation)

IMPORT_C CPbkFieldInfo *Find(TPbkFieldIdaFieldId,
TPbkFieldLocationaLocation
)const

Search field info by Phonebook field id and location

Parameters

TPbkFieldId aFieldIdPhonebook field id to search from the array
TPbkFieldLocation aLocationField location (home/work/none) to search from the array

Find(const CContactItemField &)

IMPORT_C CPbkFieldInfo *Find(const CContactItemField &aContactItemField)const

Search a field info matching contact model field.

Parameters

const CContactItemField & aContactItemFieldContact item field whose match is searched from all field info objects.

FindGroup(TPbkFieldGroupId)

CPbkFieldInfoGroup *FindGroup(TPbkFieldGroupIdaGroupId)[private, inline]

Parameters

TPbkFieldGroupId aGroupId

GroupAt(TInt)

IMPORT_C const CPbkFieldInfoGroup &GroupAt(TIntaIndex)const

Returns the field info group at aIndex.

Parameters

TInt aIndex

GroupCount()

IMPORT_C TIntGroupCount()const

Returns the count of field info groups.

LinkGroupsL()

voidLinkGroupsL()[private]

Match(const CContactItemField &, const TPbkMatchPriorityLevel &)

CPbkFieldInfo *Match(const CContactItemField &aContactItemField,
const TPbkMatchPriorityLevel &aMatchPriority
)const

Parameters

const CContactItemField & aContactItemField
const TPbkMatchPriorityLevel & aMatchPriority

Match(const MPbkVcardProperty &, const TPbkMatchPriorityLevel &)

IMPORT_C CPbkFieldInfo *Match(const MPbkVcardProperty &aVcardProperty,
const TPbkMatchPriorityLevel &aMatchPriority
)const

Parameters

const MPbkVcardProperty & aVcardProperty
const TPbkMatchPriorityLevel & aMatchPriority

NewL(RResourceFile &, RResourceFile &)

CPbkFieldsInfo *NewL(RResourceFile &aPbkResFile,
RResourceFile &aCntModelResFile
)[static]

Creates and returns an instance of this class intialised from resources.

Parameters

RResourceFile & aPbkResFilePhonebook's resource file.
RResourceFile & aCntModelResFileContact Model's resource file.

ReadFieldInfoParamsL()

voidReadFieldInfoParamsL()[private]

ReadGroupsInfoL(RResourceFile &)

voidReadGroupsInfoL(RResourceFile &aResFile)[private, inline]

Parameters

RResourceFile & aResFile

operator[](TInt)

IMPORT_C CPbkFieldInfo *operator[](TIntaIndex)const

Returns the aIndex:th field info. Field info objects are sorted by the field presentation ordering.

Parameters

TInt aIndexThe indexed element in this array.

Member Data Documentation

RPointerArray< CPbkFieldInfo > iEntries

RPointerArray< CPbkFieldInfo >iEntries[private]

RPointerArray< CPbkFieldInfoGroup > iGroups

RPointerArray< CPbkFieldInfoGroup >iGroups[private]

TInt iHighestMatchPriorityLevel

TInt iHighestMatchPriorityLevel[private]

CPbkFieldInfo::TPbkFieldInfoParams * iPbkFieldInfoParams

CPbkFieldInfo::TPbkFieldInfoParams *iPbkFieldInfoParams[private]

CPbkUidMap * iTypeUidMap

CPbkUidMap *iTypeUidMap[private]