a83f56265cc91de11e05480f21b396017ac79ce4
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / ReviewContent.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 REVIEW_CONTENT_H_
19 #define REVIEW_CONTENT_H_
20
21 #include <vector>
22 #include "common/HereMaps_global.h"
23 #ifndef TIZEN_MIGRATION
24 #include <FBaseDateTime.h>
25 #endif
26
27 #include "finder/BaseContent.h"
28
29 HERE_MAPS_BEGIN_NAMESPACE
30
31 class LinkObject;
32
33 class ReviewContent;
34 /**
35  * This typedef defines a list or review content items as a type.
36  */
37 typedef std::vector<ReviewContent> ReviewContentList;
38
39 /**
40  * This class encapsulates the content of a review related to a place.
41  * 
42  * \ingroup finder
43  */
44 class EXPORT_API ReviewContent : public BaseContent
45 {
46 public:
47
48     /**
49      * This method is the default constructor.
50      */
51     ReviewContent();
52
53     /**
54      * This method is the copy constructor.
55      *
56      * @param rRhs An object whose contents are to be copied to the instance
57      *        being created.
58      */
59     ReviewContent(const ReviewContent& rRhs);
60
61     /**
62      * This method is the (virtual) destructor.
63      */
64     virtual ~ReviewContent();
65
66     /**
67      * This is the assignment operator.
68      *
69      * @param rRhs An object whose contents are to be copied to the given
70      *        instance.
71      *
72      * @return A reference to the given instance of the class after its contents
73      *       have been updated.
74      */
75     ReviewContent& operator=(const ReviewContent& rRhs);
76
77     /**
78      * This method retrieves the review date as a string.
79      * 
80      * @return A string containing the date of the review. 
81      */
82     String GetDateTime() const;
83
84     /**
85      * This method retrieves the review title.
86      * 
87      * @return A string containing the review title.
88      */
89     String GetTitle() const;
90
91     /**
92      * This method retrieves the review rating.
93      * 
94      * @return A double containing the retrieved value of rating.
95      */
96     double GetRating() const;
97
98     /**
99      * This method retrieves the review description (text).
100      * 
101      * @return A string containing the review
102      *        description (text).
103      */
104     String GetDescription() const;
105
106     /**
107      * This method retrieves a link to the website of the user, who submitted
108      * the review. 
109      * 
110      * @return An object representing a link to the website of the user, who submitted
111      * the review. 
112      */
113     LinkObject GetUser() const;
114
115     /**
116      * This method retrieves the BCP 47 identifier of the language used in the
117      * review.
118      * 
119      * @return A string containing the identifier of the language used in the
120      *        review.
121      */
122     String GetLanguage() const;
123
124     /**
125      * This method sets the review date as a string.
126      * 
127      * @param rDateTime A constant reference to a string containing the date of
128      *        the review.
129      */
130     void SetDateTime(const String &rDateTime);
131
132     /**
133      * This method sets the review title.
134      * 
135      * @param rTitle A constant reference to a string containing the review
136      *        title.
137      */
138     void SetTitle(const String& rTitle);
139
140     /**
141      * This method sets the review rating.
142      * 
143      * @param dRating A double containing the retrieved value of rating.
144      */
145     void SetRating(double dRating);
146
147     /**
148      * This method sets the review description (text).
149      * 
150      * @param sText A constant reference to a string containing the review
151      *        description (text).
152      */
153     void SetDescription(const String& sText);
154
155     /**
156      * This method sets a link to the website of the user, who submitted
157      * the review. 
158      * 
159      * @param cUser A constant reference to an object representing a link to the
160      *        website of the user, who submitted the review.
161      */
162     void SetUser(const LinkObject& cUser);
163
164     /**
165      * This method sets the BCP 47 identifier of the language used in the
166      * review.
167      * 
168      * @param sLanguage A constant reference to a string containing the
169      *        identifier of the language used in the review.
170      */
171     void SetLanguage(const String& sLanguage);
172
173 private:
174     class ReviewContentImpl;
175     ReviewContentImpl* m_pImpl;
176
177     friend class JsonParser;
178 };
179
180 HERE_MAPS_END_NAMESPACE
181
182 #endif // REVIEW_CONTENT_H_