46deb5208be0f21324e4ba8afbfb233079236acf
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / ImageContent.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 IMAGE_CONTENT_H_
19 #define IMAGE_CONTENT_H_
20
21 #include <vector>
22 #include "common/HereMaps_global.h"
23 #ifndef TIZEN_MIGRATION
24 #include <FBaseUtilUri.h>
25 #endif
26
27 #include "finder/BaseContent.h"
28
29 HERE_MAPS_BEGIN_NAMESPACE
30
31 class LinkObject;
32
33 class ImageContent;
34 /**
35  * This typedef defines a list of image content objects as a type.
36  */
37 typedef std::vector<ImageContent> ImageContentList;
38
39 /**
40  * This class encapsulates the contents of an image. It includes information
41  * such as the source URL, image id, and the details of the user (provider).
42  * 
43  * \ingroup finder
44  */
45 class EXPORT_API ImageContent : public BaseContent
46 {
47 public:
48     /**
49      * This method is the default constructor.
50      */
51     ImageContent();
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     ImageContent(const ImageContent& rRhs);
60
61     /**
62      * This method is a (virtual) destructor.
63      */
64     virtual ~ImageContent();
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     ImageContent& operator=(const ImageContent& rRhs);
76
77     /**
78      * This method retrieves the URI of the image source.
79      * 
80      * @return An object containing the URI of the image source.
81      */
82     String GetSource() const;
83
84     /**
85      * This method retrieves the image identifier. Note that a meaningful
86      * identifier can be retrieved only if the image the image has been uploaded
87      * via the Places API.
88      * 
89      * @return A string containing the id of the image.
90      */
91     String GetImageId() const;
92
93     /**
94      * This method retrieves a link to the provider of the image.   
95      * 
96      * @return An object with a link to the provider of the image.
97      */
98     LinkObject GetUser() const;
99
100     /**
101      * This method sets the URI of the image source.
102      * 
103      * @param rUrl A constant reference to an object containing the URI of the
104      *       image source.
105      */
106     void SetSource(const String& rUrl);
107
108     /**
109      * This method sets the image identifier. Note that a meaningful
110      * identifier can be retrieved only if the image has been uploaded
111      * via the Places API.
112      * 
113      * @param rImageId A constant reference to a string containing the id of the
114      *       image.
115      */
116     void SetImageId(const String& rImageId);
117
118     /**
119      * This method sets a link to the provider of the image.   
120      * 
121      * @param rUrl A constant reference to an object with a link to the provider
122      *        of the image.
123      */
124     void SetUser(const LinkObject& rUrl);
125
126 private:
127     class ImageContentImpl;
128     ImageContentImpl* m_pImpl;
129
130     friend class JsonParser;
131 };
132
133 HERE_MAPS_END_NAMESPACE
134
135 #endif //IMAGE_CONTENT_H_