class CContactGroupView : public CContactViewBase |
Provides a view of a group of contact items.
The view uses an underlying view. For items to appear in the group view, they must exist in the underlying view.
The TGroupType enumeration defines whether the view displays items that belong to the group, items that do not belong to the group, or items that do not belong to any group.
The group view observes its underlying view so that it is kept up to date if the contents of the underlying view change.
The group can be identified by a contact item ID or by a label, e.g. "family", or "colleagues".
Public Member Functions | |
---|---|
~CContactGroupView () | |
HBufC * | AllFieldsLC ( TInt , const TDesC &) |
TContactItemId | AtL ( TInt ) |
TAny * | CContactViewBase_Reserved_1 ( TFunction , TAny *) |
const CViewContact & | ContactAtL ( TInt ) |
TContactViewPreferences | ContactViewPreferences () |
TInt | CountL () |
TInt | FindL ( TContactItemId ) |
IMPORT_C CContactGroupView * | NewL (const CContactDatabase &, CContactViewBase &, MContactViewObserver &, const TContactItemId , const TGroupType ) |
IMPORT_C CContactGroupView * | NewL (const CContactDatabase &, CContactViewBase &, MContactViewObserver &, const TDesC &, const TGroupType ) |
IMPORT_C CContactGroupView * | NewL ( CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TContactItemId , const TGroupType ) |
IMPORT_C CContactGroupView * | NewL ( CContactViewBase &, const CContactDatabase &, MContactViewObserver &, const TDesC &, const TGroupType ) |
const RContactViewSortOrder & | SortOrderL () |
Protected Member Functions | |
---|---|
IMPORT_C void | UpdateGroupViewL () |
Private Member Functions | |
---|---|
CContactGroupView (const CContactDatabase &, CContactViewBase &, TGroupType ) | |
TInt | CompareIndexesAllowingDuplicates (const TContactIdWithMapping &, const TContactIdWithMapping &) |
TInt | CompareMappingsL (const TContactIdWithMapping &, const TContactIdWithMapping &) |
void | ConstructL ( MContactViewObserver &, TContactItemId ) |
TContactItemId | GetGroupIdbyNameL (const TDesC &) |
TBool | HandleAddEventForUnfiledContactsL (const TContactViewEvent &) |
TBool | HandleAddEventL ( TContactViewEvent &) |
void | HandleContactViewEvent (const CContactViewBase &, const TContactViewEvent &) |
TBool | HandleRemoveEventL ( TContactViewEvent &) |
void | NotifyRemovedMembersL (const CContactIdArray *) |
void | UpdateForContactListL (const CContactIdArray *) |
void | UpdateForContactsInGroupL () |
void | UpdateForContactsNotInThisGroupL () |
void | UpdateForUnfiledContactsL () |
void | UpdateMappingsL () |
Public Member Enumerations | |
---|---|
enum | TGroupType { EShowContactsInGroup , EShowContactsNotInGroup , EShowContactsNotInAnyGroup } |
Inherited Enumerations | |
---|---|
CContactViewBase:TFunction | |
CContactViewBase:TSearchType | |
CContactViewBase:TState |
Private Attributes | |
---|---|
TUint | iClassVersion |
RArray < TContactIdWithMapping > | iGroupContacts |
TContactItemId | iGroupId |
TGroupType | iGroupType |
CContactViewBase & | iView |
Inherited Attributes | |
---|---|
CContactViewBase::iDb | |
CContactViewBase::iExtension | |
CContactViewBase::iState |
CContactGroupView | ( | const CContactDatabase & | aDb, |
CContactViewBase & | aView, | ||
TGroupType | aGroupType | ||
) | [private] |
const CContactDatabase & aDb | |
CContactViewBase & aView | |
TGroupType aGroupType |
HBufC * | AllFieldsLC | ( | TInt | aIndex, |
const TDesC & | aSeparator | |||
) | const [virtual] |
Gets a descriptor containing the contents of all fields in an item in the view.
The fields are separated by aSeparator.
TContactItemId | AtL | ( | TInt | aIndex | ) | const [virtual] |
Gets the contact item ID at the specified view index.
TInt aIndex | Index into the group view. |
TAny * | CContactViewBase_Reserved_1 | ( | TFunction | aFunction, |
TAny * | aParams | |||
) | [virtual] |
TInt | CompareIndexesAllowingDuplicates | ( | const TContactIdWithMapping & | aFirst, |
const TContactIdWithMapping & | aSecond | |||
) | [private, static] |
const TContactIdWithMapping & aFirst | |
const TContactIdWithMapping & aSecond |
TInt | CompareMappingsL | ( | const TContactIdWithMapping & | aFirst, |
const TContactIdWithMapping & | aSecond | |||
) | [private, static] |
const TContactIdWithMapping & aFirst | |
const TContactIdWithMapping & aSecond |
void | ConstructL | ( | MContactViewObserver & | aObserver, |
TContactItemId | aGroupId | |||
) | [private] |
MContactViewObserver & aObserver | |
TContactItemId aGroupId |
const CViewContact & | ContactAtL | ( | TInt | aIndex | ) | const [virtual] |
Gets the contact item at the specified view index.
TInt aIndex | Index into the view of the required item. |
TContactViewPreferences | ContactViewPreferences | ( | ) | [virtual] |
Gets the underlying view's view preferences.
TInt | FindL | ( | TContactItemId | aId | ) | const [virtual] |
Finds the index into the group view of the specified contact item.
TContactItemId aId | The contact item ID to search for. |
TContactItemId | GetGroupIdbyNameL | ( | const TDesC & | aGroupName | ) | [private] |
const TDesC & aGroupName |
TBool | HandleAddEventForUnfiledContactsL | ( | const TContactViewEvent & | aEvent | ) | [private] |
const TContactViewEvent & aEvent |
TBool | HandleAddEventL | ( | TContactViewEvent & | aEvent | ) | [private] |
TContactViewEvent & aEvent |
void | HandleContactViewEvent | ( | const CContactViewBase & | aView, |
const TContactViewEvent & | aEvent | |||
) | [private] |
const CContactViewBase & aView | |
const TContactViewEvent & aEvent |
TBool | HandleRemoveEventL | ( | TContactViewEvent & | aEvent | ) | [private] |
TContactViewEvent & aEvent |
IMPORT_C CContactGroupView * | NewL | ( | const CContactDatabase & | aDb, |
CContactViewBase & | aView, | |||
MContactViewObserver & | aObserver, | |||
const TContactItemId | aGroupId, | |||
const TGroupType | aGroupType | |||
) | [static] |
Allocates and constructs a CContactGroupView version 1 object, identifying the group by its ID.
A group with the specified ID must exist in the database, otherwise when an attempt is made to update the view, a leave will occur with KErrNotFound. To create an unfiled view, the group id must be KNullContactId and the group type 'EShowContactsNotInAnyGroup'. In this case the group id isn't used and no leave will occur.
When adding contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone. When deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the deleted item
const CContactDatabase & aDb | The database containing the contact group. |
CContactViewBase & aView | The underlying view. |
MContactViewObserver & aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
const TContactItemId aGroupId | The ID of the contact group. |
const TGroupType aGroupType | Controls whether the view displays items belonging to the group, items that do not belong to the group or items that do not belong to any group. |
IMPORT_C CContactGroupView * | NewL | ( | const CContactDatabase & | aDb, |
CContactViewBase & | aView, | |||
MContactViewObserver & | aObserver, | |||
const TDesC & | aGroupName, | |||
const TGroupType | aGroupType | |||
) | [static] |
Allocates and constructs a CContactGroupView version 1 object, identifying the group by its label.
A group with the specified label must exist in the database, otherwise when an attempt is made to update the view, a leave will occur with KErrNotFound.
When adding contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to KErrNone. When deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the deleted item
const CContactDatabase & aDb | The database containing the contact group. |
CContactViewBase & aView | The underlying view. |
MContactViewObserver & aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
const TDesC & aGroupName | The group label. |
const TGroupType aGroupType | Controls whether the view displays items belonging to the group, items that do not belong to the group or items that do not belong to any group. |
IMPORT_C CContactGroupView * | NewL | ( | CContactViewBase & | aView, |
const CContactDatabase & | aDb, | |||
MContactViewObserver & | aObserver, | |||
const TContactItemId | aGroupId, | |||
const TGroupType | aGroupType | |||
) | [static] |
Allocates and constructs a CContactGroupView version 2 object, identifying the group by its ID.
A group with the specified ID must exist in the database, otherwise when an attempt is made to update the view, a leave will occur with KErrNotFound. To create an unfiled view, the group id must be KNullContactId and the group type 'EShowContactsNotInAnyGroup'. In this case the group id isn't used and no leave will occur.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item
CContactViewBase & aView | The underlying view. |
const CContactDatabase & aDb | The database containing the contact group. |
MContactViewObserver & aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
const TContactItemId aGroupId | The ID of the contact group. |
const TGroupType aGroupType | Controls whether the view displays items belonging to the group, items that do not belong to the group or items that do not belong to any group. |
IMPORT_C CContactGroupView * | NewL | ( | CContactViewBase & | aView, |
const CContactDatabase & | aDb, | |||
MContactViewObserver & | aObserver, | |||
const TDesC & | aGroupName, | |||
const TGroupType | aGroupType | |||
) | [static] |
Allocates and constructs a CContactGroupView version 2 object, identifying the group by its label.
A group with the specified label must exist in the database, otherwise when an attempt is made to update the view, a leave will occur with KErrNotFound.
When adding/deleting contacts in the view, MContactViewObserver observer will receive TContactViewEvent events with iInt parameter set to index into the observed view of the added/deleted item
CContactViewBase & aView | The underlying view. |
const CContactDatabase & aDb | The database containing the contact group. |
MContactViewObserver & aObserver | An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. An attempt to use the view before this notification causes a panic. |
const TDesC & aGroupName | The group label. |
const TGroupType aGroupType | Controls whether the view displays items belonging to the group, items that do not belong to the group or items that do not belong to any group. |
void | NotifyRemovedMembersL | ( | const CContactIdArray * | aArray | ) | [private] |
const CContactIdArray * aArray |
const RContactViewSortOrder & | SortOrderL | ( | ) | const [virtual] |
Gets the underlying view's sort order.
void | UpdateForContactListL | ( | const CContactIdArray * | aArray | ) | [private] |
const CContactIdArray * aArray |
IMPORT_C void | UpdateGroupViewL | ( | ) | [protected, virtual] |
Populates the group view.
Removes any existing items from the group view then searches the underlying view. The group view is repopulated with those items, maintaining the order in which they occur in the underlying view.
Defines the types of contact group view.
EShowContactsInGroup |
The view contains contact items in the group. |
EShowContactsNotInGroup |
The view contains contact items not in the group. |
EShowContactsNotInAnyGroup |
The view contains contact items not in any group. |
RArray < TContactIdWithMapping > | iGroupContacts | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.