2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __MAPS_PLACE_CATEGORY_H__
18 #define __MAPS_PLACE_CATEGORY_H__
21 * @ingroup CAPI_MAPS_PLACE_MODULE
22 * @defgroup CAPI_MAPS_PLACE_CATEGORY_MODULE Category
24 * @file maps_place_category.h
25 * @brief This file contains the functions related to Place Category
28 * @addtogroup CAPI_MAPS_PLACE_CATEGORY_MODULE
30 * @brief This provides APIs related to place Category information, used in
31 * Place Discovery and Search.
39 * @brief The Place Category handle
40 * @details The handle of Place Category instance.
41 * @remarks To release the handle use maps_place_category_destroy().
42 * \n To clone the handle use maps_place_category_clone().
45 * @see maps_place_category_destroy()
46 * @see maps_place_category_clone()
48 typedef void *maps_place_category_h;
50 /*----------------------------------------------------------------------------*/
53 * @brief Creates a new place category handle.
54 * @details This function creates a new place category handle and allocates all
57 * @remarks @a category must be released using maps_place_category_destroy().
58 * \n @a category may be cloned using maps_place_category_clone().
60 * @param[out] category A handle of a new place category on success
61 * @return 0 on success, otherwise a negative error value
62 * @retval #MAPS_ERROR_NONE Successful
63 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
64 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
66 * @see maps_place_category_destroy()
67 * @see maps_place_category_clone()
69 int maps_place_category_create(maps_place_category_h *category);
73 * @brief Clones the place category handle.
74 * @details This function clones the place category handle @a origin and all its
77 * @remarks @a cloned must be released using maps_place_category_destroy().
79 * @param[in] origin The original place category handle
80 * @param[out] cloned A cloned place category handle
81 * @return 0 on success, otherwise a negative error value
82 * @retval #MAPS_ERROR_NONE Successful
83 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
84 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
86 * @see maps_place_category_destroy()
88 int maps_place_category_clone(const maps_place_category_h origin,
89 maps_place_category_h *cloned);
93 * @brief Destroys the place category handle and releases all its
95 * @details This function destroys the place category handle and releases all
99 * @param[in] category The place category handle to destroy
100 * @return 0 on success, otherwise a negative error value
101 * @retval #MAPS_ERROR_NONE Successful
102 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
104 * @see maps_place_category_clone()
106 int maps_place_category_destroy(maps_place_category_h category);
109 /*----------------------------------------------------------------------------*/
112 * @brief Sets the place category id.
113 * @details This function sets the place category id.
116 * @param[in] category The handle of place category
117 * @param[in] id The place category id
118 * @return 0 on success, otherwise a negative error value
119 * @retval #MAPS_ERROR_NONE Successful
120 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
122 * @pre @a category is created using maps_place_category_create().
124 * @see maps_place_category_create()
125 * @see maps_place_category_get_id()
127 int maps_place_category_set_id(maps_place_category_h category,
132 * @brief Sets the place category name.
133 * @details This function sets the place category name.
136 * @param[in] category The handle of place category
137 * @param[in] name The place category name
138 * @return 0 on success, otherwise a negative error value
139 * @retval #MAPS_ERROR_NONE Successful
140 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
142 * @pre @a category is created using maps_place_category_create().
144 * @see maps_place_category_create()
145 * @see maps_place_category_get_name()
147 int maps_place_category_set_name(maps_place_category_h category,
152 * @brief Sets the place category URL.
153 * @details This function sets the place category URL.
156 * @param[in] category The handle of place category
157 * @param[in] url The place category URL
158 * @return 0 on success, otherwise a negative error value
159 * @retval #MAPS_ERROR_NONE Successful
160 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
162 * @pre @a category is created using maps_place_category_create().
164 * @see maps_place_category_create()
165 * @see maps_place_category_get_url()
167 int maps_place_category_set_url(maps_place_category_h category,
172 * @brief Gets the place category id.
173 * @details This function gets the place category id.
175 * @remarks @a id must be released using free().
177 * @param[in] category The handle of place category
178 * @param[out] id The place category id
179 * @return 0 on success, otherwise a negative error value
180 * @retval #MAPS_ERROR_NONE Successful
181 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
183 int maps_place_category_get_id(const maps_place_category_h category,
187 * @brief Gets the place category name.
188 * @details This function gets the place category name.
190 * @remarks @a name must be released using free().
192 * @param[in] category The handle of place category
193 * @param[out] name The place category name
194 * @return 0 on success, otherwise a negative error value
195 * @retval #MAPS_ERROR_NONE Successful
196 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
198 int maps_place_category_get_name(const maps_place_category_h category,
202 * @brief Gets the place category URL.
203 * @details This function gets the place category URL.
205 * @remarks @a url must be released using free().
207 * @param[in] category The handle of place category
208 * @param[out] url The place category URL
209 * @return 0 on success, otherwise a negative error value
210 * @retval #MAPS_ERROR_NONE Successful
211 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
213 int maps_place_category_get_url(const maps_place_category_h category,
222 #endif /* __MAPS_PLACE_CATEGORY_H__ */