2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Interface for implementing custom ordering for tree list.
19 #ifndef M_AKNCUSTOMTREEORDERING_H
20 #define M_AKNCUSTOMTREEORDERING_H
23 #include <akntreelistconstants.h>
27 * Interface class for implementing custom ordering for hierarchical list.
29 * Implementation of this interface class can be set to hierarchical
30 * list to define the ordering of items in the list. Hierarchical list
31 * then uses the implementation of @c MAknCustomTreeOrdering::Compare
32 * method in sorting the items within each node of the list.
36 class MAknCustomTreeOrdering
42 * Compares two tree list items.
44 * @param aFirst Item ID of the first compared hierarchical list item.
46 * @param aSecond Item ID of the second compared hierarchical list item.
48 * @return Positive, if the first item is greater than the second item;
49 * negative, if the first item is less than the second item;
50 * and zero, if the items are equal.
52 virtual TInt Compare( TAknTreeItemID aFirst, TAknTreeItemID aSecond ) = 0;
57 #endif // M_AKNCUSTOMTREEORDERING_H