[ACR-703] Add maps feature (source files and plugin header files)
[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 @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().
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  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
54  *
55  * @see maps_place_image_destroy()
56  * @see maps_place_image_clone()
57  */
58 int maps_place_image_create(maps_place_image_h *image);
59
60 /**
61  * @brief       Sets the place image id.
62  * @details This function sets the place image id.
63  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
64  *
65  * @param[in]   image           The handle of place image
66  * @param[in]   id              The place image id
67  * @return      0 on success, otherwise a negative error value
68  * @retval      #MAPS_ERROR_NONE Successful
69  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
70  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
71  *
72  * @pre @a image is created using maps_place_image_create().
73  *
74  * @see maps_place_image_create()
75  * @see maps_place_image_get_id()
76  */
77 int maps_place_image_set_id(maps_place_image_h image, const char *id);
78
79 /**
80  * @brief       Sets the place image URL.
81  * @details This function sets the place image URL.
82  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
83  *
84  * @param[in]   image           The handle of place image
85  * @param[in]   url             The place image url
86  * @return      0 on success, otherwise a negative error value
87  * @retval      #MAPS_ERROR_NONE Successful
88  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
89  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
90  *
91  * @pre @a image is created using maps_place_image_create().
92  *
93  * @see maps_place_image_create()
94  * @see maps_place_image_get_url()
95  */
96 int maps_place_image_set_url(maps_place_image_h image, const char *url);
97
98 /**
99  * @brief       Sets the place image width.
100  * @details This function sets the place image width.
101  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
102  *
103  * @param[in]   image           The handle of place image
104  * @param[in]   width           The place image width
105  * @return      0 on success, otherwise a negative error value
106  * @retval      #MAPS_ERROR_NONE Successful
107  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
108  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
109  *
110  * @pre @a image is created using maps_place_image_create().
111  *
112  * @see maps_place_image_create()
113  * @see maps_place_image_get_width()
114  */
115 int maps_place_image_set_width(maps_place_image_h image, const int width);
116
117 /**
118  * @brief       Sets the place image height.
119  * @details This function sets the place image height.
120  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
121  *
122  * @param[in]   image           The handle of place image
123  * @param[in]   height          The place image height
124  * @return      0 on success, otherwise a negative error value
125  * @retval      #MAPS_ERROR_NONE Successful
126  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
127  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
128  *
129  * @pre @a image is created using maps_place_image_create().
130  *
131  * @see maps_place_image_create()
132  * @see maps_place_image_get_height()
133  */
134 int maps_place_image_set_height(maps_place_image_h image, const int height);
135
136 /**
137  * @brief       Sets the place image user link.
138  * @details This function sets the place image user link.
139  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
140  *
141  * @param[in]   image           The handle of place image
142  * @param[in]   user            The place image user link
143  * @return      0 on success, otherwise a negative error value
144  * @retval      #MAPS_ERROR_NONE Successful
145  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
146  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
147  *
148  * @pre @a image is created using maps_place_image_create().
149  *
150  * @see maps_place_image_create()
151  * @see maps_place_image_get_user_link()
152  * @see #maps_place_link_object_h
153  */
154 int maps_place_image_set_user_link(maps_place_image_h image,
155                                    const maps_place_link_object_h user);
156
157 /**
158  * @brief       Sets the place image media.
159  * @details This function sets the place image media.
160  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 2.3.2 @endif
161  *
162  * @param[in]   image           The handle of place image
163  * @param[in]   media           The place image media
164  * @return      0 on success, otherwise a negative error value
165  * @retval      #MAPS_ERROR_NONE Successful
166  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
167  * @retval      #MAPS_ERROR_NOT_SUPPORTED Not supported
168  *
169  * @pre @a image is created using maps_place_image_create().
170  *
171  * @see maps_place_image_create()
172  * @see maps_place_image_get_media()
173  * @see #maps_place_media_h
174  */
175 int maps_place_image_set_media(maps_place_image_h image,
176                                const maps_place_media_h media);
177
178 #ifdef __cplusplus
179 }
180 #endif
181 /**
182  * @}
183  */
184 #endif                          /* __MAPS_PLACE_IMAGE_PLUGIN_H__ */