epoc32/include/mw/epos_cposlmareacriteria.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/epos_cposlmareacriteria.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/epos_cposlmareacriteria.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,160 @@
     1.4 -epos_cposlmareacriteria.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:  CPosLmAreaCriteria class
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef CPOSLMAREACRITERIA_H
    1.24 +#define CPOSLMAREACRITERIA_H
    1.25 +
    1.26 +#include <e32base.h>
    1.27 +#include "EPos_CPosLmSearchCriteria.h"
    1.28 +
    1.29 +/**
    1.30 +*  Criterion for searching for landmarks which reside in a certain area.
    1.31 +*
    1.32 +*  The search area is defined by providing two latitude and two longitude
    1.33 +*  values which specify the borders of the area. Note that this search
    1.34 +*  does not consider landmark coverage radius, see
    1.35 +*  @p CPosLandmark::GetCoverageRadius.
    1.36 +*
    1.37 +*  The search area is defined as a spherical rectangle, limited by two
    1.38 +*  longitude borders (WestLongitude and EastLongitude) and two latitude
    1.39 +*  borders (SouthLatitude and NorthLatitude).
    1.40 +*
    1.41 +*  It is required that -90 =< SouthLatitude =< NorthLatitude =< 90.
    1.42 +*  WestLongitude must be in the interval [-180, 180), i.e. not including +180.
    1.43 +*  EastLongitude must be in the interval [-180, 180], i.e. including +180.
    1.44 +*  It is allowed that EastLongitude < WestLongitude. This defines an area
    1.45 +*  which crosses the 180 meridian. The area definition is inclusive, i.e.
    1.46 +*  landmarks which lie on the border of the area will be considered as matches.
    1.47 +*  If WestLongitude = EastLongitude and NorthLatitude = SouthLatitude then
    1.48 +*  only landmarks which match the longitude and latitude respectively, are
    1.49 +*  considered to be matches. If WestLongitude = -180 and EastLongitude = +180,
    1.50 +*  all longitudes are included in the search.
    1.51 +*
    1.52 +*  This criterion is only valid when searching for landmarks, i.e. if it
    1.53 +*  is passed to @p CPosLandmarkSearch::StartCategorySearchL, the function
    1.54 +*  will fail with error code @p KErrArgument.
    1.55 +*
    1.56 +*  @lib eposlmsearchlib.lib
    1.57 +*  @since S60 3.0
    1.58 +*/
    1.59 +class CPosLmAreaCriteria : public CPosLmSearchCriteria
    1.60 +    {
    1.61 +    public:
    1.62 +
    1.63 +        /**
    1.64 +        * Two-phased constructor.
    1.65 +        *
    1.66 +        * The input parameters specify the area to search as described
    1.67 +        * in the class description.
    1.68 +        *
    1.69 +        * If one of the parameters is out of range, this function fails with
    1.70 +        * error code @p KErrArgument. The correct ranges are:
    1.71 +        *   -# -90 =< aSouthLatitude =< aNorthLatitude =< 90
    1.72 +        *   -# -180 <= aWestLongitude < 180
    1.73 +        *   -# -180 <= aEastLongitude <= 180
    1.74 +        *
    1.75 +        * @param[in] aSouthLatitude The southern latitude border of the search area.
    1.76 +        * @param[in] aNorthLatitude The northern latitude border of the search area.
    1.77 +        * @param[in] aWestLongitude The western longitude border of the search area.
    1.78 +        * @param[in] aEastLongitude The eastern longitude border of the search area.
    1.79 +        * @returns A new instance of this class.
    1.80 +        */
    1.81 +        IMPORT_C static CPosLmAreaCriteria* NewLC(
    1.82 +            const TReal64& aSouthLatitude,
    1.83 +            const TReal64& aNorthLatitude,
    1.84 +            const TReal64& aWestLongitude,
    1.85 +            const TReal64& aEastLongitude
    1.86 +        );
    1.87 +
    1.88 +        /**
    1.89 +        * Destructor.
    1.90 +        */
    1.91 +        virtual ~CPosLmAreaCriteria();
    1.92 +
    1.93 +    public:
    1.94 +
    1.95 +        /**
    1.96 +        * Returns the search area.
    1.97 +        *
    1.98 +        * @param[out] aSouthLatitude The southern latitude border of the search area.
    1.99 +        * @param[out] aNorthLatitude The northern latitude border of the search area.
   1.100 +        * @param[out] aWestLongitude The western longitude border of the search area.
   1.101 +        * @param[out] aEastLongitude The eastern longitude border of the search area.
   1.102 +        */
   1.103 +        IMPORT_C void GetSearchArea(
   1.104 +            TReal64& aSouthLatitude,
   1.105 +            TReal64& aNorthLatitude,
   1.106 +            TReal64& aWestLongitude,
   1.107 +            TReal64& aEastLongitude
   1.108 +        ) const;
   1.109 +
   1.110 +        /**
   1.111 +        * Define the search area.
   1.112 +        *
   1.113 +        * The input parameters specify the area to search as described in the
   1.114 +        * class description.
   1.115 +        *
   1.116 +        * If one of the parameters is out of range, this function fails with
   1.117 +        * error code @p KErrArgument. The correct ranges are:
   1.118 +        *   -# -90 =< aSouthLatitude =< aNorthLatitude =< 90
   1.119 +        *   -# -180 <= aWestLongitude < 180
   1.120 +        *   -# -180 <= aEastLongitude <= 180
   1.121 +        *
   1.122 +        * @param[in] aSouthLatitude The southern latitude border of the search area.
   1.123 +        * @param[in] aNorthLatitude The northern latitude border of the search area.
   1.124 +        * @param[in] aWestLongitude The western longitude border of the search area.
   1.125 +        * @param[in] aEastLongitude The eastern longitude border of the search area.
   1.126 +        * @returns @p KErrNone if successful, @p KErrArgument if the input
   1.127 +        *   parameters are invalid, otherwise a system wide error code.
   1.128 +        */
   1.129 +        IMPORT_C TInt SetSearchArea(
   1.130 +            const TReal64& aSouthLatitude,
   1.131 +            const TReal64& aNorthLatitude,
   1.132 +            const TReal64& aWestLongitude,
   1.133 +            const TReal64& aEastLongitude
   1.134 +        );
   1.135 +
   1.136 +    private:
   1.137 +
   1.138 +        // C++ constructor
   1.139 +        CPosLmAreaCriteria();
   1.140 +
   1.141 +        void ConstructL(
   1.142 +            const TReal64&  aSouthLatitude,
   1.143 +            const TReal64&  aNorthLatitude,
   1.144 +            const TReal64&  aWestLongitude,
   1.145 +            const TReal64&  aEastLongitude
   1.146 +        );
   1.147 +
   1.148 +        // Prohibit copy constructor
   1.149 +        CPosLmAreaCriteria( const CPosLmAreaCriteria& );
   1.150 +        // Prohibit assigment operator
   1.151 +        CPosLmAreaCriteria& operator= ( const CPosLmAreaCriteria& );
   1.152 +
   1.153 +    private:
   1.154 +
   1.155 +        TReal64 iSouthLatitude;
   1.156 +        TReal64 iNorthLatitude;
   1.157 +        TReal64 iWestLongitude;
   1.158 +        TReal64 iEastLongitude;
   1.159 +
   1.160 +    };
   1.161 +
   1.162 +#endif      // CPOSLMAREACRITERIA_H
   1.163 +
   1.164 +