CContactDatabase::TSortPref Class Reference

class CContactDatabase::TSortPref

Specifies the field type and order preferences used for sorting items in the contacts database.

The contents of the first field in a contact item matching the field type is used as the data to sort on. The order can either be ascending or descending.

CContactDatabase::SortL() CContactDatabase::SortArrayL()

Public Member Functions
TSortPref ()
TSortPref ( TFieldType , TOrder )
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void InternalizeL ( RReadStream &)
Public Member Enumerations
enum TOrder { EAsc , EDesc }
Public Attributes
TFieldType iFieldType
TOrder iOrder

Constructor & Destructor Documentation

TSortPref()

TSortPref ( ) [inline]

Constructs a TSortPref object. The order is initialised to EAsc and the field type to KNullUid.

TSortPref(TFieldType, TOrder)

TSortPref ( TFieldType aFieldType,
TOrder aOrder = EAsc
) [inline]

Constructs the TSortPref object with a field type and an order.

Parameters

TFieldType aFieldType Specifies the field type to sort on.
TOrder aOrder = EAsc Specifies the sort order.

Member Functions Documentation

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Store this TSortPref object in the given stream.

Parameters

RWriteStream & aStream Stream to write TSortPref object state to.

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Initialise this TSortPref object from the given stream.

Parameters

RReadStream & aStream Stream to read TSortPref object state from.

Member Enumerations Documentation

Enum TOrder

The sort order.

Enumerators

EAsc

Ascending sort order.

EDesc

Descending sort order.

Member Data Documentation

TFieldType iFieldType

TFieldType iFieldType

The first field matching this field type is used for the text to sort on.

TOrder iOrder

TOrder iOrder

Specifies whether the sort should be ascending or descending.