2 * Copyright (c) 2011 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 __TIZEN_LOCATION_LOCATIONS_H__
18 #define __TIZEN_LOCATION_LOCATIONS_H__
20 #include <tizen_type.h>
21 #include <tizen_error.h>
28 * @addtogroup CAPI_LOCATION_MANAGER_MODULE
33 * @brief Enumerations of error code for Location manager.
37 LOCATIONS_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
38 LOCATIONS_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
39 LOCATIONS_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
40 LOCATIONS_ERROR_INCORRECT_METHOD = TIZEN_ERROR_LOCATION_CLASS | 0x01, /**< Location manager contains incorrect method for a given call */
41 LOCATIONS_ERROR_NETWORK_FAILED = TIZEN_ERROR_LOCATION_CLASS | 0x02, /**< Network unavailable */
42 LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE = TIZEN_ERROR_LOCATION_CLASS | 0x03, /**< Service unavailable */
43 LOCATIONS_ERROR_GPS_SETTING_OFF = TIZEN_ERROR_LOCATION_CLASS | 0x04, /**< GPS is not enabled */
49 * @brief Location method type.
53 LOCATIONS_METHOD_NONE=0, /**< Undefined method. */
54 LOCATIONS_METHOD_HYBRID, /**< This method selects the best method available at the moment. */
55 LOCATIONS_METHOD_GPS, /**< This method uses Global Positioning System. */
56 LOCATIONS_METHOD_WPS, /**< This method uses Wifi Positioning System. */
57 LOCATIONS_METHOD_SPS /**< This method uses sensor. */
61 * @brief Approximate accuracy level of given information.
65 LOCATIONS_ACCURACY_NONE=0, /**< Invalid data. */
66 LOCATIONS_ACCURACY_COUNTRY, /**< Country accuracy level. */
67 LOCATIONS_ACCURACY_REGION, /**< Regional accuracy level. */
68 LOCATIONS_ACCURACY_LOCALITY, /**< Local accuracy level. */
69 LOCATIONS_ACCURACY_POSTALCODE, /**< Postal accuracy level. */
70 LOCATIONS_ACCURACY_STREET, /**< Street accuracy level. */
71 LOCATIONS_ACCURACY_DETAILED, /**< Detailed accuracy level. */
72 } location_accuracy_level_e;
75 * @brief Enumerations of the state of the location service.
79 LOCATIONS_SERVICE_DISABLED, /**< Service is disabled */
80 LOCATIONS_SERVICE_ENABLED /**< Service is enabled */
81 } location_service_state_e;
84 * @brief Enumerations of the boundary state.
88 LOCATIONS_BOUNDARY_IN, /**< Boundary In (Zone In) */
89 LOCATIONS_BOUNDARY_OUT /**< Boundary Out (Zone Out) */
90 } location_boundary_state_e;
93 * @brief The location manager handle.
95 typedef struct location_manager_s *location_manager_h;
104 * @addtogroup CAPI_LOCATION_MANAGER_MODULE
108 * @brief Called every 1 second with updated position information.
109 * @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees)
110 * @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees)
111 * @param[in] altitude The updated altitude (meters)
112 * @param[in] timestamp The timestamp (time when measurement took place)
113 * @param[in] user_data The user data passed from the call registration function
114 * @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_position_updated_cb()
115 * @see location_manager_start()
116 * @see location_manager_set_position_updated_cb()
118 typedef void(*location_position_updated_cb )(double latitude, double longitude, double altitude, time_t timestamp, void *user_data);
121 * @brief Called every 1 second with updated velocity information.
122 * @param[in] speed The updated speed (km/h)
123 * @param[in] direction The updated direction (in degrees from the north)
124 * @param[in] climb The updated climb (km/h)
125 * @param[in] timestamp The timestamp (time when measurement took place)
126 * @param[in] user_data The user data passed from the callback registration function
127 * @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_velocity_updated_cb()
128 * @see location_manager_start()
129 * @see location_manager_set_velocity_updated_cb()
131 typedef void(*location_velocity_updated_cb )(double speed, double direction, double climb, time_t timestamp, void *user_data);
134 * @brief Called when the state of location service is changed from enabled to disabled or vice versa.
135 * @param[in] state The service state
136 * @param[in] user_data The user data passed from the callback registration function
137 * @pre Either location_manager_start() or location_manager_stop() will invoke this callback if you register this callback using location_manager_set_service_state_changed_cb()
138 * @see location_manager_start()
139 * @see location_manager_stop()
140 * @see location_manager_set_service_state_changed_cb()
141 * @see #location_service_state_e
143 typedef void(*location_service_state_changed_cb )(location_service_state_e state, void *user_data);
146 * @brief Called when the user defined zones are entered or exited.
147 * @param[in] state The boundary state
148 * @param[in] latitude The updated latitude [-90.0 ~ 90.0] (degrees)
149 * @param[in] longitude The updated longitude [-180.0 ~ 180.0] (degrees)
150 * @param[in] altitude The updated altitude (meters)
151 * @param[in] timestamp The timestamp (time when measurement took place)
152 * @param[in] user_data The user data passed from the callback registration function
153 * @pre location_manager_start() will invoke this callback if you register this callback using location_manager_set_zone_changed_cb()
154 * @see #location_boundary_state_e
155 * @see location_manager_start()
156 * @see location_manager_set_zone_changed_cb()
158 typedef void(*location_zone_changed_cb )(location_boundary_state_e state, double latitude, double longitude, double altitude, time_t timestamp, void *user_data);
161 * @brief Creates a new location manager.
162 * @remarks @a manager must be released location_manager_destroy() by you.
163 * @param[in] method The location method
164 * @param[out] manager A location manager handle to be newly created on success
165 * @return 0 on success, otherwise a negative error value.
166 * @retval #LOCATIONS_ERROR_NONE Successful
167 * @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory
168 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
169 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
170 * @see location_manager_destroy()
172 int location_manager_create(location_method_e method, location_manager_h* manager);
175 * @brief Releases the location manager.
176 * @param[in] manager The location manager handle
177 * @return 0 on success, otherwise a negative error value.
178 * @retval #LOCATIONS_ERROR_NONE Successful
179 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
180 * @see location_manager_create()
182 int location_manager_destroy(location_manager_h manager);
185 * @brief Starts the location service.
187 * @remarks There is no limit on number of location managers for which this function was called.
189 * Calling this function invokes a location service event. When the location service is enabled, the service state change callback
190 * (set using #location_manager_set_service_state_changed_cb()) notifies the user with #LOCATIONS_SERVICE_ENABLED as
191 * the first argument, and the service starts. \n
193 * Started service is a requirement for calling these functions:
195 * location_manager_get_position(), location_manager_get_velocity(), location_manager_get_accuracy(),
196 * #gps_status_get_nmea(), gps_status_get_satellite_count_in_view(), gps_status_foreach_satellites_in_view(), gps_status_get_active_satellite_count().
198 * Once you stop the service, using #location_manager_stop(), you can no longer call the functions listed above.
200 * Starting and stopping the service is in the scope of the given location manager only (if there's more than one manager,
201 * starting and stopping should be executed for each of them separately).
203 * @param[in] manager The location manager handle
204 * @return 0 on success, otherwise a negative error value.
205 * @retval #LOCATIONS_ERROR_NONE Successful
206 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
207 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
208 * @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed
209 * @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled
210 * @post It invokes location_position_updated_cb(), location_velocity_updated_cb(), location_zone_changed_cb(), and location_service_state_changed_cb().
211 * @see location_manager_stop()
212 * @see location_manager_get_position()
213 * @see location_manager_get_velocity()
214 * @see location_manager_get_accuracy()
215 * @see location_manager_set_service_state_changed_cb()
216 * @see location_manager_set_position_updated_cb()
217 * @see location_position_updated_cb()
218 * @see location_manager_set_velocity_updated_cb()
219 * @see location_velocity_updated_cb()
220 * @see location_manager_set_zone_changed_cb()
221 * @see location_zone_changed_cb()
223 int location_manager_start(location_manager_h manager);
226 * @brief Stops the location service.
227 * @remarks This function initiates the process of stopping the service. When the process is finished, callback set using
228 * #location_manager_set_service_state_changed_cb() will be called, with #LOCATIONS_SERVICE_DISABLED as first argument.
229 * When that happens, the service is stopped and the user is notified.
231 * You can stop and start the location manager as needed.
233 * @param[in] manager The location manager handle
234 * @return 0 on success, otherwise a negative error value.
235 * @retval #LOCATIONS_ERROR_NONE Successful
236 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
237 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
238 * @retval #LOCATIONS_ERROR_NETWORK_FAILED Network failed
239 * @see location_manager_start()
240 * @see location_manager_set_service_state_changed_cb()
241 * @see location_service_state_changed_cb()
243 int location_manager_stop(location_manager_h manager);
246 * @brief Sets a rectangular boundary for a given location manager.
247 * @param[in] manager The location manager handle
248 * @param[in] top_left_latitude The latitude of area's top left corner [-90.0 ~ 90.0] (degrees)
249 * @param[in] top_left_longitude The longitude of area's top left corner [-180.0 ~ 180.0] (degrees)
250 * @param[in] bottom_right_latitude The latitude of area's bottom right corner [-90.0 ~ 90.0] (degrees)
251 * @param[in] bottom_right_longitude The longitude of area's bottom right corner [-180.0 ~ 180.0] (degrees)
252 * @return 0 on success, otherwise a negative error value.
253 * @retval #LOCATIONS_ERROR_NONE Successful
254 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
255 * @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory
256 * @post It invokes location_manager_set_zone_changed_cb() when a boundary is entered or exited, if you set a callback with location_manager_set_zone_changed_cb().
257 * @see location_manager_set_boundary_circle()
258 * @see location_manager_set_zone_changed_cb()
259 * @see location_manager_is_boundary_contains_coordinate()
261 int location_manager_set_boundary_rect(location_manager_h manager, double top_left_latitude, double top_left_longitude, double bottom_right_latitude, double bottom_right_longitude);
264 * @brief Sets a circular boundary for a given location manager.
265 * @param[in] manager The location manager handle
266 * @param[in] center_latitude The latitude of circle's center [-90.0 ~ 90.0] (degrees)
267 * @param[in] center_longitude The longitude of circle's center [-180.0 ~ 180.0] (degrees)
268 * @param[in] radius The radius of a circle (meters)
269 * @return 0 on success, otherwise a negative error value.
270 * @retval #LOCATIONS_ERROR_NONE Successful
271 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
272 * @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory
273 * @post It invokes location_manager_set_zone_changed_cb() when a boundary is entered or exited, if you set a callback with location_manager_set_zone_changed_cb().
274 * @see location_manager_set_boundary_rect()
275 * @see location_manager_set_zone_changed_cb()
276 * @see location_manager_is_boundary_contains_coordinate()
278 int location_manager_set_boundary_circle(location_manager_h manager, double center_latitude, double center_longitude, double radius);
281 * @brief Check if the boundary contains the specified latitude and longitude.
282 * @param[in] manager The location manager handle
283 * @param[in] latitude The latitude to test against boundary [-90.0 ~ 90.0] (degrees)
284 * @param[in] longitude The longitude to test against boundary [-180.0 ~ 180.0] (degrees)
285 * @param[out] contained The result indicating whether the boundary contains the specified coordinate (@c true = contained, @c false = not contained )
286 * @return 0 on success, otherwise a negative error value.
287 * @retval #LOCATIONS_ERROR_NONE Successful
288 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
289 * @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory
290 * @see location_manager_set_boundary_rect()
291 * @see location_manager_set_boundary_circle()
293 int location_manager_is_boundary_contains_coordinate(location_manager_h manager, double latitude, double longitude, bool *contained);
296 * @brief Gets the given location manager's method.
298 * @param[in] manager The location manager handle
299 * @param[out] method The location method
300 * @return 0 on success, otherwise a negative error value.
301 * @retval #LOCATIONS_ERROR_NONE Successful
302 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
303 * @see location_manager_create()
305 int location_manager_get_method(location_manager_h manager, location_method_e *method);
308 * @brief Gets the current position information.
310 * The result is current altitude, latitude, and longitude, with a measurement timestamp.
312 * If altitude is negative, only altitude and latitude are available (fix status is 2D).
313 * If altitude is positive, fix status is 3D and returned altitude value is the result of measurement.
315 * @param[in] manager The location manager handle
316 * @param[out] altitude The current altitude (meters)
317 * @param[out] latitude The current latitude [-90.0 ~ 90.0] (degrees)
318 * @param[out] longitude The current longitude [-180.0 ~ 180.0] (degrees)
319 * @param[out] timestamp The timestamp (time when measurement took place)
320 * @return 0 on success, otherwise a negative error value.
321 * @retval #LOCATIONS_ERROR_NONE Successful
322 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
323 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
324 * @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled
325 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
327 int location_manager_get_position(location_manager_h manager, double *altitude, double *latitude, double *longitude, time_t *timestamp);
330 * @brief Gets the current velocity information.
332 * The result is current climb, direction, and speed, with a measurement timestamp.
334 * @param[in] manager The location manager handle
335 * @param[out] climb The climb (km/h)
336 * @param[out] direction The direction, degrees from the north
337 * @param[out] speed The speed (km/h)
338 * @param[out] timestamp The timestamp (time when measurement took place)
339 * @return 0 on success, otherwise a negative error value.
340 * @retval #LOCATIONS_ERROR_NONE Successful
341 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
342 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
343 * @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled
344 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
346 int location_manager_get_velocity(location_manager_h manager, int *climb, int *direction, int *speed, time_t *timestamp);
349 * @brief Gets the current accuracy information.
350 * @param[in] manager The location manager handle
351 * @param[out] level The accuracy level
352 * @param[out] horizontal The horizontal accuracy (meters)
353 * @param[out] vertical The vertical accuracy (meters)
354 * @return 0 on success, otherwise a negative error value.
355 * @retval #LOCATIONS_ERROR_NONE Successful
356 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
357 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
358 * @retval #LOCATIONS_ERROR_GPS_SETTING_OFF GPS is not enabled
359 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
361 int location_manager_get_accuracy(location_manager_h manager, location_accuracy_level_e *level, double *horizontal, double *vertical);
364 * @brief Registers a callback function to be invoked every 1 second with updated position information.
366 * @param[in] manager The location manager handle
367 * @param[in] callback The callback function to register
368 * @param[in] user_data The user data to be passed to the callback function
369 * @return 0 on success, otherwise a negative error value.
370 * @retval #LOCATIONS_ERROR_NONE Successful
371 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
372 * @post location_position_updated_cb() will be invoked
373 * @see location_manager_unset_position_updated_cb()
374 * @see location_position_updated_cb()
376 int location_manager_set_position_updated_cb(location_manager_h manager, location_position_updated_cb callback, void *user_data);
379 * @brief Unregisters the callback function.
381 * @param[in] manager The location manager handle
382 * @return 0 on success, otherwise a negative error value.
383 * @retval #LOCATIONS_ERROR_NONE Successful
384 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
385 * @see location_manager_set_position_updated_cb()
387 int location_manager_unset_position_updated_cb(location_manager_h manager);
390 * @brief Registers a callback function to be invoked every 1 second with updated velocity information.
392 * @param[in] manager The location manager handle
393 * @param[in] callback The callback function to register
394 * @param[in] user_data The user data to be passed to the callback function
395 * @return 0 on success, otherwise a negative error value.
396 * @retval #LOCATIONS_ERROR_NONE Successful
397 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
398 * @post location_velocity_updated_cb() will be invoked
399 * @see location_manager_unset_velocity_updated_cb()
400 * @see location_velocity_updated_cb()
402 int location_manager_set_velocity_updated_cb(location_manager_h manager, location_velocity_updated_cb callback, void *user_data);
405 * @brief Unregisters the callback function.
407 * @param[in] manager The location manager handle
408 * @return 0 on success, otherwise a negative error value.
409 * @retval #LOCATIONS_ERROR_NONE Successful
410 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
411 * @see location_manager_set_velocity_updated_cb()
413 int location_manager_unset_velocity_updated_cb(location_manager_h manager);
416 * @brief Registers a callback function to be invoked when the location service state is changed.
418 * @param[in] manager The location manager handle
419 * @param[in] callback The callback function to register
420 * @param[in] user_data The user data to be passed to the callback function
421 * @return 0 on success, otherwise a negative error value.
422 * @retval #LOCATIONS_ERROR_NONE Successful
423 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
424 * @post location_service_state_changed_cb() will be invoked
425 * @see location_manager_unset_service_state_changed_cb()
426 * @see location_service_state_changed_cb()
427 * @see location_manager_start()
428 * @see location_manager_stop()
429 * @see #location_service_state_e
431 int location_manager_set_service_state_changed_cb(location_manager_h manager, location_service_state_changed_cb callback, void *user_data);
434 * @brief Unregisters the callback function.
435 * @param[in] manager The location manager handle
436 * @return 0 on success, otherwise a negative error value.
437 * @retval #LOCATIONS_ERROR_NONE Successful
438 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
439 * @see location_manager_set_service_state_changed_cb()
441 int location_manager_unset_service_state_changed_cb(location_manager_h manager);
444 * @brief Registers a callback function to be invoked when the previously set boundary area is entered or left.
446 * @param[in] manager The location manager handle
447 * @param[in] callback The callback function to register
448 * @param[in] user_data The user data to be passed to the callback function
449 * @return 0 on success, otherwise a negative error value.
450 * @retval #LOCATIONS_ERROR_NONE Successful
451 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
452 * @pre Either location_manager_set_boundary_rect() or location_manager_set_boundary_circle() is called before.
453 * @post location_zone_changed_cb() will be invoked
454 * @see location_manager_unset_zone_changed_cb()
455 * @see location_zone_changed_cb()
457 int location_manager_set_zone_changed_cb(location_manager_h manager, location_zone_changed_cb callback, void *user_data);
460 * @brief Unregisters the callback function.
461 * @param[in] manager The location manager handle
462 * @return 0 on success, otherwise a negative error value.
463 * @retval #LOCATIONS_ERROR_NONE Successful
464 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
465 * @see location_manager_set_zone_changed_cb()
467 int location_manager_unset_zone_changed_cb(location_manager_h manager);
473 * GPS Status & Satellites
477 * @addtogroup CAPI_LOCATION_GPS_STATUS_MODULE
482 * @brief Called once for each satellite in range.
483 * @param[in] azimuth The azimuth of the satellite (degrees)
484 * @param[in] elevation The elevation of the satellite (meters)
485 * @param[in] prn The PRN of the satellite
486 * @param[in] snr The SNR of the satellite [dB]
487 * @param[in] is_active The flag signaling if satellite is in use
488 * @param[in] user_data The user data passed from the foreach function
489 * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
490 * @pre gps_status_foreach_satellites_in_view() will invoke this callback.
491 * @see gps_status_foreach_satellites_in_view()
493 typedef bool(*gps_status_get_satellites_cb)(unsigned int azimuth, unsigned int elevation, unsigned int prn, int snr, bool is_active, void *user_data);
496 * @brief Gets the GPS NMEA data.
499 * This call is valid only for location managers with #LOCATIONS_METHOD_GPS method.\n
500 * @a nmea must be released with @c free() by you.
502 * @param[in] manager The location manager handle
503 * @param[out] nmea The NMEA data
504 * @return 0 on success, otherwise a negative error value.
505 * @retval #LOCATIONS_ERROR_NONE Successful
506 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
507 * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
508 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
509 * @retval #LOCATIONS_ERROR_OUT_OF_MEMORY Out of memory
510 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
511 * @see location_manager_start()
513 int gps_status_get_nmea(location_manager_h manager, char **nmea);
516 * @brief Gets the number of satellites in view.
519 * This call is valid only for location managers with #LOCATIONS_METHOD_GPS method.
521 * @param[in] manager The location manager handle
522 * @param[out] count The number of satellites in view
523 * @return 0 on success, otherwise a negative error value.
524 * @retval #LOCATIONS_ERROR_NONE Successful
525 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
526 * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
527 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
528 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
529 * @see gps_status_foreach_satellites_in_view()
531 int gps_status_get_satellite_count_in_view(location_manager_h manager, int *count);
534 * @brief Invokes the callback function for each satellite.
537 * This function is valid only for location managers with the #LOCATIONS_METHOD_GPS method.
539 * @param[in] manager The location manager handle
540 * @param[in] callback The iteration callback function
541 * @param[in] user_data The user data to be passed to the callback function
542 * @return 0 on success, otherwise a negative error value.
543 * @retval #LOCATIONS_ERROR_NONE Successful
544 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
545 * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
546 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
547 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
548 * @post It invokes gps_status_get_satellites_cb().
549 * @see gps_status_get_satellite_count_in_view()
550 * @see gps_status_get_satellites_cb()
552 int gps_status_foreach_satellites_in_view (location_manager_h manager, gps_status_get_satellites_cb callback, void *user_data);
555 * @brief Gets the number of satellites available to be used.
558 * This call is valid only for location managers with #LOCATIONS_METHOD_GPS method.
560 * @param[in] manager The location manager handle
561 * @param[out] count The number of active satellites
562 * @return 0 on success, otherwise a negative error value.
563 * @retval #LOCATIONS_ERROR_NONE Successful
564 * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid argument
565 * @retval #LOCATIONS_ERROR_INCORRECT_METHOD Incorrect method
566 * @retval #LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE Service not available
567 * @pre The location service state must be #LOCATIONS_SERVICE_ENABLED with location_manager_start()
568 * @see gps_status_get_satellite_count_in_view()
570 int gps_status_get_active_satellite_count(location_manager_h manager, int *count);
578 #endif /* __TIZEN_LOCATION_LOCATIONS_H__ */