Location:
cntitem.h
Link against: cntmodel.lib
CContactGroup
Supported from 6.0
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.
|
Defined in CContactGroup
:
ContainsItem()
, GetGroupLabelL()
, GroupsJoinedLC()
, HasItemLabelField()
, IsSystem()
, ItemsContained()
, ItemsContainedLC()
, NewL()
, NewLC()
, SetGroupLabelL()
, SetSystem()
, Type()
, ~CContactGroup()
Inherited from CBase
:
operator new()
Inherited from CContactItem
:
AccessCount()
,
AddFieldL()
,
CardFields()
,
DecAccessCount()
,
Id()
,
IncAccessCount()
,
InsertFieldL()
,
IsDeletable()
,
IsDeleted()
,
IsHidden()
,
LastModified()
,
RemoveField()
,
SetDeleteFlag()
,
SetDeleted()
,
SetHidden()
,
SetLastModified()
,
SetTemplateRefId()
,
SetUidStringL()
,
TemplateRefId()
,
UidStringL()
,
UpdateFieldSet()
Inherited from CContactItemPlusGroup
:
GroupsJoined()
static CContactGroup* NewL();
Allocates and constructs a new contact card group. The group has no label and its list of members is NULL.
Note
Contact groups should be constructed using the factory
functions provided in class CContactDatabase
, for example
CreateContactGroupL()
.
|
static CContactGroup* NewLC();
Allocates and constructs a new contact card group, leaving a pointer to the object on the cleanup stack. The group has no label and its list of members is NULL.
Note
Contact groups should be constructed using the factory
functions provided in class CContactDatabase
, for example
CreateContactGroupLC()
.
|
~CContactGroup();
The destructor frees all resources owned by the contact card group, prior to its destruction.
TUid Type() const;
Implements the pure virtual function inherited from the base
class CContactItem
. Returns
KUidContactGroup
.
|
CContactIdArray* ItemsContainedLC() const;
Returns a pointer to a copy of the group's list of members.
|
const CContactIdArray* ItemsContained() const;
Returns a constant pointer to the group's list of members.
|
TBool ContainsItem(TContactItemId aContactId);
Tests whether a contact item is a member of the group.
|
|
CContactIdArray* GroupsJoinedLC() const;
A contact item group can belong to other groups. This function returns a pointer to a list of contact item IDs which identify the groups to which the current group belongs.
|
TBool IsSystem() const;
Tests the value of the group's system attribute. Note that the system attribute is not currently used in the contacts model.
|
void SetSystem(TBool aSystem);
Sets the group's system attribute. Note that the system attribute is not currently used in the contacts model.
|
void SetGroupLabelL(const TDesC& aLabel);
Sets the group label. Any existing label is replaced.
|
|
TPtrC GetGroupLabelL();
Gets the group label.
|
|
TBool HasItemLabelField();
Tests whether the group has a label field (type
KUidContactFieldTemplateLabel
).
|