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 ()
void AddFieldTypesFromResourceL ( TResourceReader &, TResourceReader &, RArray < const CPbkFieldInfo * > *)
IMPORT_C TInt Count ()
IMPORT_C CContactItemFieldDef * CreateContactItemFieldDefLC (const CPbkFieldIdArray *)
IMPORT_C CContactItemViewDef * CreateContactItemViewDefLC (const CPbkFieldIdArray &)
IMPORT_C TPbkMatchPriorityLevel CreateMatchPriority ()
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 TInt GroupCount ()
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 ()
void ConstructFromResourceL ( RResourceFile &, RResourceFile &)
CPbkFieldInfoGroup * FindGroup ( TPbkFieldGroupId )
void LinkGroupsL ()
void ReadFieldInfoParamsL ()
void ReadGroupsInfoL ( 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 * > *)

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

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

Parameters

TResourceReader & aPbkResReader Initialized resource buffer to PHONEBOOK_FIELD_ARRAY
TResourceReader & aCntModelResReader Initialized resource buffer to ARRAY or FIELDs
RArray < const CPbkFieldInfo * > * aAddedFieldTypes If 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 &)

void ConstructFromResourceL ( RResourceFile & aPbkResFile,
RResourceFile & aCntModelResFile
) [private]

Parameters

RResourceFile & aPbkResFile
RResourceFile & aCntModelResFile

Count()

IMPORT_C TInt Count ( ) 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 * aFieldTypes Phonebook 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 & aFieldTypes Array of Phonebook field types.

CreateMatchPriority()

IMPORT_C TPbkMatchPriorityLevel CreateMatchPriority ( ) const

Find(TPbkFieldId)

IMPORT_C CPbkFieldInfo * Find ( TPbkFieldId aFieldId ) const

Search field info by Phonebook field id.

Parameters

TPbkFieldId aFieldId Phonebook field id to search from the array

Find(TPbkFieldId, TPbkFieldLocation)

IMPORT_C CPbkFieldInfo * Find ( TPbkFieldId aFieldId,
TPbkFieldLocation aLocation
) const

Search field info by Phonebook field id and location

Parameters

TPbkFieldId aFieldId Phonebook field id to search from the array
TPbkFieldLocation aLocation Field 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 & aContactItemField Contact item field whose match is searched from all field info objects.

FindGroup(TPbkFieldGroupId)

CPbkFieldInfoGroup * FindGroup ( TPbkFieldGroupId aGroupId ) [private, inline]

Parameters

TPbkFieldGroupId aGroupId

GroupAt(TInt)

IMPORT_C const CPbkFieldInfoGroup & GroupAt ( TInt aIndex ) const

Returns the field info group at aIndex.

Parameters

TInt aIndex

GroupCount()

IMPORT_C TInt GroupCount ( ) const

Returns the count of field info groups.

LinkGroupsL()

void LinkGroupsL ( ) [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 & aPbkResFile Phonebook's resource file.
RResourceFile & aCntModelResFile Contact Model's resource file.

ReadFieldInfoParamsL()

void ReadFieldInfoParamsL ( ) [private]

ReadGroupsInfoL(RResourceFile &)

void ReadGroupsInfoL ( RResourceFile & aResFile ) [private, inline]

Parameters

RResourceFile & aResFile

operator[](TInt)

IMPORT_C CPbkFieldInfo * operator[] ( TInt aIndex ) const

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

Parameters

TInt aIndex The 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]