TPbkContactItemField Class Reference

class TPbkContactItemField : public MPbkFieldData

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

Inherits from

Public Member Functions
TPbkContactItemField()
TPbkContactItemField(CContactItemField *, CPbkFieldInfo *)
IMPORT_C TIntCompare(const TPbkContactItemField &)
IMPORT_C CContactItemField &ContactItemField()
IMPORT_C const CContactItemField &ContactItemField()
IMPORT_C CContactDateField *DateTimeStorage()
IMPORT_C TBoolDefaultEmailField()
IMPORT_C TBoolDefaultEmailOverSmsField()
IMPORT_C TBoolDefaultMmsField()
IMPORT_C TBoolDefaultPhoneNumberField()
IMPORT_C TBoolDefaultPocField()
IMPORT_C TBoolDefaultSmsField()
IMPORT_C TBoolDefaultVideoNumberField()
IMPORT_C TBoolDefaultVoipField()
IMPORT_C CPbkFieldInfo &FieldInfo()
IMPORT_C voidGetTextL(TDes &)
IMPORT_C TPbkIconIdIconId()
IMPORT_C TBoolIsEmpty()
IMPORT_C TBoolIsEmptyOrAllSpaces()
IMPORT_C TBoolIsHidden()
IMPORT_C TBoolIsSame(const TPbkContactItemField &)
IMPORT_C CContactItemField &ItemField()
IMPORT_C TPtrCLabel()
IMPORT_C TPbkFieldIdPbkFieldId()
IMPORT_C TPtrCPbkFieldText()
IMPORT_C TTimePbkFieldTime()
IMPORT_C TStorageTypePbkFieldType()
IMPORT_C voidSet(CContactItemField *, CPbkFieldInfo *)
IMPORT_C voidSetHidden(TBool)
IMPORT_C voidSetLabelL(const TDesC &)
IMPORT_C CArrayFix< TInt > *SpeedDialIndexesL()
IMPORT_C TStorageTypeStorageType()
IMPORT_C TPtrCText()
IMPORT_C CContactTextField *TextStorage()
IMPORT_C TTimeTime()
IMPORT_C TIntUniqueFieldIdentity()
Private Member Functions
TBool HasInvalidDate()
voidPrepareAfterLoadL()
voidPrepareForSaveL()
Inherited Functions
MPbkFieldData::~MPbkFieldData()
Private Attributes
CContactItemField *iField
CPbkFieldInfo *iFieldInfo

Constructor & Destructor Documentation

TPbkContactItemField()

IMPORT_CTPbkContactItemField()

C++ default constructor.

TPbkContactItemField(CContactItemField *, CPbkFieldInfo *)

IMPORT_CTPbkContactItemField(CContactItemField *aField,
CPbkFieldInfo *aFieldInfo
)

C++ constructor.

Parameters

CContactItemField * aFieldContacts Model field this object is wrapping.
CPbkFieldInfo * aFieldInfoPhonebook field type of aField.

Member Functions Documentation

Compare(const TPbkContactItemField &)

IMPORT_C TIntCompare(const TPbkContactItemField &aRhs)const

Compares two items against the group ordering.

Parameters

const TPbkContactItemField & aRhsContact item field to compare to this field.

ContactItemField()

IMPORT_C CContactItemField &ContactItemField()

Converts this field to a CContactItemField.

ContactItemField()

IMPORT_C const CContactItemField &ContactItemField()const

Converts this field to a const CContactItemField.

DateTimeStorage()

IMPORT_C CContactDateField *DateTimeStorage()const

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

DefaultEmailField()

IMPORT_C TBoolDefaultEmailField()const

Returns ETrue is this field is a default email field. CPbkContactItem::DefaultEmailField CPbkContactItem::SetDefaultEmailField

DefaultEmailOverSmsField()

IMPORT_C TBoolDefaultEmailOverSmsField()const

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

DefaultMmsField()

IMPORT_C TBoolDefaultMmsField()const

Returns ETrue is this field is a default MMS field. CPbkContactItem::DefaultMmsField CPbkContactItem::SetDefaultMmsField

DefaultPhoneNumberField()

IMPORT_C TBoolDefaultPhoneNumberField()const

Returns ETrue is this field is a default phone number field. CPbkContactItem::DefaultPhoneNumberField CPbkContactItem::SetDefaultPhoneNumberField

DefaultPocField()

IMPORT_C TBoolDefaultPocField()const

Returns ETrue is this field is a default POC field. CPbkContactItem::DefaultPocField CPbkContactItem::SetDefaultPocField

DefaultSmsField()

IMPORT_C TBoolDefaultSmsField()const

Returns ETrue is this field is a default SMS field. CPbkContactItem::DefaultSmsField CPbkContactItem::SetDefaultSmsField

DefaultVideoNumberField()

IMPORT_C TBoolDefaultVideoNumberField()const

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

DefaultVoipField()

IMPORT_C TBoolDefaultVoipField()const

Returns ETrue is this field is a default VOIP field. CPbkContactItem::DefaultVoipField CPbkContactItem::SetDefaultVoipField

FieldInfo()

IMPORT_C CPbkFieldInfo &FieldInfo()const

Returns the Phonebook field info object of 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.

Parameters

TDes & aTextFills parameter with field's content.

HasInvalidDate()

TBool HasInvalidDate()[private]

IconId()

IMPORT_C TPbkIconIdIconId()const

Returns an Phonebook icon id for this field.

IsEmpty()

IMPORT_C TBoolIsEmpty()const

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.

IsHidden()

IMPORT_C TBoolIsHidden()const

Check if field is marked hidden.

IsSame(const TPbkContactItemField &)

IMPORT_C TBoolIsSame(const TPbkContactItemField &aField)const

Returns ETrue if this is the same field as aField.

Parameters

const TPbkContactItemField & aField

ItemField()

IMPORT_C CContactItemField &ItemField()const

Returns the embedded contact item field.

Label()

IMPORT_C TPtrCLabel()const

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.

PrepareAfterLoadL()

voidPrepareAfterLoadL()[private]

PrepareForSaveL()

voidPrepareForSaveL()[private]

Set(CContactItemField *, CPbkFieldInfo *)

IMPORT_C voidSet(CContactItemField *aField,
CPbkFieldInfo *aFieldInfo
)

Sets the contents of this object after construction.

Parameters

CContactItemField * aFieldContacts Model field this object is wrapping
CPbkFieldInfo * aFieldInfoPhonebook field type of aField

SetHidden(TBool)

IMPORT_C voidSetHidden(TBoolaHidden)

Marks this field as hidden or unhidden.

Parameters

TBool 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.

Parameters

const TDesC & 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.

StorageType()

IMPORT_C TStorageTypeStorageType()const

Returns the storage type of this field.

Text()

IMPORT_C TPtrCText()const

Returns this field's textual content.

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.

Time()

IMPORT_C TTimeTime()const

Returns this field's date/time content.

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!

Member Data Documentation

CContactItemField * iField

CContactItemField *iField[private]

CPbkFieldInfo * iFieldInfo

CPbkFieldInfo *iFieldInfo[private]