diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/msvarray.h --- a/epoc32/include/msvarray.h Wed Mar 31 12:27:01 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MSVARRAY_H__) -#define __MSVARRAY_H__ - -#if !defined(__MSVSTD_H__) -#include -#endif - -//************************* -// class TKeyArrayFixPtr -//************************* - -class TKeyArrayFixPtr : public TKeyArrayFix -// -// Generic Key class for sorting arrays of pointers in flat arrays. -// -/** -@internalComponent -@released -*/ - { -public: - inline TKeyArrayFixPtr(TInt anOffset,TKeyCmpText aType); - inline TKeyArrayFixPtr(TInt anOffset,TKeyCmpText aType,TInt aLength); - inline TKeyArrayFixPtr(TInt anOffset,TKeyCmpNumeric aType); - // At returns dereferenced pointer to objects (but not index) - IMPORT_C TAny* At(TInt anIndex) const; - }; - - -//********************************** -// CMsvEntryArray -//********************************** -// -// The array of TMsvEntry pointers -// - -class CMsvEntryArray : public CArrayPtrFlat -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C static CMsvEntryArray* NewL(const CArrayFix& iMtmList); - IMPORT_C static CMsvEntryArray* NewLC(const CArrayFix& iMtmList); - IMPORT_C void SortL(TMsvSelectionOrdering aOrdering); - IMPORT_C ~CMsvEntryArray(); -private: - enum TGroupCriterion - { - EGroupByStandardFolders, - EGroupByType, - EGroupByPriority, - EGroupByMtm, - EStopGrouping - }; -private: - TInt NumberOfArraysToSplitIntoL(TGroupCriterion aGroupCriterion); - TBool OkToGroup(TGroupCriterion aGroupCriterion,TMsvSelectionOrdering aOrdering) const; - TInt ArrayId(const TMsvEntry* aEntry,TGroupCriterion aGroupCriterion) const; - void GroupL(TGroupCriterion aGroupCriterion,TMsvSelectionOrdering aOrdering,TBool aDoSort); - void ReverseOrder(TMsvSorting aSortType); - void ReverseOrder(); - CMsvEntryArray(const CArrayFix& iMtmList); - TKeyArrayFixPtr MessageSortKey(TMsvSorting aSortType) const; - - TInt FindSubjectStart(const TDesC& aSubject, const TDesC& aSubjectSkipString) const; - void SubjectBasedSortL(TBool aReverse, const TDesC& aSubjectSkipString); - void DetailBasedSortL(); - -private: - const CArrayFix& iOrigMtmList; - CArrayFix* iActualMtmList; - }; - -// inline - -inline TKeyArrayFixPtr::TKeyArrayFixPtr(TInt anOffset,TKeyCmpText aType) - : TKeyArrayFix(anOffset,aType) - {} - -inline TKeyArrayFixPtr::TKeyArrayFixPtr(TInt anOffset,TKeyCmpText aType,TInt aLength) - : TKeyArrayFix(anOffset,aType,aLength) - {} - -inline TKeyArrayFixPtr::TKeyArrayFixPtr(TInt anOffset,TKeyCmpNumeric aType) - : TKeyArrayFix(anOffset,aType) - {} - - -#endif