CPbkFieldsInfo Class Reference

API published in: S60 1st Ed
API deprecated in: S60 5th Ed

Link against: pbkeng.lib

Capability Information

Required Capabilities

ReadUserData WriteUserData


#include <cpbkfieldsinfo.h>

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.


Public Member Functions

  ~CPbkFieldsInfo ()
  Destructor.
IMPORT_C CPbkFieldInfo Find (TPbkFieldId aFieldId) const
  Search field info by Phonebook field id.
IMPORT_C CPbkFieldInfo Find (TPbkFieldId aFieldId, TPbkFieldLocation aLocation) const
  Search field info by Phonebook field id and location.
IMPORT_C CPbkFieldInfo Find (const CContactItemField &aContactItemField) const
  Search a field info matching contact model field.
IMPORT_C TPbkMatchPriorityLevel  CreateMatchPriority () const
CPbkFieldInfo Match (const CContactItemField &aContactItemField, const TPbkMatchPriorityLevel &aMatchPriority) const
IMPORT_C CPbkFieldInfo Match (const MPbkVcardProperty &aVcardProperty, const TPbkMatchPriorityLevel &aMatchPriority) const
IMPORT_C TInt  Count () const
  Returns the count of field infos.
IMPORT_C CPbkFieldInfo operator[] (TInt aIndex) const
  Returns the aIndex:th field info.
IMPORT_C TInt  GroupCount () const
  Returns the count of field info groups.
IMPORT_C const CPbkFieldInfoGroup &  GroupAt (TInt aIndex) const
  Returns the field info group at aIndex.
IMPORT_C CContactItemViewDef *  CreateContactItemViewDefLC (const CPbkFieldIdArray &aFieldTypes) const
  Creates a contact item view definition from an array of Phonebook field ids.
IMPORT_C CContactItemFieldDef *  CreateContactItemFieldDefLC (const CPbkFieldIdArray *aFieldTypes) const
  Creates contact item field definition from an array of Phonebook field ids.
void  AddFieldTypesFromResourceL (TResourceReader &aPbkResReader, TResourceReader &aCntModelResReader, RArray< const CPbkFieldInfo * > *aAddedFieldTypes)
  Adds fields from resource readers.

Static Public Member Functions

static CPbkFieldsInfo NewL (RResourceFile &aPbkResFile, RResourceFile &aCntModelResFile)
  Creates and returns an instance of this class intialised from resources.

Constructor & Destructor Documentation

CPbkFieldsInfo::~CPbkFieldsInfo  ) 
 

Destructor.


Member Function Documentation

void CPbkFieldsInfo::AddFieldTypesFromResourceL TResourceReader &  aPbkResReader,
TResourceReader &  aCntModelResReader,
RArray< const CPbkFieldInfo * > *  aAddedFieldTypes
 

Adds fields from resource readers.

Doesn't read or link group information.

Parameters:
aPbkResReader  Initialized resource buffer to PHONEBOOK_FIELD_ARRAY
aCntModelResReader  Initialized resource buffer to ARRAY or FIELDs
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.
IMPORT_C TInt CPbkFieldsInfo::Count  )  const
 

Returns the count of field infos.

Returns:
The count of field information elements in this container.
IMPORT_C CContactItemFieldDef* CPbkFieldsInfo::CreateContactItemFieldDefLC const CPbkFieldIdArray *  aFieldTypes  )  const
 

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

Parameters:
aFieldTypes  Phonebook 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.
IMPORT_C CContactItemViewDef* CPbkFieldsInfo::CreateContactItemViewDefLC const CPbkFieldIdArray &  aFieldTypes  )  const
 

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

Parameters:
aFieldTypes  Array of Phonebook field types.
Returns:
A new contact item view definition.
IMPORT_C TPbkMatchPriorityLevel CPbkFieldsInfo::CreateMatchPriority  )  const
 
IMPORT_C CPbkFieldInfo* CPbkFieldsInfo::Find const CContactItemField &  aContactItemField  )  const
 

Search a field info matching contact model field.

Parameters:
aContactItemField  Contact item field whose match is searched from all field info objects.
Returns:
The field info object matching aContactItemField. NULL if no match is found.
IMPORT_C CPbkFieldInfo* CPbkFieldsInfo::Find TPbkFieldId  aFieldId,
TPbkFieldLocation  aLocation
const
 

Search field info by Phonebook field id and location.

Parameters:
aFieldId  Phonebook field id to search from the array
aLocation  Field 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.
IMPORT_C CPbkFieldInfo* CPbkFieldsInfo::Find TPbkFieldId  aFieldId  )  const
 

Search field info by Phonebook field id.

Parameters:
aFieldId  Phonebook 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.
IMPORT_C const CPbkFieldInfoGroup& CPbkFieldsInfo::GroupAt TInt  aIndex  )  const
 

Returns the field info group at aIndex.

Returns:
The field info group at aIndex.
IMPORT_C TInt CPbkFieldsInfo::GroupCount  )  const
 

Returns the count of field info groups.

Returns:
The count of field info groups.
IMPORT_C CPbkFieldInfo* CPbkFieldsInfo::Match const MPbkVcardProperty &  aVcardProperty,
const TPbkMatchPriorityLevel &  aMatchPriority
const
 
CPbkFieldInfo* CPbkFieldsInfo::Match const CContactItemField &  aContactItemField,
const TPbkMatchPriorityLevel &  aMatchPriority
const
 
static CPbkFieldsInfo* CPbkFieldsInfo::NewL RResourceFile &  aPbkResFile,
RResourceFile &  aCntModelResFile
[static]
 

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

Parameters:
aPbkResFile  Phonebook's resource file.
aCntModelResFile  Contact Model's resource file.
IMPORT_C CPbkFieldInfo* CPbkFieldsInfo::operator[] TInt  aIndex  )  const
 

Returns the aIndex:th field info.

Field info objects are sorted by the field presentation ordering.

Parameters:
aIndex  The indexed element in this array.
Returns:
The element in the indexed position in the array.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top