epoc32/include/mw/epos_tposlmsortpref.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  TPosLmSortPref class
    15 *
    16 */
    17 
    18 
    19 #ifndef TPOSLMSORTPREF_H
    20 #define TPOSLMSORTPREF_H
    21 
    22 #include <e32base.h>
    23 #include "EPos_CPosLandmark.h"
    24 
    25 /**
    26 *  Class for specifying sort preference.
    27 *
    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.
    30 *
    31 *  Landmark sorting is not case sensitive.
    32 *
    33 *  @lib eposlandmarks.lib
    34 *  @since S60 3.0
    35 */
    36 class TPosLmSortPref
    37     {
    38     public:
    39 
    40         /**
    41         *  Specifies the sort order.
    42         */
    43         enum TSortOrder
    44             {
    45             EAscending = 0  /**< Ascending sort order */,
    46             EDescending     /**< Descending sort order */
    47             };
    48 
    49     public:  // Constructors
    50 
    51         /**
    52         * C++ constructor.
    53         *
    54         * Only one landmark attribute can be specified here, not a bitmap
    55         * of landmark attributes.
    56         *
    57         * Landmark sorting is not case sensitive.
    58         *
    59         * @param[in] aLandmarkAttribute The landmark attribute to sort by.
    60         * @param[in] aSortOrder Ascending or descending sort order.
    61         *
    62         * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet 
    63         *   More than one attribute is specified or no attributes at all.
    64         */
    65         IMPORT_C TPosLmSortPref(
    66             CPosLandmark::TAttributes aLandmarkAttribute,
    67             TSortOrder aSortOrder = EAscending
    68         );
    69 
    70     public:
    71 
    72         /**
    73         * Gets the preferred sort order.
    74         *
    75         * @return The preferred sort order.
    76         */
    77         IMPORT_C TSortOrder SortOrder() const;
    78 
    79         /**
    80         * Gets the landmark attribute to sort by.
    81         *
    82         * @return The landmark attribute to sort by, or
    83         *   @p CPosLandmark::ENoAttribute, if sort is not done by landmark
    84         *   attribute.
    85         */
    86         IMPORT_C CPosLandmark::TAttributes LandmarkAttributeToSortBy() const;
    87 
    88         /**
    89         * Sets the landmark attribute to sort by.
    90         *
    91         * Landmark sorting is not case sensitive.
    92         *
    93         * @param[in] aLandmarkAttribute The landmark attribute to sort by.
    94         * @param[in] aSortOrder The preferred sort order.
    95         *
    96         * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet 
    97         *   More than one attribute is specified or no attributes at all.
    98         */
    99         IMPORT_C void SetSortByLandmarkAttribute(
   100             CPosLandmark::TAttributes aLandmarkAttribute,
   101             TSortOrder aSortOrder = EAscending
   102         );
   103 
   104     private:
   105 
   106         TSortOrder iSortOrder;
   107         CPosLandmark::TAttributes iLandmarkAttribute;
   108         TUint8 iUnusedData[16];
   109 
   110     };
   111 
   112 #endif      // TPOSLMSORTPREF_H
   113 
   114