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.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  TPosLmSortPref class
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef TPOSLMSORTPREF_H
williamr@2
    20
#define TPOSLMSORTPREF_H
williamr@2
    21
williamr@2
    22
#include <e32base.h>
williamr@2
    23
#include "EPos_CPosLandmark.h"
williamr@2
    24
williamr@2
    25
/**
williamr@2
    26
*  Class for specifying sort preference.
williamr@2
    27
*
williamr@2
    28
*  A sort pref object can be passed to some listing and searching functions in
williamr@2
    29
*  the API, to specify a sorting order for the returned landmark list.
williamr@2
    30
*
williamr@2
    31
*  Landmark sorting is not case sensitive.
williamr@2
    32
*
williamr@2
    33
*  @lib eposlandmarks.lib
williamr@2
    34
*  @since S60 3.0
williamr@2
    35
*/
williamr@2
    36
class TPosLmSortPref
williamr@2
    37
    {
williamr@2
    38
    public:
williamr@2
    39
williamr@2
    40
        /**
williamr@2
    41
        *  Specifies the sort order.
williamr@2
    42
        */
williamr@2
    43
        enum TSortOrder
williamr@2
    44
            {
williamr@2
    45
            EAscending = 0  /**< Ascending sort order */,
williamr@2
    46
            EDescending     /**< Descending sort order */
williamr@2
    47
            };
williamr@2
    48
williamr@2
    49
    public:  // Constructors
williamr@2
    50
williamr@2
    51
        /**
williamr@2
    52
        * C++ constructor.
williamr@2
    53
        *
williamr@2
    54
        * Only one landmark attribute can be specified here, not a bitmap
williamr@2
    55
        * of landmark attributes.
williamr@2
    56
        *
williamr@2
    57
        * Landmark sorting is not case sensitive.
williamr@2
    58
        *
williamr@2
    59
        * @param[in] aLandmarkAttribute The landmark attribute to sort by.
williamr@2
    60
        * @param[in] aSortOrder Ascending or descending sort order.
williamr@2
    61
        *
williamr@2
    62
        * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet 
williamr@2
    63
        *   More than one attribute is specified or no attributes at all.
williamr@2
    64
        */
williamr@2
    65
        IMPORT_C TPosLmSortPref(
williamr@2
    66
            CPosLandmark::TAttributes aLandmarkAttribute,
williamr@2
    67
            TSortOrder aSortOrder = EAscending
williamr@2
    68
        );
williamr@2
    69
williamr@2
    70
    public:
williamr@2
    71
williamr@2
    72
        /**
williamr@2
    73
        * Gets the preferred sort order.
williamr@2
    74
        *
williamr@2
    75
        * @return The preferred sort order.
williamr@2
    76
        */
williamr@2
    77
        IMPORT_C TSortOrder SortOrder() const;
williamr@2
    78
williamr@2
    79
        /**
williamr@2
    80
        * Gets the landmark attribute to sort by.
williamr@2
    81
        *
williamr@2
    82
        * @return The landmark attribute to sort by, or
williamr@2
    83
        *   @p CPosLandmark::ENoAttribute, if sort is not done by landmark
williamr@2
    84
        *   attribute.
williamr@2
    85
        */
williamr@2
    86
        IMPORT_C CPosLandmark::TAttributes LandmarkAttributeToSortBy() const;
williamr@2
    87
williamr@2
    88
        /**
williamr@2
    89
        * Sets the landmark attribute to sort by.
williamr@2
    90
        *
williamr@2
    91
        * Landmark sorting is not case sensitive.
williamr@2
    92
        *
williamr@2
    93
        * @param[in] aLandmarkAttribute The landmark attribute to sort by.
williamr@2
    94
        * @param[in] aSortOrder The preferred sort order.
williamr@2
    95
        *
williamr@2
    96
        * @panic "Landmarks Client"-EPosNoneOrMultipleLandmarkAttributeSet 
williamr@2
    97
        *   More than one attribute is specified or no attributes at all.
williamr@2
    98
        */
williamr@2
    99
        IMPORT_C void SetSortByLandmarkAttribute(
williamr@2
   100
            CPosLandmark::TAttributes aLandmarkAttribute,
williamr@2
   101
            TSortOrder aSortOrder = EAscending
williamr@2
   102
        );
williamr@2
   103
williamr@2
   104
    private:
williamr@2
   105
williamr@2
   106
        TSortOrder iSortOrder;
williamr@2
   107
        CPosLandmark::TAttributes iLandmarkAttribute;
williamr@2
   108
        TUint8 iUnusedData[16];
williamr@2
   109
williamr@2
   110
    };
williamr@2
   111
williamr@2
   112
#endif      // TPOSLMSORTPREF_H
williamr@2
   113
williamr@2
   114