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_IMAGE_PLUGIN_H__
18 #define __MAPS_PLACE_IMAGE_PLUGIN_H__
20 #include <maps_place_image.h>
23 * @ingroup CAPI_MAPS_PLUGIN_PLACE_MODULE
24 * @defgroup CAPI_MAPS_PLUGIN_PLACE_IMAGE_MODULE Image
26 * @file maps_place_image_plugin.h
27 * @brief This file contains the functions related to Place Image
28 * information, needed in plug-in development.
30 * @addtogroup CAPI_MAPS_PLUGIN_PLACE_IMAGE_MODULE
32 * @brief This provides APIs related to Place Image, used in Place
33 * Discovery and Search, needed in plug-in development.
41 * @brief Creates a new place image handle.
42 * @details This function creates a new place image handle and allocates all
44 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
45 * @remarks @a image must be released using maps_place_image_destroy().
46 * \n @a image may be cloned using maps_place_image_clone().
48 * @param[out] image A handle of a new place image on success
49 * @return 0 on success, otherwise a negative error value
50 * @retval #MAPS_ERROR_NONE Successful
51 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
52 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
54 * @see maps_place_image_destroy()
55 * @see maps_place_image_clone()
57 int maps_place_image_create(maps_place_image_h *image);
60 * @brief Sets the place image id.
61 * @details This function sets the place image id.
62 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
64 * @param[in] image The handle of place image
65 * @param[in] id The place image id
66 * @return 0 on success, otherwise a negative error value
67 * @retval #MAPS_ERROR_NONE Successful
68 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
70 * @pre @a image is created using maps_place_image_create().
72 * @see maps_place_image_create()
73 * @see maps_place_image_get_id()
75 int maps_place_image_set_id(maps_place_image_h image, const char *id);
78 * @brief Sets the place image URL.
79 * @details This function sets the place image URL.
80 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
82 * @param[in] image The handle of place image
83 * @param[in] url The place image url
84 * @return 0 on success, otherwise a negative error value
85 * @retval #MAPS_ERROR_NONE Successful
86 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
88 * @pre @a image is created using maps_place_image_create().
90 * @see maps_place_image_create()
91 * @see maps_place_image_get_url()
93 int maps_place_image_set_url(maps_place_image_h image, const char *url);
96 * @brief Sets the place image width.
97 * @details This function sets the place image width.
98 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
100 * @param[in] image The handle of place image
101 * @param[in] width The place image width
102 * @return 0 on success, otherwise a negative error value
103 * @retval #MAPS_ERROR_NONE Successful
104 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
106 * @pre @a image is created using maps_place_image_create().
108 * @see maps_place_image_create()
109 * @see maps_place_image_get_width()
111 int maps_place_image_set_width(maps_place_image_h image, const int width);
114 * @brief Sets the place image height.
115 * @details This function sets the place image height.
116 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
118 * @param[in] image The handle of place image
119 * @param[in] height The place image height
120 * @return 0 on success, otherwise a negative error value
121 * @retval #MAPS_ERROR_NONE Successful
122 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
124 * @pre @a image is created using maps_place_image_create().
126 * @see maps_place_image_create()
127 * @see maps_place_image_get_height()
129 int maps_place_image_set_height(maps_place_image_h image, const int height);
132 * @brief Sets the place image user link.
133 * @details This function sets the place image user link.
134 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
136 * @param[in] image The handle of place image
137 * @param[in] user The place image user link
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 image is created using maps_place_image_create().
144 * @see maps_place_image_create()
145 * @see maps_place_image_get_user_link()
146 * @see #maps_place_link_object_h
148 int maps_place_image_set_user_link(maps_place_image_h image,
149 const maps_place_link_object_h user);
152 * @brief Sets the place image media.
153 * @details This function sets the place image media.
154 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
156 * @param[in] image The handle of place image
157 * @param[in] media The place image media
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 image is created using maps_place_image_create().
164 * @see maps_place_image_create()
165 * @see maps_place_image_get_media()
166 * @see #maps_place_media_h
168 int maps_place_image_set_media(maps_place_image_h image,
169 const maps_place_media_h media);
177 #endif /* __MAPS_PLACE_IMAGE_PLUGIN_H__ */