a54c22985cc03dcd3fb12f1c84294b0a7ac9dfbe
[platform/core/location/maps-plugin-here.git] / inc / engine / finder / Category.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 CATEGORY_H_
19 #define CATEGORY_H_
20
21 #include <vector>
22 #include "common/HereMaps_global.h"
23 #ifndef TIZEN_MIGRATION
24 #include <FBase.h>
25 #endif
26
27 HERE_MAPS_BEGIN_NAMESPACE
28
29 class CategoryId;
30 class Category;
31
32
33 /**
34  * This typedef defines a type representing a list of <code>Category</code>
35  * instances. 
36  * 
37  * \ingroup finder
38  */
39 typedef std::vector<Category> CategoryList;
40
41 /**
42  * This class encapsulates information about a Point of Interest (POI) category
43  * that can be applied to a place.
44  * 
45  * \ingroup finder
46  */
47 class EXPORT_API Category
48 {
49 public:
50
51     /**
52      * This method is the default constructor.
53      */
54     Category();
55
56     /**
57      * This method is a constructor.
58      */
59     Category(const CategoryId& rId);
60
61    /**
62     * This method is a copy constructor.
63     * 
64     * @param rRhs An object whose contents are to be copied to the instance
65     *        being created.
66     */
67     Category(const Category& rRhs);
68
69    /**
70     * This method is the (virtual) destructor.
71     */
72     virtual ~Category();
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     Category& operator=(const Category& rRhs);
84
85     /**
86      * This method retrieves the category identifier.
87      *
88      * @return A string containing the identifier of the POI category. 
89      */
90     const CategoryId& GetCategoryId() const;
91
92     /**
93      * This method sets the category identifier.
94      *
95      * @param rsId A constant reference to an object containing the identifier
96      *        of the POI category.
97      */
98     void SetCategoryId(const CategoryId& rsId);
99
100     /**
101      * This method retrieves the category name (localized).
102      *
103      * @return A string containing the localized name of the POI category.  
104      */
105     String GetTitle() const;
106
107     /**
108      * This method retrieves the URI of the category resource (icon).
109      *
110      * @return A string containing the URI of the icon of the POI category.  
111      */
112     String GetHref() const;
113
114     /**
115      * This method retrieves the resource type identifier for the given
116      * category. 
117      *
118      * @return A string containing the type identifier, which is either a valid
119      *        MIME type or a URI.
120      */
121     String GetType() const;
122
123     /**
124      * This method retrieves the path to the category icon.
125      *
126      * @return A URI object containing the path to the category icon.
127      */
128     String GetIconPath() const;
129
130     /**
131      * This method sets the category name (localized).
132      *
133      * @param sTitle A constant reference to a string containing the localized
134      *        name of the POI category.
135      */
136     void SetTitle(const String& sTitle);
137
138     /**
139      * This method sets the URI of the category resource (icon).
140      *
141      * @param sHref A constant reference to a string containing the URI of the icon
142      *        of the POI category.
143      */
144     void SetHref(const String& sHref);
145
146     /**
147      * This method sets the resource type identifier for the given
148      * category. 
149      *
150      * @param sType A constant reference to a string containing the type
151      *        identifier, which is either a valid MIME type or a URI.
152      */
153     void SetType(const String& sType);
154
155     /**
156      * This method sets the path to the category icon.
157      *
158      * @param rIcon A constant reference to a URI object containing the path to
159      *        the category icon.
160      */
161     void SetIconPath(const String& rIcon);
162
163 private:
164     class CategoryImpl;
165     CategoryImpl* m_pImpl;
166
167     friend class JsonParser;
168 };
169
170 HERE_MAPS_END_NAMESPACE
171
172 #endif // CATEGORY_H_