2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
21 #include "common/HereMaps_global.h"
23 HERE_MAPS_BEGIN_NAMESPACE
28 * This class encapsulates a result item returned by the server in response to a
29 * geocoding or reverse geocoding request.
33 class EXPORT_API Result
37 * This enumeration defines identifiers for match levels -- they reflect how
38 * closely (to what level of detail) the result matches the request.
42 ML_Unknown = -1, ///< Indicates that the match level is unknown.
43 ML_Country = 0, ///< Indicates country match.
44 ML_State, ///< Indicates state match.
45 ML_County, ///< Indicates county match.
46 ML_City, ///< Indicates city match.
47 ML_District, ///< Indicates district match.
48 ML_Street, ///< Indicates street match.
49 ML_Intersection, ///< Indicates intersection match.
50 ML_HouseNumber, ///< Indicates house-number match.
51 ML_PostalCode, ///< Indicates postal code match.
52 ML_Suite, ///< Indicates suite match.
53 ML_Floor ///< Indicates floor match.
57 * This method is the default constructor.
62 * This method is the destructor.
67 * This method sets location details for the given result.
69 * @param rLocation A constant reference to an object containing the
72 void SetLocation(const GeoLocation& rLocation);
75 * This method retrieves the location details from the given result object.
77 * @param rLocation A constant reference to an object containing the
80 const GeoLocation& GetLocation() const;
83 * This method sets the relevance value on the given result.
85 * @param A float indicating the relevance of the given result in the range
86 * [0..1], where 1 indicates maximum relevance.
88 void SetRelevance(float fValue);
91 * This method retrieves a value indicating the relevance of the given result.
93 * @param A float indicating the relevance of the given result; the value is
94 * in the range [0..1], where 1 indicates maximum relevance.
96 float GetRelevance() const;
98 #ifdef TIZEN_CUSTOMIZATION
100 * This method sets a value representing the distance for the given result.
102 * @param fValue A value indicating distance.
104 void SetDistance(float fValue);
107 * This method retrieves a value representing the distance for the given
110 * @return A value indicating distance.
112 float GetDistance() const;
116 * This method sets a value representing the match level for the given
119 * @param aLevel A value indicating match level (see also
120 * <code>Result::MatchLevel</code>).
122 void SetMatchLevel(MatchLevel aLevel);
125 * This method sets a value representing the match level for the given
128 * @param sLevel A constant reference to a string indicating the match level
129 * to set (see also <code>Result::MatchLevel</code>). The value of
130 * the string must be one of "country", "state", "county", "city",
131 * "street", "intersection", "housenumber", "postalcode", "suite",
132 * "floor", "district".
134 void SetMatchLevel(const String& sLevel);
137 * This method retrieves a value representing the match level for the given
140 * @return A value indicating match level (see also
141 * <code>Result::MatchLevel</code>).
143 MatchLevel GetMatchLevel() const;
146 * This method adds a match level indicator and sets the associated match
149 * @param aMatchLevel A value indicating the match level to set (see also
150 * <code>Result::MatchLevel</code>).
152 * @param fQuality A float value indicating the match quality.
154 void AddMatchQuality(MatchLevel aMatchLevel, float fQuality);
157 * This method adds a match level indicator and sets the associated match
160 * @param sLevel A constant reference to a string indicating the match level
161 * to set (see also <code>Result::MatchLevel</code>). The value of
162 * the string must be one of "country", "state", "county", "city",
163 * "street", "intersection", "housenumber", "postalcode", "suite",
164 * "floor", "district".
166 * @param fQuality A float value indicating the match quality.
168 void AddMatchQuality(const String& sLevel, float fQuality);
171 * This method retrieves a value representing match quality of the given
172 * result for the match level specified by the caller.
174 * @param aMatchLevel A value indicating the match level to set (see also
175 * <code>Result::MatchLevel</code>).
177 * @return A float value indicating the match quality.
179 float GetMatchQuality(MatchLevel aMatchLevel) const;
182 * This method retrieves the number of match quality values available for
185 * @return A value indicating the number of match quality values.
187 unsigned int GetNumMatchQualities() const;
190 * This method retrieves a value identifying the match level at the index
191 * specified by the caller.
193 * @param uIdx A value representing the index from which to retrieve the
194 * match level indicator (value). Note that the index must not be
195 * greater than the return value from
196 * <code>Result::GetNumMatchQualities()</code>.
198 * @return A value indicating the match level at the index specified by the
199 * caller (see also <code>Result::MatchLevel</code>).
201 MatchLevel GetMatchQualityLevel(unsigned int uIdx) const;
204 HERE_MAPS_NO_COPY_NO_ASSIGN(Result);
210 HERE_MAPS_END_NAMESPACE