Tizen 2.4.0 rev3 SDK Public Release
[framework/location/maps-service.git] / include / maps_preference.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_PREFERENCE_H__
18 #define __MAPS_PREFERENCE_H__
19
20 #include <tizen_type.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @ingroup             CAPI_MAPS_SERVICE_MODULE
28  * @defgroup    CAPI_MAPS_PREFERENCE_MODULE Preference
29  *
30  * @file maps_preference.h
31  * @brief This file contains the enumerations of Maps API preferences
32  *
33  * @addtogroup CAPI_MAPS_PREFERENCE_MODULE
34  * @{
35  * @brief This provides enumerations of Maps API preferences
36
37 * - - - - - - - - - - - - -
38 *
39 * Preference key names
40 * --------------------
41 *
42 * The Preferences are organized as a key-value table where available Preference
43 * keys are following strings:
44 *
45 * * Place search preferences
46 *  - MAPS_PLACE_FILTER_TYPE
47 *  - MAPS_PLACE_FILTER_SORT_BY
48 *
49 * * Route search preferences
50 *  - MAPS_ROUTE_FREEFORM_ADDR_TO_AVOID
51 *  - MAPS_ROUTE_STRUCTED_ADDR_TO_AVOID
52 *  - MAPS_ROUTE_CIRCLE_AREA_TO_AVOID
53 *  - MAPS_ROUTE_RECT_AREA_TO_AVOID
54 *
55 *  - MAPS_ROUTE_GEOMETRY_BOUNDING_BOX
56 *  - MAPS_ROUTE_GEOMETRY_RETRIEVAL
57 *  - MAPS_ROUTE_INSTRUCTION_GEOMETRY
58 *  - MAPS_ROUTE_INSTRUCTION_BOUNDING_BOX
59 *  - MAPS_ROUTE_INSTRUCTION_RETRIEVAL
60 *  - MAPS_ROUTE_REALTIME_TRAFFIC
61 *  .
62 * .
63 */
64
65 /**
66  * @brief       The name of the preference indicating place type while searching
67  * the place
68  * @since_tizen 2.4
69  */
70 #define MAPS_PLACE_FILTER_TYPE  "MAPS_PLACE_FILTER_TYPE"
71
72 /**
73  * @brief       The name of the preference indicating sorting key while
74  * searching the place
75  * @since_tizen 2.4
76  */
77 #define MAPS_PLACE_FILTER_SORT_BY "MAPS_PLACE_FILTER_SORT_BY"
78
79 /**
80  * @brief       The name of the preference indicating free-form address to avoid
81  * while computing the route
82  * @since_tizen 2.4
83  */
84 #define MAPS_ROUTE_FREEFORM_ADDR_TO_AVOID "MAPS_ROUTE_FREEFORM_ADDR_TO_AVOID"
85
86 /**
87  * @brief       The name of the preference indicating structured address to
88  * avoid while computing the route
89  * @since_tizen 2.4
90  */
91 #define MAPS_ROUTE_STRUCTED_ADDR_TO_AVOID "MAPS_ROUTE_STRUCTED_ADDR_TO_AVOID"
92
93 /**
94  * @brief       The name of the preference indicating circular geographical area
95  * to avoid while computing the route
96  * @since_tizen 2.4
97  */
98 #define MAPS_ROUTE_CIRCLE_AREA_TO_AVOID "MAPS_ROUTE_CIRCLE_AREA_TO_AVOID"
99
100 /**
101  * @brief       The name of the preference indicating rectangular geographical
102  * area to avoid while computing the route
103  * @since_tizen 2.4
104  */
105 #define MAPS_ROUTE_RECT_AREA_TO_AVOID "MAPS_ROUTE_RECT_AREA_TO_AVOID"
106
107 /**
108  * @brief       The name of the preference indicating that route should be
109  * computed within a specified bounding box
110  * @since_tizen 2.4
111  */
112 #define MAPS_ROUTE_GEOMETRY_BOUNDING_BOX "MAPS_ROUTE_GEOMETRY_BOUNDING_BOX"
113
114 /**
115  * @brief       The name of the preference indicating that geometry parameters
116  * should be retrieved while route processing
117  * @since_tizen 2.4
118  */
119 #define MAPS_ROUTE_GEOMETRY_RETRIEVAL "MAPS_ROUTE_GEOMETRY_RETRIEVAL"
120
121 /**
122  * @brief       The name of the preference indicating that route should be
123  * computed with geometry instructions
124  * @since_tizen 2.4
125  */
126 #define MAPS_ROUTE_INSTRUCTION_GEOMETRY "MAPS_ROUTE_INSTRUCTION_GEOMETRY"
127
128 /**
129  * @brief       The name of the preference indicating that route should be
130  * computed with bounding box instructions
131  * @since_tizen 2.4
132  */
133 #define MAPS_ROUTE_INSTRUCTION_BOUNDING_BOX "MAPS_ROUTE_INSTRUCTION_BOUNDING_BOX"
134
135 /**
136  * @brief       The name of the preference indicating that route should be
137  * computed correspondingly to retrieval instructions
138  * @since_tizen 2.4
139  */
140 #define MAPS_ROUTE_INSTRUCTION_RETRIEVAL "MAPS_ROUTE_INSTRUCTION_RETRIEVAL"
141
142 /**
143  * @brief       The name of the preference indicating that route should be
144  * computed in accordance to real time traffic
145  * @since_tizen 2.4
146  */
147 #define MAPS_ROUTE_REALTIME_TRAFFIC "MAPS_ROUTE_REALTIME_TRAFFIC"
148
149 /**
150  * @brief       The Maps Preference handle.
151  * @details The Maps Preference handle can be obtained via call of
152  * maps_preference_create().
153  * @since_tizen 2.4
154  * \n To release the handle use maps_preference_destroy().
155  * \n To clone the handle use maps_preference_clone().
156  * @since_tizen 2.4
157  *
158  * @see maps_preference_create()
159  * @see maps_preference_destroy()
160  * @see maps_preference_clone()
161  */
162 typedef void *maps_preference_h;
163
164 /**
165  * @brief       Enumeration of allowed distance units.
166  * @details This enumeration represents allowed distance units used in Maps
167  * Services.
168  * \n This enumeration is used in #maps_area_s.
169  * @since_tizen 2.4
170  *
171  * @see #maps_preference_h
172  */
173 typedef enum _maps_distance_unit_e {
174         MAPS_DISTANCE_UNIT_M,   /**< for Meter */
175         MAPS_DISTANCE_UNIT_KM,  /**< for Kilometer */
176         MAPS_DISTANCE_UNIT_FT,  /**< for Foot */
177         MAPS_DISTANCE_UNIT_YD   /**< for Yard */
178 } maps_distance_unit_e;
179
180 /**
181  * @brief       Enumeration of allowed route optimization option.
182  * @details This enumeration represents allowed route optimization option used
183  * in Route Service.
184  * \n This enumeration is used in #maps_area_s.
185  * @since_tizen 2.4
186  *
187  * @see #_maps_route_transport_mode_e
188  * @see #_maps_route_feature_weight_e
189  * @see #_maps_route_request_feature_e
190  */
191 typedef enum _maps_route_optimization_e {
192
193         MAPS_ROUTE_TYPE_FASTEST, /**< Indicates the fastest route */
194
195         MAPS_ROUTE_TYPE_SHORTEST, /**< Indicates the shortest route
196                                     (car mode only) */
197
198         MAPS_ROUTE_TYPE_ECONOMIC, /**< Indicates the most economic route
199                                     (car mode only) */
200
201         MAPS_ROUTE_TYPE_SCENIC, /**< Indicates the most scenic route */
202
203         MAPS_ROUTE_TYPE_FASTESTNOW, /**< Indicates the most fastest route now */
204
205         MAPS_ROUTE_TYPE_DIRECTDRIVE /**< Indicates direct drive */
206
207 } maps_route_optimization_e;
208
209 /**
210  * @brief       Enumeration of preferable route types.
211  * @details This enumeration represents allowed route types used in Route
212  * Service.
213  * \n This enumeration is used in #maps_area_s.
214  * @since_tizen 2.4
215  *
216  * @see #_maps_distance_unit_e
217  * @see #_maps_route_feature_weight_e
218  * @see #_maps_route_request_feature_e
219  */
220 typedef enum _maps_route_transport_mode_e {
221
222         MAPS_ROUTE_TRANSPORT_MODE_CAR, /**< Indicates that the route is to be
223                                          traveled by car. */
224
225         MAPS_ROUTE_TRANSPORT_MODE_PEDESTRIAN, /**< Indicates that the route is
226                                                 for a pedestrian. */
227
228         MAPS_ROUTE_TRANSPORT_MODE_BICYCLE, /**< Indicates that the route is for
229                                              a cyclist. */
230
231         MAPS_ROUTE_TRANSPORT_MODE_PUBLICTRANSIT, /**< Indicates that the route
232                                                    is to be traveled  using
233                                                    public transport. */
234
235         MAPS_ROUTE_TRANSPORT_MODE_TRUCK /**< Indicates that the route is for a
236                                           truck. */
237 } maps_route_transport_mode_e;
238
239 /**
240  * @brief       Enumeration of route feature weights.
241  * @details This enumeration represents allowed route feature weights used in
242  * Route Service.
243  * \n This enumeration is used in #maps_area_s.
244  * @since_tizen 2.4
245  *
246  * @see #_maps_distance_unit_e
247  * @see #_maps_route_transport_mode_e
248  * @see #_maps_route_request_feature_e
249  */
250 typedef enum _maps_route_feature_weight_e {
251
252         MAPS_ROUTE_FEATURE_WEIGHT_NORMAL, /**< Indicates normal weighting. */
253
254         MAPS_ROUTE_FEATURE_WEIGHT_PREFER, /**< Indicates that a feature is
255                                             preferred. */
256
257         MAPS_ROUTE_FEATURE_WEIGHT_AVOID, /**< Indicates that a feature is to be
258                                            avoided. */
259
260         MAPS_ROUTE_FEATURE_WEIGHT_SOFTEXCLUDE, /**< Indicates that soft-exclude
261                                                  applies to the feature. */
262
263         MAPS_ROUTE_FEATURE_WEIGHT_STRICTEXCLUDE /**< Indicates that the feature
264                                                   is to be strictly excluded. */
265 } maps_route_feature_weight_e;
266
267 /**
268  * @brief       Enumeration of route features.
269  * @details This enumeration represents allowed route features used in Route
270  * Service.
271  * \n This enumeration is used in #maps_area_s.
272  * @since_tizen 2.4
273  *
274  * @see #_maps_distance_unit_e
275  * @see #_maps_route_transport_mode_e
276  * @see #_maps_route_feature_weight_e
277  */
278 typedef enum _maps_route_request_feature_e {
279
280         MAPS_ROUTE_FEATURE_NO, /**< Indicates no route features
281                                   (are selected). */
282
283         MAPS_ROUTE_FEATURE_TOLL, /**< Indicates toll roads
284                                    (toll gates/booths). */
285
286         MAPS_ROUTE_FEATURE_MOTORWAY, /**< Indicates motorway. */
287
288         MAPS_ROUTE_FEATURE_BOATFERRY, /**< Indicates a boat ferry. */
289
290         MAPS_ROUTE_FEATURE_RAILFERRY, /**< Indicates rail (train) ferry. */
291
292         MAPS_ROUTE_FEATURE_PUBLICTTRANSIT, /**< Indicates public transport. */
293
294         MAPS_ROUTE_FEATURE_TUNNEL, /**< Indicates tunnel. */
295
296         MAPS_ROUTE_FEATURE_DIRTROAD, /**< Indicates dirt road. */
297
298         MAPS_ROUTE_FEATURE_PARKS, /**< Indicates park. */
299
300         MAPS_ROUTE_FEATURE_HOVLANE, /**< Indicates a high-occupancy vehicle
301                                       lane. */
302
303         MAPS_ROUTE_FEATURE_STAIRS /**< Indicates stairs. */
304 } maps_route_feature_e;
305
306 /*----------------------------------------------------------------------------*/
307
308 /**
309  * @brief       Called when requesting the list of Maps Properties.
310  * @details This callback is invoked while iterating through the list of Maps
311  * Properties.
312  * @since_tizen 2.4
313  * @remarks @a key and @a value must be released using free() and corresponding
314  * release method for property value correspondingly.
315  *
316  * @param[in]   index           The current index of property
317  * @param[in]   total           The total amount of properties
318  * @param[in]   key             The key of property
319  * @param[in]   value           The value of property
320  * @param[in]   user_data       The user data passed from
321  * maps_preference_foreach_property()
322  * @return      @c true to continue with the next iteration of the loop, \n @c
323  * false to break out of the loop
324  *
325  * @pre maps_preference_foreach_property() will invoke this callback.
326  *
327  * @see maps_preference_foreach_property()
328  */
329 typedef bool(*maps_preference_properties_cb) (int index, int total, char *key,
330                                               char *value, void *user_data);
331
332 /*----------------------------------------------------------------------------*/
333
334 /**
335  * @brief       Creates a new maps preference handle.
336  * @details This function creates a new maps preference handle and allocates all
337  * needed resources.
338  * @since_tizen 2.4
339  * @remarks @a preference must be released using maps_preference_destroy().
340  * \n @a preference may be cloned using maps_preference_clone().
341  *
342  * @param[out]  preference      A newly created preference handle
343  * @return      0 on success, otherwise a negative error value
344  * @retval      #MAPS_ERROR_NONE Successful
345  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
346  * @retval      #MAPS_ERROR_OUT_OF_MEMORY Out of memory
347  *
348  * @see maps_preference_destroy()
349  * @see maps_preference_clone()
350  */
351 int maps_preference_create(maps_preference_h *preference);
352
353 /**
354  * @brief       Destroys the maps preference handle and releases all its
355  * resources.
356  * @details This function destroys the maps preference handle and releases all
357  * its resources.
358  * @since_tizen 2.4
359  *
360  * @param[in]   preference      The preference handle
361  * @return      0 on success, otherwise a negative error value
362  * @retval      #MAPS_ERROR_NONE Successful
363  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
364  *
365  * @see maps_preference_clone()
366  */
367 int maps_preference_destroy(maps_preference_h preference);
368
369 /**
370  * @brief       Clones the maps preference handle.
371  * @details This function clones the maps preference handle @a origin and all
372  * its resources.
373  * @since_tizen 2.4
374  * @remarks @a cloned must be released using maps_preference_destroy().
375  *
376  * @param[in]   origin          The original preference handle
377  * @param[out]  cloned          A cloned preference handle
378  * @return      0 on success, otherwise a negative error value
379  * @retval      #MAPS_ERROR_NONE Successful
380  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
381  * @retval      #MAPS_ERROR_OUT_OF_MEMORY Out of memory
382  *
383  * @see maps_preference_destroy()
384  */
385 int maps_preference_clone(const maps_preference_h origin,
386                           maps_preference_h *cloned);
387
388 /*----------------------------------------------------------------------------*/
389
390 /**
391  * @brief       Gets the distance unit.
392  * @details This function gets the maps distance unit.
393  * @since_tizen 2.4
394  *
395  * @param[in]   preference      The preference handle
396  * @param[out]  unit    The distance unit
397  * @return      0 on success, otherwise a negative error value
398  * @retval      #MAPS_ERROR_NONE Successful
399  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
400  */
401 int maps_preference_get_distance_unit(const maps_preference_h preference,
402                                       maps_distance_unit_e *unit);
403
404 /**
405  * @brief       Gets the language.
406  * @details This function gets the maps language.
407  * @since_tizen 2.4
408  * @remarks @a language must be released using free().
409  *
410  * @param[in]   preference      The preference handle
411  * @param[out]  language        The language
412  * @return      0 on success, otherwise a negative error value
413  * @retval      #MAPS_ERROR_NONE Successful
414  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
415  */
416 int maps_preference_get_language(const maps_preference_h preference,
417                                  char **language);
418
419 /**
420  * @brief       Gets the max amount of results.
421  * @details This function gets the max amount of results.
422  * @since_tizen 2.4
423  *
424  * @param[in]   preference      The preference handle
425  * @param[out]  max_results     The max amount of results
426  * @return      0 on success, otherwise a negative error value
427  * @retval      #MAPS_ERROR_NONE Successful
428  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
429  */
430 int maps_preference_get_max_results(const maps_preference_h preference,
431                                     int *max_results);
432
433 /**
434  * @brief       Gets the country code.
435  * @details This function gets the country code.
436  * @since_tizen 2.4
437  * @remarks @a country_code must be released using free().
438  *
439  * @param[in]   preference      The preference handle
440  * @param[out]  country_code    The country code
441  * @return      0 on success, otherwise a negative error value
442  * @retval      #MAPS_ERROR_NONE Successful
443  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
444  */
445 int maps_preference_get_country_code(const maps_preference_h preference,
446                                      char **country_code);
447
448 /**
449  * @brief       Gets the route optimization.
450  * @details This function gets the route optimization.
451  * @since_tizen 2.4
452  *
453  * @param[in]   preference              The preference handle
454  * @param[out]  optimization    The route optimization
455  * @return      0 on success, otherwise a negative error value
456  * @retval      #MAPS_ERROR_NONE Successful
457  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
458  */
459 int maps_preference_get_route_optimization(const maps_preference_h preference,
460                                            maps_route_optimization_e *
461                                            optimization);
462
463 /**
464  * @brief       Gets the route transport mode.
465  * @details This function gets the route transport mode.
466  * @since_tizen 2.4
467  *
468  * @param[in]   preference      The preference handle
469  * @param[out]  transport_mode  The transport mode
470  * @return      0 on success, otherwise a negative error value
471  * @retval      #MAPS_ERROR_NONE Successful
472  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
473  */
474 int maps_preference_get_route_transport_mode(const maps_preference_h
475                                              preference,
476                                              maps_route_transport_mode_e *
477                                              transport_mode);
478
479 /**
480  * @brief       Gets the route feature weight.
481  * @details This function gets the route feature weight.
482  * @since_tizen 2.4
483  *
484  * @param[in]   preference      The preference handle
485  * @param[out]  feature_weight  The feature weight
486  * @return      0 on success, otherwise a negative error value
487  * @retval      #MAPS_ERROR_NONE Successful
488  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
489  */
490 int maps_preference_get_route_feature_weight(const maps_preference_h
491                                              preference,
492                                              maps_route_feature_weight_e *
493                                              feature_weight);
494
495 /**
496  * @brief       Gets the route feature.
497  * @details This function gets the route feature.
498  * @since_tizen 2.4
499  *
500  * @param[in]   preference      The preference handle
501  * @param[out]  feature         The feature
502  * @return      0 on success, otherwise a negative error value
503  * @retval      #MAPS_ERROR_NONE Successful
504  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
505  */
506 int maps_preference_get_route_feature(const maps_preference_h preference,
507                                       maps_route_feature_e *feature);
508
509 /**
510  * @brief       Gets the maps preference value by key.
511  * @details This function gets the maps preference value by key.
512  * @since_tizen 2.4
513  * @remarks @a value must be released using free().
514  *
515  * @param[in]   preference      The preference handle
516  * @param[in]   key             The preference key
517  * @param[out]  value           The preference value
518  * @return      0 on success, otherwise a negative error value
519  * @retval      #MAPS_ERROR_NONE Successful
520  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
521  */
522 int maps_preference_get(const maps_preference_h preference, const char *key,
523                         char **value);
524
525 /**
526  * @brief       Retrieves all maps properties.
527  * @details This function retrieves all maps properties.
528  * @since_tizen 2.4
529  * @remarks The properties will be delivered via
530  * maps_preference_properties_cb().
531  *
532  * @param[in]   preference      The preference handle
533  * @param[in]   callback        The callback function to invoke
534  * @param[in]   user_data       The user data to be passed to the callback
535  * function
536  * @return      0 on success, otherwise a negative error value
537  * @retval      #MAPS_ERROR_NONE Successful
538  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
539  * @retval      #MAPS_ERROR_NOT_FOUND Result not found
540  *
541  * @post This function invokes maps_preference_properties_cb() repeatedly to
542  * retrieve each property.
543  *
544  * @see maps_preference_properties_cb()
545  */
546 int maps_preference_foreach_property(const maps_preference_h preference,
547                                      maps_preference_properties_cb callback,
548                                      void *user_data);
549
550 /*----------------------------------------------------------------------------*/
551
552 /**
553  * @brief       Sets the maps distance unit.
554  * @details This function sets the maps distance unit.
555  * @since_tizen 2.4
556  *
557  * @param[in]   preference      The preference handle
558  * @param[in]   unit            The distance unit
559  * @return      0 on success, otherwise a negative error value
560  * @retval      #MAPS_ERROR_NONE Successful
561  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
562  *
563  * @pre @a preference is created using maps_preference_create().
564  *
565  * @see maps_preference_create()
566  * @see maps_preference_get_distance_unit()
567  */
568 int maps_preference_set_distance_unit(maps_preference_h preference,
569                                       const maps_distance_unit_e unit);
570
571 /**
572  * @brief       Sets the maps language.
573  * @details This function sets the maps language.
574  * @since_tizen 2.4
575  *
576  * @param[in]   preference      The preference handle
577  * @param[in]   language        The maps language
578  * @return      0 on success, otherwise a negative error value
579  * @retval      #MAPS_ERROR_NONE Successful
580  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
581  *
582  * @pre @a preference is created using maps_preference_create().
583  *
584  * @see maps_preference_create()
585  * @see maps_preference_get_language()
586  */
587 int maps_preference_set_language(maps_preference_h preference,
588                                  const char *language);
589
590 /**
591  * @brief       Sets the max amount of results.
592  * @details This function sets the max amount of results.
593  * @since_tizen 2.4
594  *
595  * @param[in]   preference      The preference handle
596  * @param[in]   max_results     The max amount of results
597  * @return      0 on success, otherwise a negative error value
598  * @retval      #MAPS_ERROR_NONE Successful
599  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
600  *
601  * @pre @a preference is created using maps_preference_create().
602  *
603  * @see maps_preference_create()
604  * @see maps_preference_get_max_results()
605  */
606 int maps_preference_set_max_results(maps_preference_h preference,
607                                     const int max_results);
608
609 /**
610  * @brief       Sets the maps country code.
611  * @details This function sets the maps country code.
612  * @since_tizen 2.4
613  *
614  * @param[in]   preference      The preference handle
615  * @param[in]   country_code    The maps country code
616  * @return      0 on success, otherwise a negative error value
617  * @retval      #MAPS_ERROR_NONE Successful
618  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
619  *
620  * @pre @a preference is created using maps_preference_create().
621  *
622  * @see maps_preference_create()
623  * @see maps_preference_get_country_code()
624  */
625 int maps_preference_set_country_code(maps_preference_h preference,
626                                      const char *country_code);
627
628 /**
629  * @brief       Sets the route optimization.
630  * @details This function sets the route optimization.
631  * @since_tizen 2.4
632  *
633  * @param[in]   preference      The preference handle
634  * @param[in]   optimization    The route optimization
635  * @return      0 on success, otherwise a negative error value
636  * @retval      #MAPS_ERROR_NONE Successful
637  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
638  *
639  * @pre @a preference is created using maps_preference_create().
640  *
641  * @see maps_preference_create()
642  * @see maps_preference_get_route_optimization()
643  */
644 int maps_preference_set_route_optimization(maps_preference_h preference,
645                                            const maps_route_optimization_e
646                                            optimization);
647
648 /**
649  * @brief       Sets the route transport mode.
650  * @details This function sets the route transport mode.
651  * @since_tizen 2.4
652  *
653  * @param[in]   preference      The preference handle
654  * @param[in]   transport_mode  The route transport mode
655  * @return      0 on success, otherwise a negative error value
656  * @retval      #MAPS_ERROR_NONE Successful
657  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
658  *
659  * @pre @a preference is created using maps_preference_create().
660  *
661  * @see maps_preference_create()
662  * @see maps_preference_get_route_optimization()
663  */
664 int maps_preference_set_route_transport_mode(maps_preference_h preference,
665                                              const maps_route_transport_mode_e
666                                              transport_mode);
667
668 /**
669  * @brief       Sets the route feature weight.
670  * @details This function sets the route feature weight.
671  * @since_tizen 2.4
672  *
673  * @param[in]   preference      The preference handle
674  * @param[in]   feature_weight  The route feature weight
675  * @return      0 on success, otherwise a negative error value
676  * @retval      #MAPS_ERROR_NONE Successful
677  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
678  *
679  * @pre @a preference is created using maps_preference_create().
680  *
681  * @see maps_preference_create()
682  * @see maps_preference_get_route_feature_weight()
683  */
684 int maps_preference_set_route_feature_weight(maps_preference_h preference,
685                                              const maps_route_feature_weight_e
686                                              feature_weight);
687
688 /**
689  * @brief       Sets the route feature.
690  * @details This function sets the route feature.
691  * @since_tizen 2.4
692  *
693  * @param[in]   preference      The preference handle
694  * @param[in]   feature         The route feature
695  * @return      0 on success, otherwise a negative error value
696  * @retval      #MAPS_ERROR_NONE Successful
697  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
698  *
699  * @pre @a preference is created using maps_preference_create().
700  *
701  * @see maps_preference_create()
702  * @see maps_preference_get_route_feature()
703  */
704 int maps_preference_set_route_feature(maps_preference_h preference,
705                                       const maps_route_feature_e feature);
706
707 /**
708  * @brief       Sets the preference value by key.
709  * @details This function sets the preference value assigned with a specified
710  * key.
711  * @since_tizen 2.4
712  *
713  * @param[in]   preference      The preference handle
714  * @param[in]   key             The key
715  * @param[in]   value           The value
716  * @return      0 on success, otherwise a negative error value
717  * @retval      #MAPS_ERROR_NONE Successful
718  * @retval      #MAPS_ERROR_INVALID_PARAMETER Invalid parameter
719  *
720  * @pre @a preference is created using maps_preference_create().
721  *
722  * @see maps_preference_create()
723  * @see maps_preference_get_property()
724  * @see maps_preference_foreach_property()
725  */
726 int maps_preference_set_property(maps_preference_h preference,
727                                  const char *key, const char *value);
728
729
730 #ifdef __cplusplus
731 }
732 #endif
733 /**
734  * @}
735  */
736 #endif                          /* __MAPS_PREFERENCE_H__ */