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.
22 #include "common/HereMaps_global.h"
23 #ifndef TIZEN_MIGRATION
27 HERE_MAPS_BEGIN_NAMESPACE
36 * This typedef defines a vector of place items as a type.
40 typedef std::vector< PlaceItem > PlaceItemList;
43 * This class encapsulates information about a place that has been returned as
44 * part of a reply to a search query (an item in a search result). This
45 * information can be used to obtain place details.
49 class EXPORT_API PlaceItem
54 * This method is the default constructor.
59 * This method is the copy constructor.
61 * @param rRhs An object whose contents are to be copied to the instance
64 PlaceItem(const PlaceItem& rRhs);
67 * This method is the destructor.
72 * This is the assignment operator.
74 * @param rRhs An object whose contents are to be copied to the given
77 * @return A reference to the given instance of the class after its contents
80 PlaceItem& operator=(const PlaceItem& rRhs);
83 * This method retrieves the geographic coordinates of the given place.
85 * @return An object containing the geographic coordinates of the place.
87 GeoCoordinates GetPosition() const;
90 * This method retrieves the distance in meters between the given place and
91 * the search context (center).
93 * @return A value indicating how far the given place lies from the search
96 double GetDistance() const;
99 * This method retrieves a value that represents the average rating of the
102 * @return A value that represents the average rating of the place by users.
104 double GetAverageRating() const;
107 * This method retrieves an object representing the category to which the
108 * given place is assigned.
110 * @return An object representing the category to which the given place is
113 Category GetCategory() const;
116 * This method retrieves a link to a resource associated with the given
119 * @return An object encapsulating a link to a resource.
121 LinkObject GetLinkObject() const;
124 * This method retrieves text describing the location of the place. The text
125 * is typically derived from the address of the place, but may also contain
126 * any other information that can help the user understand, where the place is
129 * @return A string containing the description of the vicinity (location) of
132 String GetVicinity() const;
135 * This method retrieves a Boolean value indicating if the given search
136 * result is sponsored or not.
138 * @return <code>true</code> if the given search result is sponsored,
139 * otherwise <code>false</code>.
141 bool GetIsSponsored() const;
144 * This method retrieves the bounding box enclosing the given place.
146 * @return An object representing the bounding box (defined in terms of the
147 * geographical coordinates of its top-left and bottom-right corners)
148 * that encloses the given place.
150 GeoBoundingBox GetBBox() const;
153 * This method sets the geographic coordinates of the given place.
155 * @param rPosition GeoCoordinates A constant reference to a object
156 * containing the geographic coordinates of the place.
158 void SetPosition(const GeoCoordinates& rPosition);
161 * This method sets the distance in meters between the given place and
162 * the search context (center).
164 * @param dDistance A value indicating how far the
165 * given place lies from the search context (center).
167 void SetDistance(double dDistance);
170 * This method sets a value that represents the average rating of the
173 * @param dAverageRating A value that represents the average rating of the
176 void SetAverageRating(double dAverageRating);
179 * This method sets an object representing the category to which the
180 * given place is assigned.
182 * @param rCategory A constant reference to an object representing the
183 * category to which the given place is assigned.
185 void SetCategory(const Category& rCategory);
188 * This method sets text describing the location of the place. The text
189 * is typically derived from the address of the place, but may also contain
190 * any other information that may help the user understand, where the place is
193 * @param sVicinity A constant reference to a string containing the
194 * description of the vicinity (location) of the place.
196 void SetVicinity(const String& sVicinity);
199 * This method sets a link to a resource associated with the given
202 * @param rLinkObject A constant reference to an object encapsulating a link
205 void SetLinkObject(const LinkObject& rLinkObject);
208 * This method sets a Boolean value indicating if the given search
209 * result item is sponsored or not.
211 * @param bIsSponsored <code>true</code> if the given search result item is
212 * sponsored, otherwise <code>false</code>.
214 void SetIsSponsored(bool bIsSponsored);
217 * This method sets the bounding box enclosing the given place.
219 * @param rBbox A constant reference to an object representing the bounding
220 * box (defined in terms of the geographical coordinates of its
221 * top-left and bottom-right corners) that encloses the given place.
223 void SetBBox(const GeoBoundingBox& rBbox);
227 PlaceItemImpl* m_pImpl;
229 friend class JsonParser;
232 HERE_MAPS_END_NAMESPACE
234 #endif // PLACE_ITEM_H_