williamr@2: /* williamr@2: * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: TPosLmSortPref class williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef TPOSLMSORTPREF_H williamr@2: #define TPOSLMSORTPREF_H williamr@2: williamr@2: #include williamr@2: #include "EPos_CPosLandmark.h" williamr@2: williamr@2: /** williamr@2: * Class for specifying sort preference. williamr@2: * williamr@2: * A sort pref object can be passed to some listing and searching functions in williamr@2: * the API, to specify a sorting order for the returned landmark list. williamr@2: * williamr@2: * Landmark sorting is not case sensitive. williamr@2: * williamr@2: * @lib eposlandmarks.lib williamr@2: * @since S60 3.0 williamr@2: */ williamr@2: class TPosLmSortPref williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Specifies the sort order. williamr@2: */ williamr@2: enum TSortOrder williamr@2: { williamr@2: EAscending = 0 /**< Ascending sort order */, williamr@2: EDescending /**< Descending sort order */ williamr@2: }; williamr@2: williamr@2: public: // Constructors williamr@2: williamr@2: /** williamr@2: * C++ constructor. williamr@2: * williamr@2: * Only one landmark attribute can be specified here, not a bitmap williamr@2: * of landmark attributes. williamr@2: * williamr@2: * Landmark sorting is not case sensitive. williamr@2: * williamr@2: * @param[in] aLandmarkAttribute The landmark attribute to sort by. williamr@2: * @param[in] aSortOrder Ascending or descending sort order. williamr@2: * williamr@2: * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet williamr@2: * More than one attribute is specified or no attributes at all. williamr@2: */ williamr@2: IMPORT_C TPosLmSortPref( williamr@2: CPosLandmark::TAttributes aLandmarkAttribute, williamr@2: TSortOrder aSortOrder = EAscending williamr@2: ); williamr@2: williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Gets the preferred sort order. williamr@2: * williamr@2: * @return The preferred sort order. williamr@2: */ williamr@2: IMPORT_C TSortOrder SortOrder() const; williamr@2: williamr@2: /** williamr@2: * Gets the landmark attribute to sort by. williamr@2: * williamr@2: * @return The landmark attribute to sort by, or williamr@2: * @p CPosLandmark::ENoAttribute, if sort is not done by landmark williamr@2: * attribute. williamr@2: */ williamr@2: IMPORT_C CPosLandmark::TAttributes LandmarkAttributeToSortBy() const; williamr@2: williamr@2: /** williamr@2: * Sets the landmark attribute to sort by. williamr@2: * williamr@2: * Landmark sorting is not case sensitive. williamr@2: * williamr@2: * @param[in] aLandmarkAttribute The landmark attribute to sort by. williamr@2: * @param[in] aSortOrder The preferred sort order. williamr@2: * williamr@2: * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet williamr@2: * More than one attribute is specified or no attributes at all. williamr@2: */ williamr@2: IMPORT_C void SetSortByLandmarkAttribute( williamr@2: CPosLandmark::TAttributes aLandmarkAttribute, williamr@2: TSortOrder aSortOrder = EAscending williamr@2: ); williamr@2: williamr@2: private: williamr@2: williamr@2: TSortOrder iSortOrder; williamr@2: CPosLandmark::TAttributes iLandmarkAttribute; williamr@2: TUint8 iUnusedData[16]; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // TPOSLMSORTPREF_H williamr@2: williamr@2: