Release Tizen2.0 beta
[platform/core/location/lbs-location.git] / location / map-service / location-route-ext.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __LOCATION_ROUTE_EXT_H__
23 #define __LOCATION_ROUTE_EXT_H__
24
25 #include <location-map-types.h>
26
27 G_BEGIN_DECLS
28
29 /**
30  * @file location-route-ext.h
31  * @brief This file contains the extensional definitions and structures related to Route.
32  */
33 /**
34  * @addtogroup LocationMapServiceRoute
35  * @{
36  * @defgroup LocationMapServiceRouteExt Location Route Ext
37  * @brief This provides Location Route Ext APIs.
38  * @addtogroup LocationMapServiceRouteExt
39  * @{
40  */
41
42 /**
43  * @brief Set the origin #LocationPosition of #LocationRoute
44  * @remarks The service provider should support route service.\n
45  *      The previous origin of the #LocationRoute will be removed if an origin is NULL.
46  * @pre None.
47  * @post None.
48  * @param [in] route - a #LocationRoute
49  * @param [in] origin - a #LocationPosition
50  * @return gboolean
51  * @retval  TRUE if success
52  * @see location_route_get_origin
53  */
54 gboolean location_route_set_origin (LocationRoute *route, const LocationPosition* origin);
55
56 /**
57  * @brief Set the destication #LocationPosition of #LocationRoute
58  * @remarks The service provider should support route service.\n
59  *      The previous destination of the #LocationRoute will be removed if an destination is NULL.
60  * @pre None.
61  * @post None.
62  * @param [in] route - a #LocationRoute
63  * @param [in] destination - a #LocationPosition
64  * @return gboolean
65  * @retval  TRUE if success
66  * @see location_route_get_destination
67  */
68 gboolean location_route_set_destination (LocationRoute *route, const LocationPosition* destination);
69
70 /**
71  * @brief Set the bounding box #LocationBoundary of #LocationRoute
72  * @remarks The service provider should support route service.\n
73  *      The previous bbox of the #LocationRoute will be removed if an bbox is NULL.
74  * @pre None.
75  * @post None.
76  * @param [in] route - a #LocationRoute
77  * @param [in] bbox - a #LocationBoundary
78  * @return gboolean
79  * @retval  TRUE if success
80  * @see location_route_get_bounding_box
81  */
82 gboolean location_route_set_bounding_box (LocationRoute *route, const LocationBoundary* bbox);
83 /**
84  * @brief Set the distance of #LocationRoute
85  * @remarks The service provider should support route service.
86  * @pre None.
87  * @post None.
88  * @param [in] route - a #LocationRoute
89  * @param [in] total_distance - gdouble
90  * @return gboolean
91  * @retval  TRUE if success
92  * @see location_route_get_total_distance
93  */
94 gboolean location_route_set_total_distance (LocationRoute *route, gdouble total_distance);
95
96 /**
97  * @brief Set the distance unit of #LocationRoute
98  * @remarks The service provider should support route service.\n
99  *      The previous distance unit of the #LocationRoute will be removed if an distance_unit is NULL.
100  * @pre None.
101  * @post None.
102  * @param [in] route - a #LocationRoute
103  * @param [in] distance_unit - gchar
104  * @return gboolean
105  * @retval  TRUE if success
106  * @see location_route_get_distance_unit
107  */
108 gboolean location_route_set_distance_unit (LocationRoute *route, const gchar* distance_unit);
109
110 /**
111  * @brief Set the duration of #LocationRoute
112  * @remarks The service provider should support route service.
113  * @pre None.
114  * @post None.
115  * @param [in] route - a #LocationRoute
116  * @param [in] total_duration - glong
117  * @return gboolean
118  * @retval  TRUE if success
119  * @see location_route_get_total_duration
120  */
121 gboolean location_route_set_total_duration (LocationRoute *route, glong total_duration);
122
123 /**
124  * @brief Set the propery value of #LocationRoute
125  * @remarks The service provider should support route service.\n
126  *      The previous value of the #LocationRoute matching to key will be removed if an value is NULL.
127  * @pre None.
128  * @post None.
129  * @param [in] route - a #LocationRoute
130  * @param [in] key - gconstpointer
131  * @param [in] value - gconstpointer
132  * @return gboolean
133  * @retval  TRUE if success
134  * @see location_route_get_property
135  */
136 gboolean location_route_set_property (LocationRoute *route, gconstpointer key, gconstpointer value);
137
138 /**
139  * @brief Set the list of segments #LocationRouteSegment of #LocationRoute
140  * @remarks The service provider should support route service.\n
141  *      The previous route segment of the #LocationRoute will be removed if an segment is NULL.
142  * @pre None.
143  * @post None.
144  * @param [in] route - a #LocationRoute
145  * @param [in] segment - a list of #LocationRouteSegment
146  * @return gboolean
147  * @retval  TRUE if success
148  * @see location_route_get_route_segment
149  */
150 gboolean location_route_set_route_segment (LocationRoute *route, GList* segment);
151
152 /**
153  * @brief Set the start point #LocationPosition of #LocationRouteSegment
154  * @remarks The service provider should support route service.\n
155  *      The previous start point of the #LocationRouteSegment will be removed if a start is NULL.
156  * @pre None.
157  * @post None.
158  * @param [in] segment - a #LocationRouteSegment
159  * @param [in] start - a #LocationPosition
160  * @return gboolean
161  * @retval  TRUE if success
162  * @see location_route_segment_get_start_point
163  */
164 gboolean location_route_segment_set_start_point (LocationRouteSegment *segment, const LocationPosition *start);
165
166 /**
167  * @brief Set the end point #LocationPosition of #LocationRouteSegment
168  * @remarks The service provider should support route service.\n
169  *      The previous end point of the #LocationRouteSegment will be removed if an end is NULL.
170  * @pre None.
171  * @post None.
172  * @param [in] segment - a #LocationRouteSegment
173  * @param [in] end - a #LocationPosition
174  * @return gboolean
175  * @retval  TRUE if success
176  * @see location_route_segment_get_end_point
177  */
178 gboolean location_route_segment_set_end_point (LocationRouteSegment *segment, const LocationPosition *end);
179
180 /**
181  * @brief Set the bounding box #LocationBoundary of #LocationRouteSegment
182  * @remarks The service provider should support route service.\n
183  *      The previous bbox of the #LocationRouteSegment will be removed if a bbox is NULL.
184  * @pre None.
185  * @post None.
186  * @param [in] segment - a #LocationRouteSegment
187  * @param [in] bbox - a #LocationBoundary
188  * @return gboolean
189  * @retval  TRUE if success
190  * @see location_route_segment_get_bounding_box
191  */
192 gboolean location_route_segment_set_bounding_box (LocationRouteSegment *segment, const LocationBoundary *bbox);
193
194 /**
195  * @brief Set the distance of #LocationRouteSegment
196  * @remarks The service provider should support route service.
197  * @pre None.
198  * @post None.
199  * @param [in] segment - a #LocationRouteSegment
200  * @param [in] distance - gdouble
201  * @return gboolean
202  * @retval  TRUE if success
203  * @see location_route_segment_get_distance
204  */
205 gboolean location_route_segment_set_distance (LocationRouteSegment *segment, gdouble distance);
206
207 /**
208  * @brief Set the duration of #LocationRouteSegment
209  * @remarks The service provider should support route service.
210  * @pre None.
211  * @post None.
212  * @param [in] segment - a #LocationRouteSegment
213  * @param [in] duration - glong
214  * @return gboolean
215  * @retval  TRUE if success
216  * @see location_route_segment_get_duration
217  */
218 gboolean location_route_segment_set_duration (LocationRouteSegment *segment, glong duration);
219
220 /**
221  * @brief Set the property value of #LocationRouteSegment
222  * @remarks The service provider should support route service.\n
223  *      The previous value of the LocationRouteSegment matching to key will be removed if a value is NULL.
224  * @pre None.
225  * @post None.
226  * @param [in] segment - a #LocationRouteSegment
227  * @param [in] key - gconstpointer
228  * @param [in] value - gconstpointer
229  * @return gboolean
230  * @retval  TRUE if success
231  * @see location_route_segment_get_property
232  */
233 gboolean location_route_segment_set_property (LocationRouteSegment *segment, gconstpointer key, gconstpointer value);
234
235 /**
236  * @brief Set the list of route steps #LocationRouteStep in #LocationRouteSegment
237  * @remarks The service provider should support route service.\n
238  *      The previous route step of the #LocationRouteSegment will be removed if a step is NULL.
239  * @pre None.
240  * @post None.
241  * @param [in] segment - a #LocationRouteSegment
242  * @param [in] step - a list of #locationRouteStep
243  * @return gboolean
244  * @retval  TRUE if success
245  * @see location_route_segment_get_route_step
246  */
247 gboolean location_route_segment_set_route_step (LocationRouteSegment *segment, GList* step);
248
249 /**
250  * @brief Set the start point #LocationPosition of #LocationRouteStep
251  * @remarks The service provider should support route service.\n
252  *      The previous start point of the #LocationRouteStep will be removed if a start is NULL.
253  * @pre None.
254  * @post None.
255  * @param [in] step - a #LocationRouteStep
256  * @param [in] start - a #LocationPosition
257  * @return gboolean
258  * @retval  TRUE if success
259  * @see location_route_step_get_start_point
260  */
261 gboolean location_route_step_set_start_point (LocationRouteStep *step, const LocationPosition *start);
262
263 /**
264  * @brief Set the end point #LocationPosition of #LocationRouteStep
265  * @remarks The service provider should support route service.\n
266  *      The previous end point of the #LocationRouteStep will be removed if an end is NULL.
267  * @pre None.
268  * @post None.
269  * @param [in] step - a #LocationRouteStep
270  * @param [in] end - a #LocationPosition
271  * @return gboolean
272  * @retval  TRUE if success
273  * @see location_route_step_get_end_point
274  */
275 gboolean location_route_step_set_end_point (LocationRouteStep *step, const LocationPosition *end);
276
277 /**
278  * @brief Set the bounding box #LocationBoundary of #LocationRouteStep
279  * @remarks The service provider should support route service.\n
280  *      The previous bbox of the #LocationRouteStep will be removed if a bbox is NULL.
281  * @pre None.
282  * @post None.
283  * @param [in] step - a #LocationRouteStep
284  * @param [in] bbox - a #LocationBoundary
285  * @return gboolean
286  * @retval  TRUE if success
287  * @see location_route_step_get_bounding_box
288  */
289 gboolean location_route_step_set_bounding_box (LocationRouteStep *step, const LocationBoundary *bbox);
290
291 /**
292  * @brief Set the distance of #LocationRouteStep
293  * @remarks The service provider should support route service.
294  * @pre None.
295  * @post None.
296  * @param [in] step - a #LocationRouteStep
297  * @param [in] distance - gdouble
298  * @return gboolean
299  * @retval  TRUE if success
300  * @see location_route_step_get_distance
301  */
302 gboolean location_route_step_set_distance (LocationRouteStep *step, gdouble distance);
303
304 /**
305  * @brief Set the duration of #LocationRouteStep
306  * @remarks The service provider should support route service.
307  * @pre None.
308  * @post None.
309  * @param [in] step - a #LocationRouteStep
310  * @param [in] duration - glong
311  * @return gboolean
312  * @retval  TRUE if success
313  * @see location_route_step_get_duration
314  */
315 gboolean location_route_step_set_duration (LocationRouteStep *step, glong duration);
316
317 /**
318  * @brief Set the transport mode of #LocationRouteStep
319  * @remarks The service provider should support route service.\n
320  *      The previous transport mode of the #LocationRouteStep will be removed if a transport_mode is NULL.
321  * @pre None.
322  * @post None.
323  * @param [in] step - a #LocationRouteStep
324  * @param [in] transport_mode - gchar
325  * @return gboolean
326  * @retval  TRUE if success
327  * @see location_route_step_get_transport_mode
328  */
329 gboolean location_route_step_set_transport_mode (LocationRouteStep *step, const gchar *transport_mode);
330
331 /**
332  * @brief Set the instruction of #LocationRouteStep
333  * @remarks The service provider should support route service.\n
334  *      The previous instruction of the #LocationRouteStep will be removed if an instruction is NULL.
335  * @pre None.
336  * @post None.
337  * @param [in] step - a #LocationRouteStep
338  * @param [in] instruction - gchar
339  * @return gboolean
340  * @retval  TRUE if success
341  * @see location_route_step_get_instruction
342  */
343 gboolean location_route_step_set_instruction (LocationRouteStep *step, const gchar *instruction);
344
345 /**
346  * @brief Set the list of geometry #LocationPosition in #LocationRouteStep
347  * @remarks The service provider should support route service.\n
348  *      The previous geometry of the #LocationRouteStep will be removed if a geometry is NULL.
349  * @pre None.
350  * @post None.
351  * @param [in] step - a #LocationRouteStep
352  * @param [in] geometry - a list of #LocationPosition
353  * @return gboolean
354  * @retval  TRUE if success
355  * @see location_route_step_get_geometry
356  */
357 gboolean location_route_step_set_geometry (LocationRouteStep *step, GList *geometry);
358
359 /**
360  * @brief Set the property value of #LocationRouteStep
361  * @remarks The service provider should support route service.\n
362  *      The previous value of the #LocationRouteStep will be removed if a value is NULL.
363  * @pre None.
364  * @post None.
365  * @param [in] step - a #LocationRouteStep
366  * @param [in] key - gconstpointer
367  * @param [in] value - gconstpointer
368  * @return gboolean
369  * @retval  TRUE if success
370  * @see location_route_step_get_property
371  */
372 gboolean location_route_step_set_property (LocationRouteStep *step, gconstpointer key, gconstpointer value);
373
374 /**
375   * @} @}
376   */
377
378 G_END_DECLS
379
380 #endif