TMsvSelectionOrdering Class Reference

class TMsvSelectionOrdering

Defines the sorting and grouping rules used to prepare a selection of entries.

It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering of an entry's children.

Firstly, the entries will be grouped, if the appropriate grouping option is set, by:

1. Standard folders: any entries marked as standard folders are placed first, in the order they were created.

2. Entry type: in the order services, folders, messages, attachments, unknown

3. Priority: in the order high, medium, then low

4. MTM: either in the MTM order set by CMsvEntry::SetMtmListL() or just in MTM Uid value

Grouping options are simply Boolean flags that can be set on or off by functions of this class.

Secondly, the order of entries within these groups is defined by a sorting order option.

CMsvEntry CMsvServerEntry

Constructor & Destructor Documentation

TMsvSelectionOrdering()

IMPORT_CTMsvSelectionOrdering()

Default constructor.

Creates a new object with no grouping, and sets the sorting to EMsvSortByNone.

TMsvSelectionOrdering(TInt, TMsvSorting, TBool)

IMPORT_CTMsvSelectionOrdering(TIntaGroupingKey,
TMsvSortingaSorting,
TBoolaShowInvisible = EFalse
)

Creates a new object, sets the group, sort order, and show-invisibility options to those specified in the parameters.

Parameters

TInt aGroupingKeyA bitmask of grouping options. For the values to use, see TMsvGrouping.
TMsvSorting aSortingSorting order.
TBool aShowInvisible = EFalseDetermines whether invisible entries are included in the selection

Member Functions Documentation

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Writes the object into the specified stream.

Parameters

RWriteStream & aStreamStream to which to write

GroupByMtm()

TBool GroupByMtm()const [inline]

Gets the group-by-MTM flag.

GroupByPriority()

TBool GroupByPriority()const [inline]

Gets the group-by-priority flag.

GroupByType()

TBool GroupByType()const [inline]

Gets the group-by-entry-type flag.

GroupStandardFolders()

TBool GroupStandardFolders()const [inline]

Gets the group-by-standard-folders flag.

GroupingOn()

TBool GroupingOn()const [inline]

Tests whether any grouping option has been set.

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Reads an externalised object from the specified stream.

Parameters

RReadStream & aStreamStream from which to read

SetGroupByMtm(TBool)

voidSetGroupByMtm(TBoolaFlag)[inline]

Parameters

TBool aFlag

SetGroupByPriority(TBool)

voidSetGroupByPriority(TBoolaFlag)[inline]

Parameters

TBool aFlag

SetGroupByType(TBool)

voidSetGroupByType(TBoolaFlag)[inline]

Parameters

TBool aFlag

SetGroupStandardFolders(TBool)

voidSetGroupStandardFolders(TBoolaFlag)[inline]

Parameters

TBool aFlag

SetShowInvisibleEntries(TBool)

voidSetShowInvisibleEntries(TBoolaFlag)[inline]

Parameters

TBool aFlag

SetSorting(TMsvSorting)

voidSetSorting(TMsvSortingaSortType)[inline]

Parameters

TMsvSorting aSortType

SetSubjectSkipString(const TDesC &)

IMPORT_C voidSetSubjectSkipString(const TDesC &aSubjectSkipString)

Set the subject skip string up to maximum length of KMaxSubjectSkipStringLength

panic
USER 11, if the length of the descriptor aSubjectSkipString is greater than KMaxSubjectSkipStringLength (defined in <msvstd.h>)

Parameters

const TDesC & aSubjectSkipString

ShowInvisibleEntries()

TBool ShowInvisibleEntries()const [inline]

Gets the show-invisible-entries flag. Entries whose entry visible flag index field is not set are included in the ordered list only if this is set.

Sorting()

TMsvSorting Sorting()const [inline]

Gets the sorting order of entries within groups.

SubjectSkipString()

IMPORT_C const TDesC &SubjectSkipString()const

Get the current subject skip string

operator==(const TMsvSelectionOrdering &)

IMPORT_C TBooloperator==(const TMsvSelectionOrdering &aOrdering)const

Tests two TMsvSelectionOrdering objects for equality.

Two TMsvSelectionOrdering objects are equal if the same grouping and sorting options have been set on each.

Parameters

const TMsvSelectionOrdering & aOrderingThe object with which to compare

Member Enumerations Documentation

Enum TMsvGroupingPrivate

Enumerators

KMsvInvisibleFlag = 0x1
KMsvStandardFolders = 0x4
KMsvAllGroupingFlags = 0x1e

Member Data Documentation

TInt iGrouping

TInt iGrouping[private]

TMsvSorting iSortType

TMsvSorting iSortType[private]

TBuf< KMaxSubjectSkipStringLength > iSubjectSkipString

TBuf< KMaxSubjectSkipStringLength >iSubjectSkipString[private]