TPbkContactItemField Class Reference

#include <app/TPbkContactItemField.h>

class TPbkContactItemField : public MPbkFieldData

Inherits from

Detailed Description

Phonebook Contact item field class. This class extends Symbian Contacts model CContactItemField class capabilities to better suit Phonebook's needs.

Constructor & Destructor Documentation

TPbkContactItemField ( )

IMPORT_CTPbkContactItemField()

C++ default constructor.

TPbkContactItemField ( CContactItemField *, CPbkFieldInfo * )

IMPORT_CTPbkContactItemField(CContactItemField *aField,
CPbkFieldInfo *aFieldInfo
)

C++ constructor.

ParameterDescription
aFieldContacts Model field this object is wrapping.
aFieldInfoPhonebook field type of aField.

Member Function Documentation

Compare ( const TPbkContactItemField & )

IMPORT_C TIntCompare(const TPbkContactItemField &aRhs)const

Compares two items against the group ordering.

ParameterDescription
aRhsContact item field to compare to this field.

ContactItemField ( )

IMPORT_C CContactItemField &ContactItemField()

Converts this field to a CContactItemField.

Returns: The embedded CContactItemField object.

ContactItemField ( )

IMPORT_C const CContactItemField &ContactItemField()const

Converts this field to a const CContactItemField.

Returns: The embedded CContactItemField object.

DateTimeStorage ( )

IMPORT_C CContactDateField *DateTimeStorage()const

Returns time storage of this field. If the storage type is not KStorageTypeDateTime the function raises a panic.

Returns: The time storage object of this field.

DefaultEmailField ( )

IMPORT_C TBoolDefaultEmailField()const

Returns ETrue is this field is a default email field.

See also: CPbkContactItem::DefaultEmailField CPbkContactItem::SetDefaultEmailField

Returns: ETrue is this field is a default email field.

DefaultEmailOverSmsField ( )

IMPORT_C TBoolDefaultEmailOverSmsField()const

Returns ETrue is this field is a default SMS With Email field.

See also: CPbkContactItem::DefaultEmailOverSmsField CPbkContactItem::SetDefaultEmailOverSmsField

Returns: ETrue is this field is a default SMS With Email field.

DefaultMmsField ( )

IMPORT_C TBoolDefaultMmsField()const

Returns ETrue is this field is a default MMS field.

See also: CPbkContactItem::DefaultMmsField CPbkContactItem::SetDefaultMmsField

Returns: ETrue is this field is a default MMS field.

DefaultPhoneNumberField ( )

IMPORT_C TBoolDefaultPhoneNumberField()const

Returns ETrue is this field is a default phone number field.

See also: CPbkContactItem::DefaultPhoneNumberField CPbkContactItem::SetDefaultPhoneNumberField

Returns: ETrue is this field is a default phone number field.

DefaultPocField ( )

IMPORT_C TBoolDefaultPocField()const

Returns ETrue is this field is a default POC field.

See also: CPbkContactItem::DefaultPocField CPbkContactItem::SetDefaultPocField

Returns: ETrue is this field is a default POC field.

DefaultSmsField ( )

IMPORT_C TBoolDefaultSmsField()const

Returns ETrue is this field is a default SMS field.

See also: CPbkContactItem::DefaultSmsField CPbkContactItem::SetDefaultSmsField

Returns: ETrue is this field is a default SMS field.

DefaultVideoNumberField ( )

IMPORT_C TBoolDefaultVideoNumberField()const

Returns ETrue if this field is a default video number field.

See also: CPbkContactItem::DefaultVideoNumberField CPbkContactItem::SetDefaultVideoNumberField

Returns: ETrue if this field is a default video number field.

DefaultVoipField ( )

IMPORT_C TBoolDefaultVoipField()const

Returns ETrue is this field is a default VOIP field.

See also: CPbkContactItem::DefaultVoipField CPbkContactItem::SetDefaultVoipField

Returns: ETrue is this field is a default VOIP field.

FieldInfo ( )

IMPORT_C CPbkFieldInfo &FieldInfo()const

Returns the Phonebook field info object of this field.

Returns: Field info for this field.

GetTextL ( TDes & )

IMPORT_C voidGetTextL(TDes &aText)const
Fills aText with field's text content. If field is of date type formats the date as text.
Exceptions
KErrOverflow

if aText is not big enough for the text. aText contents will be clipped to aText.MaxLength().

KErrNotSupported

if the field content cannot be represented as text.

ParameterDescription
aTextFills parameter with field's content.

IconId ( )

IMPORT_C TPbkIconIdIconId()const

Returns an Phonebook icon id for this field.

Returns: The Phonebook icon id for this field.

IsEmpty ( )

IMPORT_C TBoolIsEmpty()const

Returns ETrue if this field's contents is empty.

Returns: ETrue if this field's contents is empty.

IsEmptyOrAllSpaces ( )

IMPORT_C TBoolIsEmptyOrAllSpaces()const

Returns ETrue if this field's contents is empty or all spaces.

Returns: ETrue if this field's contents is empty or all spaces.

IsHidden ( )

IMPORT_C TBoolIsHidden()const

Check if field is marked hidden.

Returns: ETrue if this field is hidden, EFalse if not.

IsSame ( const TPbkContactItemField & )

IMPORT_C TBoolIsSame(const TPbkContactItemField &aField)const

Returns ETrue if this is the same field as aField.

Returns: ETrue if this is the same field as aField.

ItemField ( )

IMPORT_C CContactItemField &ItemField()const

Returns the embedded contact item field.

Returns: The embedded contact item field.

Label ( )

IMPORT_C TPtrCLabel()const

Returns the label text of this field.

Returns: The label text of this field.

PbkFieldId ( )

IMPORT_C TPbkFieldIdPbkFieldId()const [virtual]

Returns the field id of this field data.

PbkFieldText ( )

IMPORT_C TPtrCPbkFieldText()const [virtual]

Returns the text value of this field data. PbkFieldType()==KStrorageTypeText.

PbkFieldTime ( )

IMPORT_C TTimePbkFieldTime()const [virtual]

Returns the Time value of this field data. PbkFieldType()==KStoragetTypeDateTime.

PbkFieldType ( )

IMPORT_C TStorageTypePbkFieldType()const [virtual]

Returns the type of this field data.

Returns: KStrorageTypeText or KStoragetTypeDateTime.

Set ( CContactItemField *, CPbkFieldInfo * )

IMPORT_C voidSet(CContactItemField *aField,
CPbkFieldInfo *aFieldInfo
)

Sets the contents of this object after construction.

ParameterDescription
aFieldContacts Model field this object is wrapping
aFieldInfoPhonebook field type of aField

SetHidden ( TBool )

IMPORT_C voidSetHidden(TBoolaHidden)

Marks this field as hidden or unhidden.

ParameterDescription
aHiddenETrue marks as hidden EFalse removes the mark.

SetLabelL ( const TDesC & )

IMPORT_C voidSetLabelL(const TDesC &aLabel)

Sets the label text of this field to aLabel.

ParameterDescription
aLabelText to set as the label of this field.

SpeedDialIndexesL ( )

IMPORT_C CArrayFix< TInt > *SpeedDialIndexesL()const

Returns an array of speed dial indexes assigned to this field, NULL if none.

Returns: An array of speed dial indexes assigned to this field, NULL if none.

StorageType ( )

IMPORT_C TStorageTypeStorageType()const

Returns the storage type of this field.

Returns: The storage type of this field.

Text ( )

IMPORT_C TPtrCText()const

Returns this field's textual content.

Returns: This field's textual content. StorageType()==KStorageTypeText.

TextStorage ( )

IMPORT_C CContactTextField *TextStorage()const

Returns the text storage object of this field. If the storage type is not KStorageTypeText the function raises a panic.

Returns: The text storage object of this field.

Time ( )

IMPORT_C TTimeTime()const

Returns this field's date/time content.

Returns: This field's date/time content. StorageType()==KStorageTypeDateTime.

UniqueFieldIdentity ( )

IMPORT_C TIntUniqueFieldIdentity()const

Returns an unique id for this field. NOTE: Returned id is valid only as long as this object is in memory in other words the id is not persistent!

Returns: The unique id for this field.