changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / PlaceDetails.h
1 /*
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
10  *
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.
16  */
17
18 #ifndef PLACE_DETAILS_H_
19 #define PLACE_DETAILS_H_
20
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"
30
31 #include <map>
32
33 HERE_MAPS_BEGIN_NAMESPACE
34
35 class Ratings;
36 class GeoLocation;
37 class ExtendedAttribute;
38 class RelatedItem;
39 class BaseContent;
40
41 /**
42  * This class encapsulates detailed information about a place, including name,
43  * id, contact, category, location, ratings, review(s) and image(s).
44  * 
45  * \ingroup finder
46  */
47 class EXPORT_API PlaceDetails
48 {
49 public:
50     /**
51      * This typedef defines a map holding alternative place names as a type.
52      */ 
53    typedef std::map< String, std::vector< String >, TSPredicate > AlternativeNames;
54
55 public:
56     /**
57      * This method is the default constructor.
58      */
59     PlaceDetails();
60
61     /**
62      * This method is the copy constructor.
63      * 
64      * @param rRhs An object whose contents are to be copied to the instance
65      *        being created.
66      */
67     PlaceDetails(const PlaceDetails& rRhs);
68
69     /**
70      * This method is the destructor.
71      */
72     ~PlaceDetails();
73
74     /**
75      * This is the assignment operator.
76      * 
77      * @param rRhs An object whose contents are to be copied to the given
78      *        instance.
79      * 
80      * @return A reference to the given instance of the class after its contents
81      *       have been updated.
82      */
83     PlaceDetails& operator=(const PlaceDetails& rRhs);
84
85     /**
86      * This method retrieves the name of the place.
87      * 
88      * @return A string containing the place name.
89      */ 
90     String GetName() const;
91
92     /**
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
95      * about the place.
96      * 
97      * @return A string containing the unique id of the place.
98      */ 
99     String GetPlaceId() const;    
100
101     /**
102      * This method retrieves a link to a representation of the
103      * place that can be viewed by end users.
104      * 
105      * @return A string containing a link to a view of the place.
106      */ 
107     String GetView() const;
108
109     /**
110      * This method retrieves a map object containing the alternative names of the
111      * place.  
112      * 
113      * @return An object containing the alternative names of the place.
114      */ 
115     AlternativeNames GetAlternativeNames() const;
116
117     /**
118      * This method retrieves detailed location information for the place.
119      * 
120      * @return An object containing the address and the geographical coordinates
121      *       of the place.
122      */ 
123     GeoLocation GetLocation() const;
124
125     /**
126      * This method retrieves basic information about the place.
127      * 
128      * @return An object containing basic information about the place.
129      */ 
130     BaseContent GetBaseContent() const;
131
132     /**
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.
135      * 
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".
139      */
140     StringList GetContactTypes() const;
141
142     /**
143      * This method retrieves a list of contact details for the given place. 
144      * 
145      * @return A vector containing instances of <code>ContactDetails</code>.
146      */ 
147     ContactDetailsList GetContactDetails() const;
148
149     /**
150      * This method retrieves a list of categories applicable to the given place.
151      * 
152      * @return A vector containing instances of <code>Category</code>
153      */ 
154     CategoryList GetCategories() const;
155
156     /**
157      * This method retrieves information on user rating of the given place.
158      * 
159      * @return An object containing user rating information.
160      */ 
161     Ratings GetRatings() const;
162
163     /**
164      * This method retrieves the URI of the icon that represents the given
165      * place.
166      * 
167      * @return A URI of the place icon.
168      */ 
169     String GetIconPath() const;
170
171     /**
172      * This method retrieves a list object containing image content information
173      * for images relating to the given place.
174      * 
175      * @return An object containing a vector of instances of
176      *        <code>ImageContent</code>.
177      */ 
178     ImageContentList GetImageContent() const;
179
180     /**
181      * This method retrieves a list object containing review content
182      * relating to the given place.
183      * 
184      * @return An object containing a vector of instances of
185      *        <code>ReviewContent</code>.
186      */ 
187     ReviewContentList GetReviewContent() const;
188
189     /**
190      * This method retrieves a list object containing editorial content
191      * relating to the given place.
192      * 
193      * @return An object containing a vector of instances of
194      *        <code>EditorialContent</code>.
195      */ 
196     EditorialContentList GetEditorialContent() const;
197
198     /**
199      * This method retrieves a list of strings, each containing an identifier of
200      * an extended attribute type applicable to the given place.
201      * 
202      * @return A list of strings containing extended attribute type identifiers.
203      */ 
204     StringList GetExtendedAttributeTypes() const;
205
206     /**
207      * This method retrieves a list object containing extended attributes
208      * applicable to the given place. 
209      * 
210      * @return An object containing a vector of instances of
211      *        <code>ExtendedAttribute</code>.  
212      */ 
213     ExtendedAttributeList GetExtendedAttributes() const;
214
215     /**
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).
219      * 
220      * @return An object encapsulating places related to the given place. 
221      */ 
222     RelatedItem GetRelatedItem() const;
223
224     /**
225      * This method sets the name of the place.
226      * 
227      * @param rsName A constant reference to a string containing the place name.
228      */ 
229     void SetName(const String& rsName);
230
231     /**
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
234      * about the place.
235      * 
236      * @param rsIdentifier A constant reference to a string containing the
237      *        unique id of the place.
238      */ 
239     void SetPlaceId(const String& rsIdentifier);
240
241     /**
242      * This method sets a link to a representation of the
243      * place that can be viewed by end users.
244      * 
245      * @param rsView A constant reference to a string containing a link to a
246      *        view of the place.
247      */ 
248     void SetView(const String& rsView);
249
250     /**
251      * This method sets a map object containing the alternative names of the
252      * place.  
253      * 
254      * @param vNames A constant reference to an object containing the alternative
255      *        names of the place.
256      */ 
257     void SetAlternativeNames(const AlternativeNames& vNames);
258
259     /**
260      * This method sets the location details for the place.
261      * 
262      * @param rLocation A constant reference to an object containing the address
263      *       and the geographical coordinates of the place.
264      */ 
265     void SetLocation(const GeoLocation& rLocation);
266
267     /**
268      * This method sets basic information about the place.
269      * 
270      * @param rContent A constant reference to an object containing basic
271      *        information about the place.
272      */ 
273     void SetContent(const BaseContent& rContent);
274
275     /**
276      * This method sets a list of contact details for the given place. 
277      * 
278      * @param vDetails A constant reference to a vector containing instances of
279      *    <code>ContactDetails</code>.
280      */ 
281     void SetContactDetails(const ContactDetailsList& vDetails);
282
283     /**
284      * This method sets a list of (POI) categories applicable to the given place.
285      * 
286      * @param rvCategories A constant reference to a vector containing instances
287      *        of <code>Category</code>
288      */ 
289     void SetCategories(const CategoryList& rvCategories);
290
291     /**
292      * This method sets information on user rating of the given place.
293      * 
294      * @param rRatings A constant reference to an object containing user rating
295      *        information.
296      */ 
297     void SetRatings(const Ratings& rRatings);
298
299     /**
300      * This method sets the URI of the icon that represents the given
301      * place.
302      * 
303      * @param rIcon A constant reference to an object containing the URI of the
304      *        place icon.
305      */ 
306     void SetIconPath(const String rIcon);
307
308     /**
309      * This method sets a list object containing image content data
310      * for images relating to the given place.
311      * 
312      * @param rContent A constant reference to a vector of
313      *        instances of <code>ImageContent</code>.
314      */ 
315     void SetImageContent(const ImageContentList& rContent);
316
317     /**
318      * This method sets a list object containing review content
319      * relating to the given place.
320      * 
321      * @param rContent A constant reference to a vector of
322      *        instances of <code>ReviewContent</code>.
323      */ 
324     void SetReviewContent(const ReviewContentList& rContent);
325
326     /**
327      * This method sets a list object containing editorial content
328      * relating to the given place.
329      * 
330      * @param rContent A constant reference to a vector of
331      *          instances of <code>EditorialContent</code>.
332      */ 
333     void SetEditorialContent(const EditorialContentList& rContent);
334
335     /**
336      * This method sets a list object containing extended attributes
337      * applicable to the given place. 
338      * 
339      * @param rAttribute A constant reference to a vector of
340      *        instances of <code>ExtendedAttribute</code>.
341      */ 
342     void SetExtendedAttributes(const ExtendedAttributeList& rAttribute);
343
344     /**
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).
348      * 
349      * @param rAttribute A constant reference to a object encapsulating places
350      *        related to the given place.
351      */ 
352     void SetRelatedItem(const RelatedItem& rAttribute);
353
354 private:
355     class PlaceDetailsImpl;
356     PlaceDetailsImpl* m_pImpl;
357
358     friend class JsonParser;
359 };
360
361 HERE_MAPS_END_NAMESPACE
362
363 #endif // PLACE_DETAILS_H_