TMsvSelectionOrdering Class Reference

#include <mw/msvstd.h>

Link against: msgs_autoshutdown.lib

class TMsvSelectionOrdering

Detailed Description

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.

See also: 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
aGroupingKeyA bitmask of grouping options. For the values to use, see TMsvGrouping.
aSortingSorting order.
aShowInvisibleDetermines whether invisible entries are included in the selection

Member Function Documentation

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Writes the object into the specified stream.

Parameters
aStreamStream to which to write

GroupByMtm ( )

TBool GroupByMtm()const [inline]

Gets the group-by-MTM flag.

Return Value
Group-by-MTM flag

GroupByPriority ( )

TBool GroupByPriority()const [inline]

Gets the group-by-priority flag.

Return Value
Group-by-priority flag

GroupByType ( )

TBool GroupByType()const [inline]

Gets the group-by-entry-type flag.

Return Value
Group-by-entry-type flag

GroupStandardFolders ( )

TBool GroupStandardFolders()const [inline]

Gets the group-by-standard-folders flag.

Return Value
Group-by-standard-folders flag

GroupingOn ( )

TBool GroupingOn()const [inline]

Tests whether any grouping option has been set.

Return Value
ETrue if one or more grouping options have been set, else EFalse

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)

Reads an externalised object from the specified stream.

Parameters
aStreamStream from which to read

SetGroupByMtm ( TBool )

voidSetGroupByMtm(TBoolaFlag)[inline]

SetGroupByPriority ( TBool )

voidSetGroupByPriority(TBoolaFlag)[inline]

SetGroupByType ( TBool )

voidSetGroupByType(TBoolaFlag)[inline]

SetGroupStandardFolders ( TBool )

voidSetGroupStandardFolders(TBoolaFlag)[inline]

SetShowInvisibleEntries ( TBool )

voidSetShowInvisibleEntries(TBoolaFlag)[inline]

SetSorting ( TMsvSorting )

voidSetSorting(TMsvSortingaSortType)[inline]

SetSubjectSkipString ( const TDesC & )

IMPORT_C voidSetSubjectSkipString(const TDesC &aSubjectSkipString)

Set the subject skip string up to maximum length of KMaxSubjectSkipStringLength

Panic Codes
USER11, if the length of the descriptor aSubjectSkipString is greater than KMaxSubjectSkipStringLength (defined in <msvstd.h>)

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.

Return Value
Show-invisible-entries flag

Sorting ( )

TMsvSorting Sorting()const [inline]

Gets the sorting order of entries within groups.

Return Value
Sorting order.

SubjectSkipString ( )

IMPORT_C const TDesC &SubjectSkipString()const

Get the current subject skip string

Return Value
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
aOrderingThe object with which to compare
Return Value
ETrue if the objects are equal, else EFalse