2 * Copyright (c) 2005-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: TPosLmSortPref class
19 #ifndef TPOSLMSORTPREF_H
20 #define TPOSLMSORTPREF_H
23 #include "EPos_CPosLandmark.h"
26 * Class for specifying sort preference.
28 * A sort pref object can be passed to some listing and searching functions in
29 * the API, to specify a sorting order for the returned landmark list.
31 * Landmark sorting is not case sensitive.
33 * @lib eposlandmarks.lib
41 * Specifies the sort order.
45 EAscending = 0 /**< Ascending sort order */,
46 EDescending /**< Descending sort order */
49 public: // Constructors
54 * Only one landmark attribute can be specified here, not a bitmap
55 * of landmark attributes.
57 * Landmark sorting is not case sensitive.
59 * @param[in] aLandmarkAttribute The landmark attribute to sort by.
60 * @param[in] aSortOrder Ascending or descending sort order.
62 * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet
63 * More than one attribute is specified or no attributes at all.
65 IMPORT_C TPosLmSortPref(
66 CPosLandmark::TAttributes aLandmarkAttribute,
67 TSortOrder aSortOrder = EAscending
73 * Gets the preferred sort order.
75 * @return The preferred sort order.
77 IMPORT_C TSortOrder SortOrder() const;
80 * Gets the landmark attribute to sort by.
82 * @return The landmark attribute to sort by, or
83 * @p CPosLandmark::ENoAttribute, if sort is not done by landmark
86 IMPORT_C CPosLandmark::TAttributes LandmarkAttributeToSortBy() const;
89 * Sets the landmark attribute to sort by.
91 * Landmark sorting is not case sensitive.
93 * @param[in] aLandmarkAttribute The landmark attribute to sort by.
94 * @param[in] aSortOrder The preferred sort order.
96 * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet
97 * More than one attribute is specified or no attributes at all.
99 IMPORT_C void SetSortByLandmarkAttribute(
100 CPosLandmark::TAttributes aLandmarkAttribute,
101 TSortOrder aSortOrder = EAscending
106 TSortOrder iSortOrder;
107 CPosLandmark::TAttributes iLandmarkAttribute;
108 TUint8 iUnusedData[16];
112 #endif // TPOSLMSORTPREF_H