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 TInt Compare (const TPbkContactItemField &)
IMPORT_C CContactItemField & ContactItemField ()
IMPORT_C const CContactItemField & ContactItemField ()
IMPORT_C CContactDateField * DateTimeStorage ()
IMPORT_C TBool DefaultEmailField ()
IMPORT_C TBool DefaultEmailOverSmsField ()
IMPORT_C TBool DefaultMmsField ()
IMPORT_C TBool DefaultPhoneNumberField ()
IMPORT_C TBool DefaultPocField ()
IMPORT_C TBool DefaultSmsField ()
IMPORT_C TBool DefaultVideoNumberField ()
IMPORT_C TBool DefaultVoipField ()
IMPORT_C CPbkFieldInfo & FieldInfo ()
IMPORT_C void GetTextL ( TDes &)
IMPORT_C TPbkIconId IconId ()
IMPORT_C TBool IsEmpty ()
IMPORT_C TBool IsEmptyOrAllSpaces ()
IMPORT_C TBool IsHidden ()
IMPORT_C TBool IsSame (const TPbkContactItemField &)
IMPORT_C CContactItemField & ItemField ()
IMPORT_C TPtrC Label ()
IMPORT_C TPbkFieldId PbkFieldId ()
IMPORT_C TPtrC PbkFieldText ()
IMPORT_C TTime PbkFieldTime ()
IMPORT_C TStorageType PbkFieldType ()
IMPORT_C void Set ( CContactItemField *, CPbkFieldInfo *)
IMPORT_C void SetHidden ( TBool )
IMPORT_C void SetLabelL (const TDesC &)
IMPORT_C CArrayFix < TInt > * SpeedDialIndexesL ()
IMPORT_C TStorageType StorageType ()
IMPORT_C TPtrC Text ()
IMPORT_C CContactTextField * TextStorage ()
IMPORT_C TTime Time ()
IMPORT_C TInt UniqueFieldIdentity ()
Private Member Functions
TBool HasInvalidDate ()
void PrepareAfterLoadL ()
void PrepareForSaveL ()
Inherited Functions
MPbkFieldData::~MPbkFieldData()
Private Attributes
CContactItemField * iField
CPbkFieldInfo * iFieldInfo

Constructor & Destructor Documentation

TPbkContactItemField()

IMPORT_C TPbkContactItemField ( )

C++ default constructor.

TPbkContactItemField(CContactItemField *, CPbkFieldInfo *)

IMPORT_C TPbkContactItemField ( CContactItemField * aField,
CPbkFieldInfo * aFieldInfo
)

C++ constructor.

Parameters

CContactItemField * aField Contacts Model field this object is wrapping.
CPbkFieldInfo * aFieldInfo Phonebook field type of aField.

Member Functions Documentation

Compare(const TPbkContactItemField &)

IMPORT_C TInt Compare ( const TPbkContactItemField & aRhs ) const

Compares two items against the group ordering.

Parameters

const TPbkContactItemField & aRhs Contact 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 TBool DefaultEmailField ( ) const

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

DefaultEmailOverSmsField()

IMPORT_C TBool DefaultEmailOverSmsField ( ) const

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

DefaultMmsField()

IMPORT_C TBool DefaultMmsField ( ) const

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

DefaultPhoneNumberField()

IMPORT_C TBool DefaultPhoneNumberField ( ) const

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

DefaultPocField()

IMPORT_C TBool DefaultPocField ( ) const

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

DefaultSmsField()

IMPORT_C TBool DefaultSmsField ( ) const

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

DefaultVideoNumberField()

IMPORT_C TBool DefaultVideoNumberField ( ) const

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

DefaultVoipField()

IMPORT_C TBool DefaultVoipField ( ) 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 void GetTextL ( 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 & aText Fills parameter with field's content.

HasInvalidDate()

TBool HasInvalidDate ( ) [private]

IconId()

IMPORT_C TPbkIconId IconId ( ) const

Returns an Phonebook icon id for this field.

IsEmpty()

IMPORT_C TBool IsEmpty ( ) const

Returns ETrue if this field's contents is empty.

IsEmptyOrAllSpaces()

IMPORT_C TBool IsEmptyOrAllSpaces ( ) const

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

IsHidden()

IMPORT_C TBool IsHidden ( ) const

Check if field is marked hidden.

IsSame(const TPbkContactItemField &)

IMPORT_C TBool IsSame ( 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 TPtrC Label ( ) const

Returns the label text of this field.

PbkFieldId()

IMPORT_C TPbkFieldId PbkFieldId ( ) const [virtual]

Returns the field id of this field data.

PbkFieldText()

IMPORT_C TPtrC PbkFieldText ( ) const [virtual]

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

PbkFieldTime()

IMPORT_C TTime PbkFieldTime ( ) const [virtual]

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

PbkFieldType()

IMPORT_C TStorageType PbkFieldType ( ) const [virtual]

Returns the type of this field data.

PrepareAfterLoadL()

void PrepareAfterLoadL ( ) [private]

PrepareForSaveL()

void PrepareForSaveL ( ) [private]

Set(CContactItemField *, CPbkFieldInfo *)

IMPORT_C void Set ( CContactItemField * aField,
CPbkFieldInfo * aFieldInfo
)

Sets the contents of this object after construction.

Parameters

CContactItemField * aField Contacts Model field this object is wrapping
CPbkFieldInfo * aFieldInfo Phonebook field type of aField

SetHidden(TBool)

IMPORT_C void SetHidden ( TBool aHidden )

Marks this field as hidden or unhidden.

Parameters

TBool aHidden ETrue marks as hidden EFalse removes the mark.

SetLabelL(const TDesC &)

IMPORT_C void SetLabelL ( const TDesC & aLabel )

Sets the label text of this field to aLabel.

Parameters

const TDesC & aLabel Text 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 TStorageType StorageType ( ) const

Returns the storage type of this field.

Text()

IMPORT_C TPtrC Text ( ) 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 TTime Time ( ) const

Returns this field's date/time content.

UniqueFieldIdentity()

IMPORT_C TInt UniqueFieldIdentity ( ) 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]