Location:
CNTITEM.H
Link against: cntmodel.lib
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
- A contact group
Defined in CContactGroup
:
ContainsItem()
, ExternalizeL()
, GetGroupLabelL()
, GroupsJoinedLC()
, HasItemLabelField()
, InternalizeL()
, IsSystem()
, ItemsContained()
, ItemsContainedLC()
, NewL()
, NewLC()
, SetGroupLabelL()
, SetSystem()
, Type()
, ~CContactGroup()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CContactItem
:
AccessCount()
,
AddFieldL()
,
CardFields()
,
DecAccessCount()
,
ECompressedGuid
,
EDeleted
,
EHidden
,
ESystem
,
Guid()
,
Id()
,
IncAccessCount()
,
InsertFieldL()
,
IsDeletable()
,
IsDeleted()
,
IsHidden()
,
LastModified()
,
RemoveField()
,
SetDeleted()
,
SetHidden()
,
SetLastModified()
,
SetTemplateRefId()
,
SetUidStringL()
,
TemplateRefId()
,
UidStringL()
,
UpdateFieldSet()
,
anonymous
Inherited from CContactItemPlusGroup
:
GroupsJoined()
static 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.
|