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.
18 #ifndef PLACE_DETAILS_H_
19 #define PLACE_DETAILS_H_
21 #include "finder/ContactDetails.h"
22 #include "finder/PlacesGlobals.h"
23 #include "finder/Category.h"
24 #include "finder/ImageContent.h"
25 #include "finder/ReviewContent.h"
26 #include "finder/EditorialContent.h"
27 #include "finder/ExtendedAttribute.h"
28 #include "common/HereMaps_global.h"
29 #include "internal/StringHelper.h"
33 HERE_MAPS_BEGIN_NAMESPACE
37 class ExtendedAttribute;
42 * This class encapsulates detailed information about a place, including name,
43 * id, contact, category, location, ratings, review(s) and image(s).
47 class EXPORT_API PlaceDetails
51 * This typedef defines a map holding alternative place names as a type.
53 typedef std::map< String, std::vector< String >, TSPredicate > AlternativeNames;
57 * This method is the default constructor.
62 * This method is the copy constructor.
64 * @param rRhs An object whose contents are to be copied to the instance
67 PlaceDetails(const PlaceDetails& rRhs);
70 * This method is the destructor.
75 * This is the assignment operator.
77 * @param rRhs An object whose contents are to be copied to the given
80 * @return A reference to the given instance of the class after its contents
83 PlaceDetails& operator=(const PlaceDetails& rRhs);
86 * This method retrieves the name of the place.
88 * @return A string containing the place name.
90 String GetName() const;
93 * This method retrieves the place id, which is a unique identifier in the
94 * Places database and can be used to obtain the complete information
97 * @return A string containing the unique id of the place.
99 String GetPlaceId() const;
102 * This method retrieves a link to a representation of the
103 * place that can be viewed by end users.
105 * @return A string containing a link to a view of the place.
107 String GetView() const;
110 * This method retrieves a map object containing the alternative names of the
113 * @return An object containing the alternative names of the place.
115 AlternativeNames GetAlternativeNames() const;
118 * This method retrieves detailed location information for the place.
120 * @return An object containing the address and the geographical coordinates
123 GeoLocation GetLocation() const;
126 * This method retrieves basic information about the place.
128 * @return An object containing basic information about the place.
130 BaseContent GetBaseContent() const;
133 * This method retrieves a list of contact types available for the given
134 * place. Contact types can include telephone, e-mail, website, site, etc.
136 * @return A list of strings containing contact type identifiers. The
137 * possible values for contact type identifiers are "phone",
138 * "website", "fax", or "email".
140 StringList GetContactTypes() const;
143 * This method retrieves a list of contact details for the given place.
145 * @return A vector containing instances of <code>ContactDetails</code>.
147 ContactDetailsList GetContactDetails() const;
150 * This method retrieves a list of categories applicable to the given place.
152 * @return A vector containing instances of <code>Category</code>
154 CategoryList GetCategories() const;
157 * This method retrieves information on user rating of the given place.
159 * @return An object containing user rating information.
161 Ratings GetRatings() const;
164 * This method retrieves the URI of the icon that represents the given
167 * @return A URI of the place icon.
169 String GetIconPath() const;
172 * This method retrieves a list object containing image content information
173 * for images relating to the given place.
175 * @return An object containing a vector of instances of
176 * <code>ImageContent</code>.
178 ImageContentList GetImageContent() const;
181 * This method retrieves a list object containing review content
182 * relating to the given place.
184 * @return An object containing a vector of instances of
185 * <code>ReviewContent</code>.
187 ReviewContentList GetReviewContent() const;
190 * This method retrieves a list object containing editorial content
191 * relating to the given place.
193 * @return An object containing a vector of instances of
194 * <code>EditorialContent</code>.
196 EditorialContentList GetEditorialContent() const;
199 * This method retrieves a list of strings, each containing an identifier of
200 * an extended attribute type applicable to the given place.
202 * @return A list of strings containing extended attribute type identifiers.
204 StringList GetExtendedAttributeTypes() const;
207 * This method retrieves a list object containing extended attributes
208 * applicable to the given place.
210 * @return An object containing a vector of instances of
211 * <code>ExtendedAttribute</code>.
213 ExtendedAttributeList GetExtendedAttributes() const;
216 * This method retrieves an object containing a list of places that
217 * are related to the given place (or places that may be be interesting to
218 * users who have looked at the given place).
220 * @return An object encapsulating places related to the given place.
222 RelatedItem GetRelatedItem() const;
225 * This method sets the name of the place.
227 * @param rsName A constant reference to a string containing the place name.
229 void SetName(const String& rsName);
232 * This method sets the place id, which is a unique identifier in the
233 * Places database and can be used to obtain the complete information
236 * @param rsIdentifier A constant reference to a string containing the
237 * unique id of the place.
239 void SetPlaceId(const String& rsIdentifier);
242 * This method sets a link to a representation of the
243 * place that can be viewed by end users.
245 * @param rsView A constant reference to a string containing a link to a
248 void SetView(const String& rsView);
251 * This method sets a map object containing the alternative names of the
254 * @param vNames A constant reference to an object containing the alternative
255 * names of the place.
257 void SetAlternativeNames(const AlternativeNames& vNames);
260 * This method sets the location details for the place.
262 * @param rLocation A constant reference to an object containing the address
263 * and the geographical coordinates of the place.
265 void SetLocation(const GeoLocation& rLocation);
268 * This method sets basic information about the place.
270 * @param rContent A constant reference to an object containing basic
271 * information about the place.
273 void SetContent(const BaseContent& rContent);
276 * This method sets a list of contact details for the given place.
278 * @param vDetails A constant reference to a vector containing instances of
279 * <code>ContactDetails</code>.
281 void SetContactDetails(const ContactDetailsList& vDetails);
284 * This method sets a list of (POI) categories applicable to the given place.
286 * @param rvCategories A constant reference to a vector containing instances
287 * of <code>Category</code>
289 void SetCategories(const CategoryList& rvCategories);
292 * This method sets information on user rating of the given place.
294 * @param rRatings A constant reference to an object containing user rating
297 void SetRatings(const Ratings& rRatings);
300 * This method sets the URI of the icon that represents the given
303 * @param rIcon A constant reference to an object containing the URI of the
306 void SetIconPath(const String rIcon);
309 * This method sets a list object containing image content data
310 * for images relating to the given place.
312 * @param rContent A constant reference to a vector of
313 * instances of <code>ImageContent</code>.
315 void SetImageContent(const ImageContentList& rContent);
318 * This method sets a list object containing review content
319 * relating to the given place.
321 * @param rContent A constant reference to a vector of
322 * instances of <code>ReviewContent</code>.
324 void SetReviewContent(const ReviewContentList& rContent);
327 * This method sets a list object containing editorial content
328 * relating to the given place.
330 * @param rContent A constant reference to a vector of
331 * instances of <code>EditorialContent</code>.
333 void SetEditorialContent(const EditorialContentList& rContent);
336 * This method sets a list object containing extended attributes
337 * applicable to the given place.
339 * @param rAttribute A constant reference to a vector of
340 * instances of <code>ExtendedAttribute</code>.
342 void SetExtendedAttributes(const ExtendedAttributeList& rAttribute);
345 * This method sets an object containing a list of places that
346 * are related to the given place (or places that may be of interest to
347 * users who have looked at the given place).
349 * @param rAttribute A constant reference to a object encapsulating places
350 * related to the given place.
352 void SetRelatedItem(const RelatedItem& rAttribute);
355 class PlaceDetailsImpl;
356 PlaceDetailsImpl* m_pImpl;
358 friend class JsonParser;
361 HERE_MAPS_END_NAMESPACE
363 #endif // PLACE_DETAILS_H_