|
||
class CContactGroup : public CContactItemPlusGroup;
A contact group.
A contact group is a contact item which holds a set of associated contact item IDs. The members of the group may be contact
cards, own cards, or even other groups. The group has a label which identifies the group to users, e.g. "family", or "colleagues".
The type of a contact group is KUidContactGroup, as returned by Type()
.
Objects of this class are constructed using CContactDatabase::CreateContactGroupL()
or CreateContactGroupLC(). These functions create the group, optionally with a label, add it to the database, and return
a pointer to it.
To create an association between a card and a group, use CContactDatabase::AddContactToGroupL()
and to remove the association, use RemoveContactFromGroupL(). To find out which groups a card belongs to, use CContactCard::GroupsJoinedLC()
or CContactOwnCard::GroupsJoinedLC()
.
The function CContactDatabase::GetGroupIdListL()
may be used to retrieve a list of IDs for all groups in the database.
CBase
- Base class for all classes to be instantiated on the heap
CContactItem
- The abstract base class for contact cards, templates and groups
CContactItemPlusGroup
- Abstract base class for CContactGroup, CContactCard and CContactOwnCard
CContactGroup
- A contact group
Defined in CContactGroup
:
ContainsItem()
Tests whether a contact item is a member of the groupExternalizeL()
Externalises a CContactGroup object to a write streamGetGroupLabelL()
Gets the group labelGroupsJoinedLC()
Returns a pointer to a list of contact groups to which the current group belongs (a contact group can belong to other groups)HasItemLabelField()
Tests whether the group has a label field (of type KUidContactFieldTemplateLabel)InternalizeL()
Internalises a CContactGroup object from a read streamIsSystem()
Tests the value of the group's system attributeItemsContained()
Returns a constant pointer to the group's list of membersItemsContainedLC()
Returns a pointer to a copy of the group's list of membersNewL()
Allocates and constructs a new default contact card groupNewLC()
Allocates and constructs a new default contact card groupSetGroupLabelL()
Sets the group label, replacing any existing oneSetSystem()
Sets the value of the group's system attributeType()
Implements CContactItem::Type()~CContactGroup()
The destructor frees all resources owned by the contact group, prior to its destructionInherited from CBase
:
Delete()
Deletes the specified objectExtension_()
Extension functionoperator new()
Initialises the object to binary zeroesInherited from CContactItem
:
AccessCount()
Gets the contact item's access countAddFieldL()
Appends a field to the contact item's field setCardFields()
Gets a reference to the contact item's field setDecAccessCount()
Decrements the contact item's access countECompressedGuid
To set the contact item's hidden attributeEDeleted
To set the contact item's Is deleted attributeEHidden
To set the contact item's hidden attributeESystem
To set the contact item's system attributeGuid()
Accessor function for Contact GuidId()
Gets the contact item's IDIncAccessCount()
Increments the contact item's access countInsertFieldL()
Inserts a field into the contact item's field setIsDeletable()
Tests whether the contact item is deletableIsDeleted()
Gets the value of the Is deleted attribute as set by SetDeleted()IsHidden()
Gets the value of the contact item's hidden attributeLastModified()
Gets the contact item's last modified date/timeRemoveField()
Removes a field from the contact item's field setSetDeleted()
Sets the value of the contact item's Is deleted attributeSetHidden()
Sets the contact item's hidden attributeSetLastModified()
Sets the last modified date/time value stored in the local copy of the contact itemSetTemplateRefId()
Sets the ID of the template on which this contact item is basedSetUidStringL()
Sets the item's UID stringTemplateRefId()
Gets the ID of the template which was used to create this contact itemUidStringL()
Returns a descriptor which contains the item's UID stringUpdateFieldSet()
Replaces the contact item's field setanonymous
Contact item's attribute flagsInherited from CContactItemPlusGroup
:
GroupsJoined()
Returns a pointer to a list of contact item IDs which identify the groups to which the derived class object belongsstatic IMPORT_C CContactGroup *NewL();
Allocates and constructs a new default contact card group. The group has no label and its list of members is NULL.
Contact groups should be constructed using the factory functions provided in class CContactDatabase
, for example CreateContactGroupL().
|
static IMPORT_C CContactGroup *NewLC();
Allocates and constructs a new default contact card group.
The group has no label and its list of members is NULL.
Contact groups should be constructed using the factory functions provided in class CContactDatabase
, for example CreateContactGroupLC().
|
IMPORT_C ~CContactGroup();
The destructor frees all resources owned by the contact group, prior to its destruction.
virtual IMPORT_C TUid Type() const;
Implements CContactItem::Type()
.
|
IMPORT_C CContactIdArray *ItemsContainedLC() const;
Returns a pointer to a copy of the group's list of members.
|
IMPORT_C const CContactIdArray *ItemsContained() const;
Returns a constant pointer to the group's list of members.
|
IMPORT_C TBool IsSystem() const;
Tests the value of the group's system attribute.
The system attribute is not currently used in the Contacts Model API.
|
IMPORT_C void SetSystem(TBool aSystem);
Sets the value of the group's system attribute.
The system attribute is not currently used in the Contacts Model API.
|
IMPORT_C TBool ContainsItem(TContactItemId aContactId);
Tests whether a contact item is a member of the group.
|
|
IMPORT_C void SetGroupLabelL(const TDesC &aLabel);
Sets the group label, replacing any existing one.
|
|
IMPORT_C TPtrC GetGroupLabelL();
Gets the group label.
|
|
IMPORT_C TBool HasItemLabelField();
Tests whether the group has a label field (of type KUidContactFieldTemplateLabel).
|
IMPORT_C CContactIdArray *GroupsJoinedLC() const;
Returns a pointer to a list of contact groups to which the current group belongs (a contact group can belong to other groups).
|
virtual void ExternalizeL(RWriteStream &aStream) const;
Externalises a CContactGroup object to a write stream.
|
virtual void InternalizeL(RReadStream &aStream);
Internalises a CContactGroup object from a read stream.
|