CPbkContactItem Class Reference
class CPbkContactItem : public CBase |
Phonebook Contact item class. Contact items can be read from the contact database by using the Phonebook engine, CPbkContactEngine. This class extends Symbian Contacts model class CContactItem capabilities to better suit Phonebook application's needs.
Constructor & Destructor Documentation
CPbkContactItem(MPbkContactNameFormat &)
Member Functions Documentation
AddFieldL(CPbkFieldInfo &)
Creates a new field based on aFieldInfo and adds it to this contact.
AddOrReturnUnusedFieldL(CPbkFieldInfo &)
Finds an unused or creates a new field based on aFieldInfo. An unused field is a field that is in the contact template, but doesnt contain any data, in other words it is empty. So a unused field is preferred ad the next field to add user data before adding a new field to the contact.
CanAcceptDataOfType(CPbkFieldInfo &)
Returns ETrue if data of type aFieldInfo can be added to this contact.
Parameters
CPbkFieldInfo & aFieldInfo | The field type that we are trying to add. |
CardFields()
Returns the field set of this contact item.
ConstructL(CContactItem *, const CPbkFieldsInfo &)
Second phase constructor.
ContactIconIdL()
Returns an Phonebook icon id for a contact. This icon id is the icon of the field that is set as the default number to call.
ContactItem()
Converts this object to a CContactItem. Use only if this class's API is not enough.
ContactItem()
Converts this object to a const CContactItem. Use only if this class's API is not enough.
CreateFieldArrayL(CContactItem &, const CPbkFieldsInfo &)
DefaultEmailField()
Returns the default email field of this contact.
DefaultEmailOverSmsField()
Returns the default EmailOverSms field of this contact.
DefaultMmsField()
Returns the default Mms field of this contact.
DefaultPhoneNumberField()
Returns the default phone number field of this contact.
DefaultPocField()
Returns the default Poc field of this contact.
DefaultSmsField()
Returns the default SMS field of this contact.
DefaultVideoNumberField()
Returns the default video number field of this contact.
DefaultVoipField()
Returns the default VOIP field of this contact.
FindContactItemFieldIndex(const CContactItemField &)
FindField(TPbkFieldId)
Returns first field matching aFieldId.
FindField(TPbkFieldId, TInt &)
Returns first field matching aFieldId starting from aIndex.
Parameters
TPbkFieldId aFieldId | Field id to search. |
TInt & aIndex | Input: field index where to start the search from, output: index of the found field or -1 if not found. |
FindField(const CPbkFieldInfo &)
Returns first field matching aFieldInfo.
Parameters
const CPbkFieldInfo & aFieldInfo | Field type to find from the contact. |
FindField(const CPbkFieldInfo &, TInt &)
Returns first field matching aFieldInfo starting from aIndex.
Parameters
const CPbkFieldInfo & aFieldInfo | Field type to find from the contact. |
TInt & aIndex | Input: field index where to start the search from, output: index of the found field or -1 if not found. |
FindFieldIndex(const TPbkContactItemField &)
Parameters
const TPbkContactItemField & aField | Field to search for. Field is matched with TPbkContactItemField::IsSame -function. |
FindNextFieldWithPhoneNumber(const TDesC &, TInt, TInt &)
Parameters
const TDesC & aNumber | Phone number to match to. |
TInt aNumberOfDigits | Number of digits to compare from the end of the phone numbers. Full comparison performed if 0. |
TInt & aIndex | Input: field index where to start the search from, output: index of the found field or KErrNotFound if not found. |
FindNextFieldWithText(const TDesC &, TInt &)
Parameters
const TDesC & aText | |
TInt & aIndex | Input: field index from where to start the search, Output: index of the found field or KErrNotFound if not found. |
FindSameField(const TPbkContactItemField &)
Returns field matching aField from this contact item's field set, NULL if not found.
GetContactTitleL()
IMPORT_C HBufC * | GetContactTitleL | ( | ) | const |
Gets a title text for this contact or localized unnamed text.
GetContactTitleOrNullL()
IMPORT_C HBufC * | GetContactTitleOrNullL | ( | ) | const |
Gets a title text for this contact.
GroupsJoinedLC()
Gets the groups this contact belongs to. CContactItem::GroupsJoinedLC()
InsertionPos(const TPbkContactItemField &)
Returns insertion position for aField.
NewL(CContactItem *, const CPbkFieldsInfo &, MPbkContactNameFormat &)
Creates an instance of this class.
Parameters
CContactItem * aItem | Contact item this object wraps. This object takes ownership of aItem. If this function leaves, ownership is not taken. |
const CPbkFieldsInfo & aFieldsInfo | Collection of Phonebook field types. |
MPbkContactNameFormat & aNameFormat | Contact name formatter. |
PbkFieldCount()
TInt
| PbkFieldCount | ( | ) | const |
RemoveDefaultEmailField()
IMPORT_C void | RemoveDefaultEmailField | ( | ) | |
RemoveDefaultEmailOverSmsField()
IMPORT_C void | RemoveDefaultEmailOverSmsField | ( | ) | |
RemoveDefaultMmsField()
IMPORT_C void | RemoveDefaultMmsField | ( | ) | |
RemoveDefaultPhoneNumberField()
IMPORT_C void | RemoveDefaultPhoneNumberField | ( | ) | |
RemoveDefaultPocField()
IMPORT_C void | RemoveDefaultPocField | ( | ) | |
RemoveDefaultSmsField()
IMPORT_C void | RemoveDefaultSmsField | ( | ) | |
RemoveDefaultVideoNumberField()
IMPORT_C void | RemoveDefaultVideoNumberField | ( | ) | |
RemoveDefaultVoipField()
IMPORT_C void | RemoveDefaultVoipField | ( | ) | |
RemoveField(TInt)
IMPORT_C void | RemoveField | ( | TInt | aIndex | ) | |
Parameters
TInt aIndex | Field index to delete from the contact item. |
RemoveVoiceTagField()
IMPORT_C void | RemoveVoiceTagField | ( | ) | |
SetDefaultEmailFieldL(TPbkContactItemField *)
Sets this contact's default email address field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not an email field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL email default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultEmailOverSmsFieldL(TPbkContactItemField *)
Sets this contact's default Sms With Email address field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not an email field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL Sms With Email default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultMmsFieldL(TPbkContactItemField *)
Sets this contact's default MMS address field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not an email field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL MMS default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultPhoneNumberFieldL(TPbkContactItemField *)
Sets this contact's default phone number field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not a phone number field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL phone number default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultPocFieldL(TPbkContactItemField *)
Sets this contact's default POC address field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not an email field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL POC default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultSmsFieldL(TPbkContactItemField *)
Sets this contact's default SMS field to aField.
- Exceptions
-
KErrNotFound |
if aField is not this contact's field.
|
KErrNotSupported |
if aField is not a phone number field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL SMS default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultVideoNumberFieldL(TPbkContactItemField *)
Sets this contact's default video number field to aField.
- Exceptions
-
KErrNotFound |
if aField is not this contact's field.
|
KErrNotSupported |
if aField is not a phone number field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL video number default is removed. Guaranteed not to leave if aField is NULL. |
SetDefaultVoipFieldL(TPbkContactItemField *)
Sets this contact's default VOIP address field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not an email field.
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL VOIP default is removed. Guaranteed not to leave if aField is NULL. |
SetVoiceTagFieldL(TPbkContactItemField *)
Sets this contact's voice tag field to aField.
- Exceptions
-
KErrNotFound |
If aField is not this contact's field.
|
KErrNotSupported |
If aField is not a phone number field. (aField && VoiceTagField()->IsSame(*aField)) || (!aField && !VoiceTagField())
|
Parameters
TPbkContactItemField * aField | Field to set as default, if NULL voice tag mark is removed. Guaranteed not to leave if aField is NULL. |
UpdateFieldSetL(const CPbkFieldsInfo &)
Updates this contacts field set to match the field set of the owned CContactItem. No need to call unless contact item's field set has been manipulated directly. In other words remaps the field types of this contact item from the underlying Symbian Contacts model contact item.
Parameters
const CPbkFieldsInfo & aFieldsInfo | The new fields set for this contact. |
VoiceTagField()
Returns the voice tag field of this contact. NOTE: If this function is unable to make a connection to the voice tag handling system for some reason, this function will return null.
Member Type Definitions Documentation
Member Data Documentation
MPbkContactNameFormat & iNameFormat
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.