| 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.
| Public Member Functions | |
|---|---|
| ~CContactGroup() | |
| IMPORT_C void | AddContactL(TContactItemId) |
| IMPORT_C TBool | ContainsItem(TContactItemId) |
| void | ExternalizeL(RWriteStream &) |
| IMPORT_C TPtrC | GetGroupLabelL() |
| IMPORT_C CContactIdArray * | GroupsJoinedLC() |
| IMPORT_C TBool | HasItemLabelField() |
| void | InternalizeL(RReadStream &) |
| IMPORT_C TBool | IsSystem() |
| IMPORT_C const CContactIdArray * | ItemsContained() |
| IMPORT_C CContactIdArray * | ItemsContainedLC() |
| IMPORT_C CContactGroup * | NewL() |
| IMPORT_C CContactGroup * | NewLC() |
| IMPORT_C void | RemoveContactL(TContactItemId) |
| IMPORT_C void | ResetItems() |
| IMPORT_C void | SetGroupLabelL(const TDesC &) |
| IMPORT_C void | SetItems(CContactIdArray *) |
| IMPORT_C void | SetSystem(TBool) |
| IMPORT_C TUid | Type() |
| Private Member Functions | |
|---|---|
| CContactGroup() | |
| Inherited Enumerations | |
|---|---|
| CContactItem:@338 | |
| Private Attributes | |
|---|---|
| CContactIdArray * | iItems |
| IMPORT_C void | AddContactL | ( | TContactItemId | aContactId | ) |
| TContactItemId aContactId |
| IMPORT_C TBool | ContainsItem | ( | TContactItemId | aContactId | ) |
| TContactItemId aContactId |
| void | ExternalizeL | ( | RWriteStream & | aStream | ) | const [virtual] |
| RWriteStream & aStream |
| void | InternalizeL | ( | RReadStream & | aStream | ) | [virtual] |
| RReadStream & aStream |
| IMPORT_C void | RemoveContactL | ( | TContactItemId | aContactId | ) |
| TContactItemId aContactId |
| IMPORT_C void | SetGroupLabelL | ( | const TDesC & | aLabel | ) |
| const TDesC & aLabel |
| IMPORT_C void | SetItems | ( | CContactIdArray * | aItems | ) |
| CContactIdArray * aItems |