1.1 --- a/epoc32/include/mw/epos_tposlmsortpref.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/epos_tposlmsortpref.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,114 @@
1.4 -epos_tposlmsortpref.h
1.5 +/*
1.6 +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: TPosLmSortPref class
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef TPOSLMSORTPREF_H
1.24 +#define TPOSLMSORTPREF_H
1.25 +
1.26 +#include <e32base.h>
1.27 +#include "EPos_CPosLandmark.h"
1.28 +
1.29 +/**
1.30 +* Class for specifying sort preference.
1.31 +*
1.32 +* A sort pref object can be passed to some listing and searching functions in
1.33 +* the API, to specify a sorting order for the returned landmark list.
1.34 +*
1.35 +* Landmark sorting is not case sensitive.
1.36 +*
1.37 +* @lib eposlandmarks.lib
1.38 +* @since S60 3.0
1.39 +*/
1.40 +class TPosLmSortPref
1.41 + {
1.42 + public:
1.43 +
1.44 + /**
1.45 + * Specifies the sort order.
1.46 + */
1.47 + enum TSortOrder
1.48 + {
1.49 + EAscending = 0 /**< Ascending sort order */,
1.50 + EDescending /**< Descending sort order */
1.51 + };
1.52 +
1.53 + public: // Constructors
1.54 +
1.55 + /**
1.56 + * C++ constructor.
1.57 + *
1.58 + * Only one landmark attribute can be specified here, not a bitmap
1.59 + * of landmark attributes.
1.60 + *
1.61 + * Landmark sorting is not case sensitive.
1.62 + *
1.63 + * @param[in] aLandmarkAttribute The landmark attribute to sort by.
1.64 + * @param[in] aSortOrder Ascending or descending sort order.
1.65 + *
1.66 + * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet
1.67 + * More than one attribute is specified or no attributes at all.
1.68 + */
1.69 + IMPORT_C TPosLmSortPref(
1.70 + CPosLandmark::TAttributes aLandmarkAttribute,
1.71 + TSortOrder aSortOrder = EAscending
1.72 + );
1.73 +
1.74 + public:
1.75 +
1.76 + /**
1.77 + * Gets the preferred sort order.
1.78 + *
1.79 + * @return The preferred sort order.
1.80 + */
1.81 + IMPORT_C TSortOrder SortOrder() const;
1.82 +
1.83 + /**
1.84 + * Gets the landmark attribute to sort by.
1.85 + *
1.86 + * @return The landmark attribute to sort by, or
1.87 + * @p CPosLandmark::ENoAttribute, if sort is not done by landmark
1.88 + * attribute.
1.89 + */
1.90 + IMPORT_C CPosLandmark::TAttributes LandmarkAttributeToSortBy() const;
1.91 +
1.92 + /**
1.93 + * Sets the landmark attribute to sort by.
1.94 + *
1.95 + * Landmark sorting is not case sensitive.
1.96 + *
1.97 + * @param[in] aLandmarkAttribute The landmark attribute to sort by.
1.98 + * @param[in] aSortOrder The preferred sort order.
1.99 + *
1.100 + * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet
1.101 + * More than one attribute is specified or no attributes at all.
1.102 + */
1.103 + IMPORT_C void SetSortByLandmarkAttribute(
1.104 + CPosLandmark::TAttributes aLandmarkAttribute,
1.105 + TSortOrder aSortOrder = EAscending
1.106 + );
1.107 +
1.108 + private:
1.109 +
1.110 + TSortOrder iSortOrder;
1.111 + CPosLandmark::TAttributes iLandmarkAttribute;
1.112 + TUint8 iUnusedData[16];
1.113 +
1.114 + };
1.115 +
1.116 +#endif // TPOSLMSORTPREF_H
1.117 +
1.118 +