CViewContactSortPlugin Class Reference

#include <app/cntviewsortplugin.h>

class CViewContactSortPlugin : public CBase, public CBase, public CBase, public CBase

Inherits from

Detailed Description

An interface class that enables implementers to configure the way in which contacts are sorted in a contact view.

This is an abstract base class that will be derived from.

Member Enumeration Documentation

Enum TSortStartTypes

Identifies the type of sort operation to SortStart().

EnumeratorValueDescription
ESortNull0

No sort is in progress.

ESortStartFull

A full sort or re-sort.

ESortStartInsertOne

A single contact has been inserted or changed.

ESortStartInsertMultiple

Multiple contacts have been added. For example, ICC contacts arrived in a mixed view (one that also includes contacts from the phone's memory).

Constructor & Destructor Documentation

~CViewContactSortPlugin ( )

~CViewContactSortPlugin()[inline, virtual]

Member Function Documentation

NewL ( TSortPluginParams * )

CViewContactSortPlugin *NewL(TSortPluginParams *aParams)[static]

SetSortOrderL ( const RContactViewSortOrder & )

voidSetSortOrderL(const RContactViewSortOrder &aViewSortOrder)[pure virtual]

Called by a contact view to pass the sort plug-in the required sort order. Any processing of the order information is done here.

This function is called when the view is created and when a different sort order is requested.

Parameters
aViewSortOrderThe requested sort order.

SortCompareViewContactsL ( const CViewContact &, const CViewContact & )

TInt SortCompareViewContactsL(const CViewContact &aLhs,
const CViewContact &aRhs
)[pure virtual]

Called by a contact view to compare two CViewContact items for sorting in the view.

If TDesC::CompareC() is used to implement this function, the return value from TDesC::CompareC() can be used directly.

Parameters
aLhsThe first item to compare.
aRhsThe second item to compare.
Return Value
Zero means that aLhs and aRhs have an equal sorting order. An arbitrary negative value means that aLhs is to be sorted before aRhs. An arbitrary positive value means that aRhs is to be sorted before aLhs.

SortCompleted ( )

voidSortCompleted()[pure virtual]

Called by a contact view to notify the sort plug-in that sorting is complete.

SortStart ( TSortStartTypes, TInt )

TInt SortStart(TSortStartTypesaSortStartType,
TIntaCount
)[pure virtual]

Called by a contact view to notify the sort plug-in that sorting is about to start.

Parameters
aSortStartTypeIndicates the type of sort operation required.
aCountThe approximate number of contacts to be processed.
Return Value
KErrNone if successful, otherwise another of the system-wide error codes.

ViewContactIsSortable ( const CViewContact & )

TBool ViewContactIsSortable(const CViewContact &aViewContact)[pure virtual]

Tests whether a CViewContact is sortable.

For instance, a contact may be unsortable if none of the fields used to sort on contain any data.

Parameters
aViewContactThe view contact to test.
Return Value
ETrue if the view contact is sortable, EFalse if not.