![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
CBase |
Abstract: CBase behaviour. |
cntitem.h
cntmodel.lib
The abstract base class for CContactCard and for CContactTemplate. Each contact item is identified by a contact ID, (TContactItemId), has a last modified date and time, and owns one or more fields (the field set). Contact items also have an access count and can have attributes (e.g. hidden). Note that fields within a contact item also have attributes. Attribute values specified in the contact item override those in the fields.
virtual TUid Type() const=0;
Implemented by the derived class to indicate the contact item type.
TUid |
The contact type. |
TContactItemId Id() const;
Retrieve the contact item ID.
The contact item ID. |
TTime LastModified() const;
Returns the contact item's last modified date/time.
TTime |
The contact item's last modified date/time. |
void SetLastModified(const TTime& aLastModified);
This function sets the last modified date/time value stored in the local copy of the contact item and will affect the value returned by LastModified() for this copy of the item.
This function has no effect on the item's last modified date/time which is stored in the database this is always the date/time the contact was last committed.
This function is provided for use by connectivity, e.g. when synchronizing contact items.
const TTime& aLastModified |
The contact item's last modified date/time. |
void AddFieldL(CContactItemField& aField);
Appends a field to the contact item's field set. The contact item takes ownership of the field.
CContactItemField& aField |
The field to append to the contact item's field set. |
void RemoveField(TInt aFieldPos);
Removes a field from the contact item's field set. A panic occurs if the specified field does not exist in the field set.
TInt aFieldPos |
Index within the field set of the field to remove. |
void InsertFieldL(CContactItemField& aField,TInt aFieldPos);
Inserts a field into the contact item's field set. The contact item takes ownership of the field.
CContactItemField& aField |
The field to insert into the contact item's field set. |
TInt aFieldPos |
The position in the field set at which to insert the field. If this value is greater than the total number of fields, it is appended. The position is relative to zero, i.e. zero implies that the element is inserted at the beginning of the array. |
CContactItemFieldSet& CardFields() const;
Returns a reference to the contact item's field set.
CContactItemFieldSet& |
A reference to the contact item's field set. |
void UpdateFieldSet(CContactItemFieldSet* aNewFieldSet);
Replaces the contact item's field set. The previous field set is deleted.
CContactItemFieldSet* aNewFieldSet |
The new field set with which to replace the existing one. |
void SetHidden(TBool aHidden);
Sets the contact item's hidden attribute.
TBool aHidden |
ETrue to set the hidden attribute for the item, EFalse to unset it. |
void SetSystem(TBool aSystem);
Sets the contact item's system attribute.
TBool aSystem |
ETrue to set the system attribute, EFalse to unset it. |
TBool IsHidden();
Retrieves the value of the contact item's hidden attribute.
TBool |
ETrue if hidden, EFalse if not. |
TBool IsSystem();
Retrieves the value of the contact item's system attribute.
TBool |
ETrue if system, EFalse if not. |
Note: the functions in this section are provided for use by Connectivity applications.
TBool IsDeletable();
Returns ETrue if the contact item's access count is zero; this means that it is deletable.
TBool |
ETrue if deletable, EFalse if not deletable. |
void SetDeleteFlag(TBool aValue);
Sets the contact item's delete flag.
The delete flag indicates whether an attempt has been made to delete the contact item, but because the item's access count is greater than zero, its data persists and the item should just be marked as deleted.
TBool aValue |
ETrue to set the delete flag. EFalse to unset it. |
TBool IsDeleted();
Retrieves the value of the delete flag, as set by SetDeleteFlag().
TBool |
ETrue if the delete flag is set, EFalse if not. |
Note: the functions in this section are provided for use by Connectivity applications.
void IncAccessCount();
Increment the contact item's access count.
void DecAccessCount();
Decrements the contact item's access count. If the access count is already zero, it is not decremented any further.
TInt AccessCount() const;
Returns the contact item's access count.
TInt |
The contact item's access count. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |