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_PLUGIN_H__
18 #define __MAPS_PLUGIN_H__
20 #include <maps_service.h>
21 #include <maps_plugin_info.h>
22 #include <maps_extra_types.h>
26 * @ingroup CAPI_MAPS_PLUGIN_MODULE
27 * @defgroup CAPI_MAPS_PLUGIN_AND_PROVIDERS_MODULE Maps Plugin and Providers
30 * @brief This file contains the top level functions of Maps Plugin API
32 * @addtogroup CAPI_MAPS_PLUGIN_AND_PROVIDERS_MODULE
34 * @brief This provides APIs related to operations with Maps Plugins
42 * @brief The Maps Plugin handle.
43 * @details The handle of Maps Plugin instance.
46 typedef void *maps_plugin_h;
48 /*----------------------------------------------------------------------------*/
50 * Plugin dedicated functions
54 * @brief Initialize a new Maps Plugin.
55 * @details A maps plugin handle can be used to access a specified plugin.
57 * @remarks @a plugin and it resources must be released in
58 * maps_plugin_shutdown().
60 * @param[out] plugin A handle of a new plugin 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
65 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
67 * @see maps_plugin_shutdown()
69 int maps_plugin_init(maps_plugin_h *plugin);
72 * @brief Destroys the Maps Plugin handle.
73 * @details This function destroys the maps plugin handle and releases all its
77 * @param[in] plugin The maps plugin handle to destroy
78 * @return 0 on success, otherwise a negative error value
79 * @retval #MAPS_ERROR_NONE Successful
80 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
82 * @see maps_plugin_init()
84 int maps_plugin_shutdown(maps_plugin_h plugin);
87 * @brief Returns a plugin info.
88 * @details This function returns a plugin info.
91 * @param[out] info A plugin info
92 * @return 0 on success, otherwise a negative error value
93 * @retval #MAPS_ERROR_NONE Successful
94 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
95 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
96 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
98 * @see maps_plugin_init()
100 int maps_plugin_get_info(maps_plugin_info_h *info);
102 /*----------------------------------------------------------------------------*/
104 * Maps Provider access key, preference and capabilities
108 * @brief Sets the Maps Key to be used in the Maps Plugin requests.
109 * @details This function sets the Maps Key which will be used in each Maps
110 * Plugin request to Maps Provider.
112 * @remarks To obtain the @a provider_key refer to corresponding Maps Provider
114 * \n For HERE Maps refer to https://developer.here.com/,
115 * https://developer.here.com/rest-apis.
117 * @param[in] provider_key The Maps Key to be used
118 * @return 0 on success, otherwise a negative error value
119 * @retval #MAPS_ERROR_NONE Successful
120 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
121 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
123 * @see maps_plugin_get_provider_key()
125 int maps_plugin_set_provider_key(const char *provider_key);
128 * @brief Gets the Maps Key which is to be used in the Maps Service
130 * @details This function gets the Maps Key which is to be used in each Maps
131 * Service request to Maps Provider.
132 * \n Maps key can be set with maps_plugin_set_provider_key().
134 * @remarks The string @a provider_key must be released using free().
136 * @param[out] provider_key The Maps Key
137 * @return 0 on success, otherwise a negative error value
138 * @retval #MAPS_ERROR_NONE Successful
139 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
140 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
142 * @see maps_plugin_set_provider_key()
144 int maps_plugin_get_provider_key(char **provider_key);
147 * @brief Sets the Maps Preference.
148 * @details This function sets the Maps Preferences which are used in each Maps
149 * Plugin request to Maps Provider.
152 * @param[in] preference The handle of Maps Preference
153 * @return 0 on success, otherwise a negative error value
154 * @retval #MAPS_ERROR_NONE Successful
155 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
156 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
157 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
159 * @see maps_plugin_get_preference()
161 int maps_plugin_set_preference(maps_item_hashtable_h preference);
164 * @brief Gets the Maps Preference.
165 * @details This function gets the Maps Preferences which are used in each Maps
166 * Plugin request to Maps Provider.
167 * \n Preferences can be set with maps_plugin_set_preference().
169 * @remarks @a preference must be released using maps_preference_destroy().
171 * @param[out] preference The handle of Maps Preference
172 * @return 0 on success, otherwise a negative error value
173 * @retval #MAPS_ERROR_NONE Successful
174 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
175 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
177 * @see maps_plugin_set_preference()
179 int maps_plugin_get_preference(maps_item_hashtable_h *preference);
182 * @brief Checks if the Maps Plugin supports a request.
183 * @details This function checks if the Maps Plugin supports a specified
187 * @param[in] service The service to be checked
188 * @param[out] supported Is the service supported
189 * @return 0 on success, otherwise a negative error value
190 * @retval #MAPS_ERROR_NONE Successful, the service is supported
191 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
192 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
194 * @pre Call maps_service_create() to create Maps Service and obtain its handle.
196 * @see maps_service_create()
198 int maps_plugin_is_service_supported(maps_service_e service,
202 * @brief Checks if the Maps Plugin supports a data feature.
203 * @details This function checks if the Maps Plugin supports a specified data
207 * @param[in] data The data feature to be checked
208 * @param[out] supported Is the data feature supported
209 * @return 0 on success, otherwise a negative error value
210 * @retval #MAPS_ERROR_NONE Successful, the data feature is supported
211 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
212 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
214 * @pre Call maps_service_create() to create Maps Service and obtain its handle.
216 * @see maps_service_create()
218 int maps_plugin_is_data_supported(maps_service_data_e data, bool *supported);
220 /*----------------------------------------------------------------------------*/
226 * @brief Gets the position coordinates for a given address.
227 * @details This function obtains position coordinates for a given free-formed
231 * @privilege %http://tizen.org/privilege/mapservice
232 * @remarks This function requires network access.
233 * \n To cancel the request use maps_plugin_cancel_request().
235 * @param[in] address The free-formed address
236 * @param[in] preference The set of preferences for processing Geocode
237 * @param[in] callback The callback which will receive position
239 * @param[in] user_data The user data to be passed to the callback
241 * @param[out] request_id The id of request
242 * @return 0 on success, otherwise a negative error value
243 * @retval #MAPS_ERROR_NONE Successful
244 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
245 * @retval #MAPS_ERROR_NETWORK_UNREACHABLE Network connection failed
246 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
247 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
248 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
249 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
250 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
251 * @retval #MAPS_ERROR_NOT_FOUND Result not found
252 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
253 * @retval #MAPS_ERROR_UNKNOWN Unknown error
254 * @retval #MAPS_ERROR_UNKNOWN Unknown error
256 * @post It invokes maps_service_geocode_cb() to deliver obtained position
259 * @see maps_plugin_geocode_inside_area()
260 * @see maps_service_geocode_cb()
261 * @see maps_plugin_cancel_request()
262 * @see maps_plugin_reverse_geocode()
264 int maps_plugin_geocode(const char *address,
265 const maps_item_hashtable_h preference,
266 maps_service_geocode_cb callback, void *user_data,
270 * @brief Gets the position for a given address, within the specified
272 * @details This function obtains position coordinates for a given free-formed
273 * address string within the specified bounding box.
276 * @privilege %http://tizen.org/privilege/mapservice
277 * @remarks This function requires network access.
278 * \n Polygonal bounding box is not supported.
279 * \n To cancel the request use maps_plugin_cancel_request().
280 * \n To check if Maps Provider is capable of Geocoding and which Geocode
281 * preferences are supported see the lists of capacities and preferences above.
283 * @param[in] address The free-formed address
284 * @param[in] bounds The bounding box
285 * @param[in] preference The set of preferences for processing Geocode
286 * @param[in] callback The callback which will receive position
288 * @param[in] user_data The user data to be passed to the callback
290 * @param[out] request_id The id of request
291 * @return 0 on success, otherwise a negative error value
292 * @retval #MAPS_ERROR_NONE Successful
293 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
294 * @retval #MAPS_ERROR_NETWORK_UNREACHABLE Network connection failed
295 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
296 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
297 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
298 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
299 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
300 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
301 * @retval #MAPS_ERROR_NOT_FOUND Result not found
302 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
303 * @retval #MAPS_ERROR_UNKNOWN Unknown error
305 * @post It invokes maps_service_geocode_cb() to deliver obtained position
308 * @see maps_plugin_geocode_by_structured_address
309 * @see maps_plugin_geocode_inside_area()
310 * @see maps_service_geocode_cb()
311 * @see maps_plugin_geocode()
312 * @see maps_plugin_cancel_request()
313 * @see maps_plugin_reverse_geocode()
315 int maps_plugin_geocode_inside_area(const char *address,
316 const maps_area_h bounds,
317 const maps_item_hashtable_h preference,
318 maps_service_geocode_cb callback,
319 void *user_data, int *request_id);
322 * @brief Gets the position coordinates for a given address.
323 * @details This function obtains position coordinates for a given structured
327 * @privilege %http://tizen.org/privilege/mapservice
328 * @remarks This function requires network access.
329 * \n To cancel the request use maps_plugin_cancel_request().
330 * \n To check if Maps Provider is capable of Geocoding and which Geocode
331 * preferences are supported see the lists of capacities and preferences above.
333 * @param[in] address The structured address
334 * @param[in] preference The set of preferences for processing Geocode
335 * @param[in] callback The callback which will receive position
337 * @param[in] user_data The user data to be passed to the callback
339 * @param[out] request_id The id of request
340 * @return 0 on success, otherwise a negative error value
341 * @retval #MAPS_ERROR_NONE Successful
342 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
343 * @retval #MAPS_ERROR_NETWORK_UNREACHABLE Network connection failed
344 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
345 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
346 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
347 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
348 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
349 * @retval #MAPS_ERROR_NOT_FOUND Result not found
350 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
351 * @retval #MAPS_ERROR_UNKNOWN Unknown error
353 * @post It invokes maps_service_geocode_cb() to deliver obtained position
356 * @see maps_plugin_geocode()
357 * @see maps_plugin_geocode_inside_area()
358 * @see maps_service_geocode_cb()
359 * @see maps_plugin_cancel_request()
360 * @see maps_plugin_reverse_geocode()
362 int maps_plugin_geocode_by_structured_address(const maps_address_h address,
363 const maps_preference_h
365 maps_service_geocode_cb
366 callback, void *user_data,
370 * @brief Gets the address for a given position coordinates.
371 * @details This function obtains structured address information for a given
372 * position coordinates.
375 * @privilege %http://tizen.org/privilege/mapservice
376 * @remarks This function requires network access.
377 * \n To cancel the request use maps_plugin_cancel_request().
378 * \n To check if Maps Provider is capable of Reverse Geocoding and which
379 * Reverse Geocode preferences are supported see the lists of capacities and
382 * @param[in] latitude The latitude [-90.0 ~ 90.0] (degrees)
383 * @param[in] longitude The longitude [-180.0 ~ 180.0] (degrees)
384 * @param[in] preference The set of preferences for processing Reverse
386 * @param[in] callback The callback which will receive address
388 * @param[in] user_data The user data to be passed to the callback
390 * @param[out] request_id The id of request
391 * @return 0 on success, otherwise a negative error value
392 * @retval #MAPS_ERROR_NONE Successful
393 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
394 * @retval #MAPS_ERROR_NETWORK_UNREACHABLE Network connection failed
395 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
396 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
397 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
398 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
399 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
400 * @retval #MAPS_ERROR_NOT_FOUND Result not found
401 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
402 * @retval #MAPS_ERROR_UNKNOWN Unknown error
404 * @post This function invokes maps_service_reverse_geocode_cb().
406 * @see maps_service_reverse_geocode_cb()
407 * @see maps_plugin_cancel_request()
408 * @see maps_plugin_geocode()
410 int maps_plugin_reverse_geocode(double latitude, double longitude,
411 const maps_item_hashtable_h preference,
412 maps_service_reverse_geocode_cb callback,
413 void *user_data, int *request_id);
415 /*----------------------------------------------------------------------------*/
421 * @brief Queries a Place information by a coordinates position and a
423 * @details This function obtains the Place information for a specified distance
424 * around a given coordinates position.
427 * @privilege %http://tizen.org/privilege/mapservice
428 * @remarks This function requires network access.
429 * \n To cancel the search request use maps_plugin_cancel_request().
430 * \n To check if Maps Provider is capable of Place Search and which Place
431 * preferences are supported see the lists of capacities and preferences above.
433 * @param[in] position The interested position
434 * @param[in] distance The search area distance
435 * @param[in] filter The filter handle
436 * @param[in] preference The place preference handle
437 * @param[in] callback The result callback
438 * @param[in] user_data The user data to be passed to the callback
440 * @param[out] request_id A Request id, can be set to NULL if does not
441 * require operation cancel
442 * @return 0 on success, otherwise a negative error value
443 * @retval #MAPS_ERROR_NONE Successful
444 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
445 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
446 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
447 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
448 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
449 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
450 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
451 * @retval #MAPS_ERROR_NOT_FOUND Result not found
452 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
453 * @retval #MAPS_ERROR_RESOURCE_BUSY Places service busy
454 * @retval #MAPS_ERROR_CANCELED Places service aborted
455 * @retval #MAPS_ERROR_UNKNOWN Unknown error
457 * @post It invokes maps_service_search_place_cb() to deliver obtained Place
460 * @see maps_plugin_search_place_by_area()
461 * @see maps_plugin_search_place_by_address()
462 * @see maps_plugin_cancel_request()
463 * @see maps_service_search_place_cb()
465 int maps_plugin_search_place(const maps_coordinates_h position, int distance,
466 const maps_place_filter_h filter,
467 maps_preference_h preference,
468 maps_service_search_place_cb callback,
469 void *user_data, int *request_id);
472 * @brief Queries a Place information by a coordinates boundary.
473 * @details This function obtains the Place information for a specified
474 * coordinates boundary.
477 * @privilege %http://tizen.org/privilege/mapservice
478 * @remarks This function requires network access.
479 * \n @a boundary is supporting only circle type bounds for search.
480 * \n To cancel the search request use maps_plugin_cancel_request().
481 * \n To check if Maps Provider is capable of Place Search and which Place
482 * preferences are supported see the lists of capacities and preferences above.
484 * @param[in] boundary The interested area
485 * @param[in] filter The filter handle
486 * @param[in] preference The place preference handle
487 * @param[in] callback The result callback
488 * @param[in] user_data The user data to be passed to the callback
490 * @param[out] request_id A Request id, can be set to NULL if does not
491 * required operation cancel
492 * @return 0 on success, otherwise a negative error value
493 * @retval #MAPS_ERROR_NONE Successful
494 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
495 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
496 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
497 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
498 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
499 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
500 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
501 * @retval #MAPS_ERROR_NOT_FOUND Result not found
502 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
503 * @retval #MAPS_ERROR_RESOURCE_BUSY Places service busy
504 * @retval #MAPS_ERROR_CANCELED Places service aborted
505 * @retval #MAPS_ERROR_UNKNOWN Unknown error
507 * @post It invokes maps_service_search_place_cb() to deliver obtained Place
510 * @see maps_plugin_search_place()
511 * @see maps_plugin_search_place_by_address()
512 * @see maps_plugin_cancel_request()
513 * @see maps_service_search_place_cb()
515 int maps_plugin_search_place_by_area(const maps_area_h boundary,
516 const maps_place_filter_h filter,
517 maps_preference_h preference,
518 maps_service_search_place_cb callback,
519 void *user_data, int *request_id);
522 * @brief Queries a Place information by a free-formed address string.
523 * @details This function obtains the Place information for a specified free-
524 * formed address string.
527 * @privilege %http://tizen.org/privilege/mapservice
528 * @remarks This function requires network access.
529 * \n @a boundary is supporting only circle type bounds for search.
530 * \n To cancel the search request use maps_plugin_cancel_request().
531 * \n To check if Maps Provider is capable of Place Search and which Place
532 * preferences are supported see the lists of capacities and preferences above.
534 * @param[in] address The interested address
535 * @param[in] boundary The interested area
536 * @param[in] filter The filter handle
537 * @param[in] preference The place preference handle
538 * @param[in] callback The result callback
539 * @param[in] user_data The user data to be passed to the callback
541 * @param[out] request_id A Request id, can be set to NULL if does not
542 * required operation cancel
543 * @return 0 on success, otherwise a negative error value
544 * @retval #MAPS_ERROR_NONE Successful
545 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
546 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
547 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
548 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
549 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
550 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
551 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
552 * @retval #MAPS_ERROR_NOT_FOUND Result not found
553 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
554 * @retval #MAPS_ERROR_RESOURCE_BUSY Places service busy
555 * @retval #MAPS_ERROR_CANCELED Places service aborted
556 * @retval #MAPS_ERROR_UNKNOWN Unknown error
558 * @post It invokes maps_service_search_place_cb() to deliver obtained Place
561 * @see maps_plugin_search_place()
562 * @see maps_plugin_search_place_by_area()
563 * @see maps_plugin_cancel_request()
564 * @see maps_service_search_place_cb()
566 int maps_plugin_search_place_by_address(const char *address,
567 const maps_area_h boundary,
568 const maps_place_filter_h filter,
569 maps_preference_h preference,
570 maps_service_search_place_cb callback,
571 void *user_data, int *request_id);
573 /*----------------------------------------------------------------------------*/
579 * @brief Queries the Route from origin coordinate to a destination.
580 * @details This function obtains the Route information for a specified origin
581 * and destination coordinates.
584 * @privilege %http://tizen.org/privilege/mapservice
585 * @remarks This function requires network access.
586 * \n To cancel the search request use maps_plugin_cancel_request().
587 * \n To check if Maps Provider is capable of Route Search and which Route
588 * preferences are supported see the lists of capacities and preferences above.
590 * @param[in] origin The starting point
591 * @param[in] destination The destination
592 * @param[in] preference The Route preference handle
593 * @param[in] callback The result callback
594 * @param[in] user_data The user data to be passed to the callback
596 * @param[out] request_id The request ID
597 * @return 0 on success, otherwise a negative error value
598 * @retval #MAPS_ERROR_NONE Successful
599 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
600 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
601 * @retval #MAPS_ERROR_NOT_SUPPORTED Service unavailable
602 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
603 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
604 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
605 * @retval #MAPS_ERROR_NOT_FOUND Result not found
606 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
607 * @retval #MAPS_ERROR_UNKNOWN Unknown error
609 * @post It invokes maps_service_search_route_cb() to deliver obtained Route
612 * @see maps_plugin_search_route_waypoints()
613 * @see maps_plugin_cancel_request()
614 * @see maps_service_search_route_cb()
616 int maps_plugin_search_route(const maps_coordinates_h origin,
617 const maps_coordinates_h destination,
618 maps_preference_h preference,
619 maps_service_search_route_cb callback,
620 void *user_data, int *request_id);
623 * @brief Queries the Route, passing through a specified way points.
624 * @details This function obtains the Route information for the Route, passing
625 * through a specified set of way points.
628 * @privilege %http://tizen.org/privilege/mapservice
629 * @remarks This function requires network access.
630 * \n To cancel the search request use maps_plugin_cancel_request().
631 * \n To check if Maps Provider is capable of Route Search and which Route
632 * preferences are supported see the lists of capacities and preferences above.
634 * @param[in] waypoint_list The list of way points to go through
635 * @param[in] waypoint_num The number of way points to go through
636 * @param[in] preference The Route preference handle
637 * @param[in] callback The result callback
638 * @param[in] user_data The user data to be passed to the callback
640 * @param[out] request_id The request ID
641 * @return 0 on success, otherwise a negative error value
642 * @retval #MAPS_ERROR_NONE Successful
643 * @retval #MAPS_ERROR_OUT_OF_MEMORY Out of memory
644 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
645 * @retval #MAPS_ERROR_NOT_SUPPORTED Service unavailable
646 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
647 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
648 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
649 * @retval #MAPS_ERROR_NOT_FOUND Result not found
650 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
651 * @retval #MAPS_ERROR_UNKNOWN Unknown error
653 * @post It invokes maps_service_search_route_cb() to deliver obtained Route
656 * @see maps_plugin_search_route()
657 * @see maps_plugin_cancel_request()
658 * @see maps_service_search_route_cb()
660 int maps_plugin_search_route_waypoints(const maps_coordinates_h *waypoint_list,
662 maps_preference_h preference,
663 maps_service_search_route_cb callback,
664 void *user_data, int *request_id);
666 /*----------------------------------------------------------------------------*/
672 * @brief Cancels the service request.
673 * @details This function cancels the service request initiated by geocode,
674 * route or place search.
677 * @privilege %http://tizen.org/privilege/mapservice
678 * @remarks This function requires network access.
680 * @param[in] request_id The id of request
681 * @return 0 on success, otherwise a negative error value
682 * @retval #MAPS_ERROR_NONE Successful
683 * @retval #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
684 * @retval #MAPS_ERROR_NETWORK_UNREACHABLE Network connection failed
685 * @retval #MAPS_ERROR_SERVICE_NOT_AVAILABLE Service not available
686 * @retval #MAPS_ERROR_PERMISSION_DENIED Permission Denied
687 * @retval #MAPS_ERROR_NOT_SUPPORTED Not supported
688 * @retval #MAPS_ERROR_CONNECTION_TIME_OUT Timeout error, no answer
689 * @retval #MAPS_ERROR_INVALID_OPERATION Operation is not valid
690 * @retval #MAPS_ERROR_NOT_FOUND Result not found
691 * @retval #MAPS_ERROR_KEY_NOT_AVAILABLE Invalid key
692 * @retval #MAPS_ERROR_UNKNOWN Unknown error
694 * @pre @a request_id is obtained from one of following:
695 * - maps_plugin_geocode()
696 * - maps_plugin_geocode_inside_area()
697 * - maps_plugin_geocode_by_structured_address()
698 * - maps_plugin_reverse_geocode()
699 * - maps_plugin_search_place()
700 * - maps_plugin_search_place_by_area()
701 * - maps_plugin_search_place_by_address()
702 * - maps_plugin_search_route()
703 * - maps_plugin_search_route_waypoints()
706 * @see maps_plugin_geocode()
707 * @see maps_plugin_geocode_inside_area()
708 * @see maps_plugin_geocode_by_structured_address()
709 * @see maps_plugin_reverse_geocode()
710 * @see maps_plugin_search_place()
711 * @see maps_plugin_search_place_by_area()
712 * @see maps_plugin_search_place_by_address()
713 * @see maps_plugin_search_route()
714 * @see maps_plugin_search_route_waypoints()
716 int maps_plugin_cancel_request(int request_id);
724 #endif /* __MAPS_PLUGIN_H__ */