CPbkFieldsInfo Class Reference

#include <app/CPbkFieldsInfo.h>

Link against: PbkEng.lib

class CPbkFieldsInfo : public CBase

Inherits from

  • CPbkFieldsInfo

    Detailed Description

    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.

    Constructor & Destructor Documentation

    ~CPbkFieldsInfo ( )

    ~CPbkFieldsInfo()

    Destructor.

    Member Function 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.

    ParameterDescription
    aPbkResReaderInitialized resource buffer to PHONEBOOK_FIELD_ARRAY
    aCntModelResReaderInitialized resource buffer to ARRAY or FIELDs
    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.

    Count ( )

    IMPORT_C TIntCount()const

    Returns the count of field infos.

    Returns: The count of field information elements in this container.

    CreateContactItemFieldDefLC ( const CPbkFieldIdArray * )

    IMPORT_C CContactItemFieldDef *CreateContactItemFieldDefLC(const CPbkFieldIdArray *aFieldTypes)const

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

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

    Returns: A field def array matching <it>at least fields</it> in aFieldTypes. Please note that the returned field definition may also match other fields than those specified.

    CreateContactItemViewDefLC ( const CPbkFieldIdArray & )

    IMPORT_C CContactItemViewDef *CreateContactItemViewDefLC(const CPbkFieldIdArray &aFieldTypes)const

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

    ParameterDescription
    aFieldTypesArray of Phonebook field types.

    Returns: A new contact item view definition.

    CreateMatchPriority ( )

    IMPORT_C TPbkMatchPriorityLevelCreateMatchPriority()const

    Find ( TPbkFieldId )

    IMPORT_C CPbkFieldInfo *Find(TPbkFieldIdaFieldId)const

    Search field info by Phonebook field id.

    ParameterDescription
    aFieldIdPhonebook field id to search from the array

    Returns: The <it>first</it> (there may be several that match) field info object in the field UI presentation order matching aFieldId. Returns NULL if no match is found.

    Find ( TPbkFieldId, TPbkFieldLocation )

    IMPORT_C CPbkFieldInfo *Find(TPbkFieldIdaFieldId,
    TPbkFieldLocationaLocation
    )const

    Search field info by Phonebook field id and location

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

    Returns: The field info object (there should be only one) matching aFieldId and aLocation. NULL if no match found.

    Find ( const CContactItemField & )

    IMPORT_C CPbkFieldInfo *Find(const CContactItemField &aContactItemField)const

    Search a field info matching contact model field.

    ParameterDescription
    aContactItemFieldContact item field whose match is searched from all field info objects.

    Returns: The field info object matching aContactItemField. NULL if no match is found.

    GroupAt ( TInt )

    IMPORT_C const CPbkFieldInfoGroup &GroupAt(TIntaIndex)const

    Returns the field info group at aIndex.

    Returns: The field info group at aIndex.

    GroupCount ( )

    IMPORT_C TIntGroupCount()const

    Returns the count of field info groups.

    Returns: The count of field info groups.

    Match ( const CContactItemField &, const TPbkMatchPriorityLevel & )

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

    Match ( const MPbkVcardProperty &, const TPbkMatchPriorityLevel & )

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

    NewL ( RResourceFile &, RResourceFile & )

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

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

    ParameterDescription
    aPbkResFilePhonebook's resource file.
    aCntModelResFileContact Model's resource file.

    operator[] ( TInt )

    IMPORT_C CPbkFieldInfo *operator[](TIntaIndex)const

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

    ParameterDescription
    aIndexThe indexed element in this array.

    Returns: The element in the indexed position in the array.