email/pop3andsmtpmtm/clientmtms/inc/MIUTQUE.H
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__E32STD_H__)
       
    17 #include <e32std.h>		// TSwap, TKey
       
    18 #endif
       
    19 
       
    20 
       
    21 //
       
    22 // TQueuedOperationSwap and TQueuedOperationKey : Classes needed for
       
    23 // a QuickSort in ExpungeDeletedOperationsL. They sort folders from lower
       
    24 // to higher ids, and within each folder from high line numbers to low
       
    25 // line numbers. That way the highest numbers get deleted first, maintaining
       
    26 // the validity of the other removals.
       
    27 
       
    28 class TQueuedOperationSwap  : public TSwap
       
    29 	{
       
    30 public:
       
    31 	IMPORT_C TQueuedOperationSwap(CImQueuedList& aList);
       
    32 	void Swap(TInt aLeft,TInt aRight) const;
       
    33 private:	
       
    34 	CImQueuedList& iList;
       
    35 	};
       
    36 
       
    37 class TQueuedOperationKey : public TKey
       
    38 	{
       
    39 public:
       
    40 	IMPORT_C TQueuedOperationKey(CImQueuedList& aList);
       
    41 	TInt Compare(TInt aLeft,TInt aRight) const;
       
    42 	TAny *At(TInt anIndex) const;
       
    43 private:
       
    44 	CImQueuedList& iList;
       
    45 	};