TPbkContactItemField 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 <tpbkcontactitemfield.h>

Inherits MPbkFieldData.


Detailed Description

Phonebook Contact item field class.

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


Public Member Functions

IMPORT_C  TPbkContactItemField ()
  C++ default constructor.
IMPORT_C  TPbkContactItemField (CContactItemField *aField, CPbkFieldInfo *aFieldInfo)
  C++ constructor.
IMPORT_C void  Set (CContactItemField *aField, CPbkFieldInfo *aFieldInfo)
  Sets the contents of this object after construction.
IMPORT_C TPbkIconId  IconId () const
  Returns an Phonebook icon id for this field.
IMPORT_C CPbkFieldInfo FieldInfo () const
  Returns the Phonebook field info object of this field.
IMPORT_C TPtrC  Text () const
  Returns this field's textual content.
IMPORT_C TTime  Time () const
  Returns this field's date/time content.
IMPORT_C void  GetTextL (TDes &aText) const
  Fills aText with field's text content.
IMPORT_C TStorageType  StorageType () const
  Returns the storage type of this field.
IMPORT_C CContactItemField &  ItemField () const
  Returns the embedded contact item field.
IMPORT_C CContactTextField *  TextStorage () const
  Returns the text storage object of this field.
IMPORT_C TPtrC  Label () const
  Returns the label text of this field.
IMPORT_C void  SetLabelL (const TDesC &aLabel)
  Sets the label text of this field to aLabel.
IMPORT_C void  SetHidden (TBool aHidden)
  Marks this field as hidden or unhidden.
IMPORT_C TBool  IsHidden () const
  Check if field is marked hidden.
IMPORT_C CContactDateField *  DateTimeStorage () const
  Returns time storage of this field.
IMPORT_C TBool  IsSame (const TPbkContactItemField &aField) const
  Returns ETrue if this is the same field as aField.
IMPORT_C CContactItemField &  ContactItemField ()
  Converts this field to a CContactItemField.
IMPORT_C const CContactItemField &  ContactItemField () const
  Converts this field to a const CContactItemField.
IMPORT_C TInt  Compare (const TPbkContactItemField &aRhs) const
  Compares two items against the group ordering.
IMPORT_C TInt  UniqueFieldIdentity () const
  Returns an unique id for this field.
IMPORT_C TBool  IsEmpty () const
  Returns ETrue if this field's contents is empty.
IMPORT_C TBool  IsEmptyOrAllSpaces () const
  Returns ETrue if this field's contents is empty or all spaces.
IMPORT_C TBool  DefaultPhoneNumberField () const
  Returns ETrue is this field is a default phone number field.
IMPORT_C TBool  DefaultVideoNumberField () const
  Returns ETrue if this field is a default video number field.
IMPORT_C TBool  DefaultSmsField () const
  Returns ETrue is this field is a default SMS field.
IMPORT_C TBool  DefaultEmailOverSmsField () const
  Returns ETrue is this field is a default SMS With Email field.
IMPORT_C TBool  DefaultEmailField () const
  Returns ETrue is this field is a default email field.
IMPORT_C TBool  DefaultMmsField () const
  Returns ETrue is this field is a default MMS field.
IMPORT_C TBool  DefaultPocField () const
  Returns ETrue is this field is a default POC field.
IMPORT_C TBool  DefaultVoipField () const
  Returns ETrue is this field is a default VOIP field.
IMPORT_C CArrayFix< TInt > *  SpeedDialIndexesL () const
  Returns an array of speed dial indexes assigned to this field, NULL if none.
IMPORT_C TStorageType  PbkFieldType () const
  Returns the type of this field data.
IMPORT_C TPbkFieldId  PbkFieldId () const
  Returns the field id of this field data.
IMPORT_C TPtrC  PbkFieldText () const
  Returns the text value of this field data.
IMPORT_C TTime  PbkFieldTime () const
  Returns the Time value of this field data.

Friends

class  CPbkContactItem
  CPbkContactItem calls private functions of this class.
IMPORT_C TBool  operator== (const TPbkContactItemField &aLeft, const TPbkContactItemField &aRight)
  Returns ETrue if aLeft has same contents as aRight.

Constructor & Destructor Documentation

IMPORT_C TPbkContactItemField::TPbkContactItemField  ) 
 

C++ default constructor.

IMPORT_C TPbkContactItemField::TPbkContactItemField CContactItemField *  aField,
CPbkFieldInfo aFieldInfo
 

C++ constructor.

Parameters:
aField  Contacts Model field this object is wrapping.
aFieldInfo  Phonebook field type of aField.

Member Function Documentation

IMPORT_C TInt TPbkContactItemField::Compare const TPbkContactItemField aRhs  )  const
 

Compares two items against the group ordering.

Parameters:
aRhs  Contact item field to compare to this field.
IMPORT_C const CContactItemField& TPbkContactItemField::ContactItemField  )  const
 

Converts this field to a const CContactItemField.

Returns:
The embedded CContactItemField object.
IMPORT_C CContactItemField& TPbkContactItemField::ContactItemField  ) 
 

Converts this field to a CContactItemField.

Returns:
The embedded CContactItemField object.
IMPORT_C CContactDateField* TPbkContactItemField::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.
IMPORT_C TBool TPbkContactItemField::DefaultEmailField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultEmailOverSmsField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultMmsField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultPhoneNumberField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultPocField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultSmsField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultVideoNumberField  )  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.
IMPORT_C TBool TPbkContactItemField::DefaultVoipField  )  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.
IMPORT_C CPbkFieldInfo& TPbkContactItemField::FieldInfo  )  const
 

Returns the Phonebook field info object of this field.

Returns:
Field info for this field.
IMPORT_C void TPbkContactItemField::GetTextL TDes &  aText  )  const
 

Fills aText with field's text content.

If field is of date type formats the date as text.

Parameters:
aText  Fills parameter with field's content.
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.
IMPORT_C TPbkIconId TPbkContactItemField::IconId  )  const
 

Returns an Phonebook icon id for this field.

Returns:
The Phonebook icon id for this field.
IMPORT_C TBool TPbkContactItemField::IsEmpty  )  const
 

Returns ETrue if this field's contents is empty.

Returns:
ETrue if this field's contents is empty.
IMPORT_C TBool TPbkContactItemField::IsEmptyOrAllSpaces  )  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.
IMPORT_C TBool TPbkContactItemField::IsHidden  )  const
 

Check if field is marked hidden.

Returns:
ETrue if this field is hidden, EFalse if not.
IMPORT_C TBool TPbkContactItemField::IsSame const TPbkContactItemField aField  )  const
 

Returns ETrue if this is the same field as aField.

Returns:
ETrue if this is the same field as aField.
IMPORT_C CContactItemField& TPbkContactItemField::ItemField  )  const
 

Returns the embedded contact item field.

Returns:
The embedded contact item field.
IMPORT_C TPtrC TPbkContactItemField::Label  )  const
 

Returns the label text of this field.

Returns:
The label text of this field.
IMPORT_C TPbkFieldId TPbkContactItemField::PbkFieldId  )  const [virtual]
 

Returns the field id of this field data.

Implements MPbkFieldData.

IMPORT_C TPtrC TPbkContactItemField::PbkFieldText  )  const [virtual]
 

Returns the text value of this field data.

PbkFieldType()==KStrorageTypeText.

Implements MPbkFieldData.

IMPORT_C TTime TPbkContactItemField::PbkFieldTime  )  const [virtual]
 

Returns the Time value of this field data.

PbkFieldType()==KStoragetTypeDateTime.

Implements MPbkFieldData.

IMPORT_C TStorageType TPbkContactItemField::PbkFieldType  )  const [virtual]
 

Returns the type of this field data.

Returns:
KStrorageTypeText or KStoragetTypeDateTime.

Implements MPbkFieldData.

IMPORT_C void TPbkContactItemField::Set CContactItemField *  aField,
CPbkFieldInfo aFieldInfo
 

Sets the contents of this object after construction.

Parameters:
aField  Contacts Model field this object is wrapping
aFieldInfo  Phonebook field type of aField
IMPORT_C void TPbkContactItemField::SetHidden TBool  aHidden  ) 
 

Marks this field as hidden or unhidden.

Parameters:
aHidden  ETrue marks as hidden EFalse removes the mark.
IMPORT_C void TPbkContactItemField::SetLabelL const TDesC &  aLabel  ) 
 

Sets the label text of this field to aLabel.

Parameters:
aLabel  Text to set as the label of this field.
IMPORT_C CArrayFix<TInt>* TPbkContactItemField::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.
IMPORT_C TStorageType TPbkContactItemField::StorageType  )  const
 

Returns the storage type of this field.

Returns:
The storage type of this field.
IMPORT_C TPtrC TPbkContactItemField::Text  )  const
 

Returns this field's textual content.

Returns:
This field's textual content. StorageType()==KStorageTypeText.
IMPORT_C CContactTextField* TPbkContactItemField::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.
IMPORT_C TTime TPbkContactItemField::Time  )  const
 

Returns this field's date/time content.

Returns:
This field's date/time content. StorageType()==KStorageTypeDateTime.
IMPORT_C TInt TPbkContactItemField::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!

Returns:
The unique id for this field.

Friends And Related Function Documentation

friend class CPbkContactItem [friend]
 

CPbkContactItem calls private functions of this class.

IMPORT_C TBool operator== const TPbkContactItemField aLeft,
const TPbkContactItemField aRight
[friend]
 

Returns ETrue if aLeft has same contents as aRight.

Doesn't compare everything (all field flags etc.) but all the attributes that could affect how this field looks like in the Phonebook UI. This function can be used to determine wheter to update this field in the UI.


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

Copyright © Nokia Corporation 2001-2008
Back to top