copied sources from tizen 2.4
[platform/core/api/maps-service.git] / include / maps_place_image_plugin.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __MAPS_PLACE_IMAGE_PLUGIN_H__
18 #define __MAPS_PLACE_IMAGE_PLUGIN_H__
19
20 #include <maps_place_image.h>
21
22 /**
23  * @ingroup     CAPI_MAPS_PLUGIN_PLACE_MODULE
24  * @defgroup    CAPI_MAPS_PLUGIN_PLACE_IMAGE_MODULE Image
25  *
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.
29  *
30  * @addtogroup CAPI_MAPS_PLUGIN_PLACE_IMAGE_MODULE
31  * @{
32  * @brief This provides APIs related to Place Image, used in Place
33  * Discovery and Search, needed in plug-in development.
34  */
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /**
41  * @brief Creates a new place image handle.
42  * @details This function creates a new place image handle and allocates all
43  * needed resources.
44  * @since_tizen 2.4
45  * @remarks @a image must be released using maps_place_image_destroy().
46  * \n @a image may be cloned using maps_place_image_clone().
47  *
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
53  *
54  * @see maps_place_image_destroy()
55  * @see maps_place_image_clone()
56  */
57 int maps_place_image_create(maps_place_image_h *image);
58
59 /**
60  * @brief       Sets the place image id.
61  * @details This function sets the place image id.
62  * @since_tizen 2.4
63  *
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
69  *
70  * @pre @a image is created using maps_place_image_create().
71  *
72  * @see maps_place_image_create()
73  * @see maps_place_image_get_id()
74  */
75 int maps_place_image_set_id(maps_place_image_h image, const char *id);
76
77 /**
78  * @brief       Sets the place image URL.
79  * @details This function sets the place image URL.
80  * @since_tizen 2.4
81  *
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
87  *
88  * @pre @a image is created using maps_place_image_create().
89  *
90  * @see maps_place_image_create()
91  * @see maps_place_image_get_url()
92  */
93 int maps_place_image_set_url(maps_place_image_h image, const char *url);
94
95 /**
96  * @brief       Sets the place image width.
97  * @details This function sets the place image width.
98  * @since_tizen 2.4
99  *
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
105  *
106  * @pre @a image is created using maps_place_image_create().
107  *
108  * @see maps_place_image_create()
109  * @see maps_place_image_get_width()
110  */
111 int maps_place_image_set_width(maps_place_image_h image, const int width);
112
113 /**
114  * @brief       Sets the place image height.
115  * @details This function sets the place image height.
116  * @since_tizen 2.4
117  *
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
123  *
124  * @pre @a image is created using maps_place_image_create().
125  *
126  * @see maps_place_image_create()
127  * @see maps_place_image_get_height()
128  */
129 int maps_place_image_set_height(maps_place_image_h image, const int height);
130
131 /**
132  * @brief       Sets the place image user link.
133  * @details This function sets the place image user link.
134  * @since_tizen 2.4
135  *
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
141  *
142  * @pre @a image is created using maps_place_image_create().
143  *
144  * @see maps_place_image_create()
145  * @see maps_place_image_get_user_link()
146  * @see #maps_place_link_object_h
147  */
148 int maps_place_image_set_user_link(maps_place_image_h image,
149                                    const maps_place_link_object_h user);
150
151 /**
152  * @brief       Sets the place image media.
153  * @details This function sets the place image media.
154  * @since_tizen 2.4
155  *
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
161  *
162  * @pre @a image is created using maps_place_image_create().
163  *
164  * @see maps_place_image_create()
165  * @see maps_place_image_get_media()
166  * @see #maps_place_media_h
167  */
168 int maps_place_image_set_media(maps_place_image_h image,
169                                const maps_place_media_h media);
170
171 #ifdef __cplusplus
172 }
173 #endif
174 /**
175  * @}
176  */
177 #endif                          /* __MAPS_PLACE_IMAGE_PLUGIN_H__ */