LOCATIONS_METHOD_HYBRID, /**< This method selects the best method available at the moment */
LOCATIONS_METHOD_GPS, /**< This method uses Global Positioning System */
LOCATIONS_METHOD_WPS, /**< This method uses WiFi Positioning System */
- LOCATIONS_METHOD_MOCK, /**< This method uses mock location for testing (Since 3.0)*/
} location_method_e;
/**
* @param[in] callback The callback function to register
* @param[in] batch_interval The batch sampling interval [1 ~ 255] (seconds)
* @param[in] batch_period The batch period [1 ~ 60000] (seconds)
+ * @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
* @privilege %http://tizen.org/privilege/location
* @param[in] manager The location manager handle
* @param[in] callback The iteration callback function
- * @param[in] user_data The user data passed from the callback registration function
+ * @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
int location_manager_foreach_location_batch(location_manager_h manager, location_batch_get_location_cb callback, void *user_data);
/**
+ * @brief Checks whether the mock location is enabled.
+ * @since_tizen 3.0
+ * @param[out] enabled Indicates whether the mock location is enabled
+ * @return 0 on success, otherwise a negative error value
+ * @retval #LOCATIONS_ERROR_NONE Successful
+ * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
+ * @see location_manager_enable_mock_location()
+ * @see location_manager_set_mock_location()
+ * @see location_manager_clear_mock_location()
+ */
+int location_manager_is_enabled_mock_location(bool *enabled);
+
+/**
* @brief Enables mock location.
- * @remarks You can enable the mock location when developer mode is enabled.
+ * @details The mock location is a testing function to make location API and callback deliver a mock location
+ * set by location_manager_set_mock_location() instead of real positioning data even in the other applications.
+ * @remarks The mock location can only be enabled if developer mode is enabled.
* @since_tizen 3.0
* @privlevel public
* @privilege %http://tizen.org/privilege/location
* @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled
* @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED Permission denied
* @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
- * @see location_manager_is_enabled_method()
- * @see location_manager_create()
+ * @see location_manager_is_enabled_mock_location()
* @see location_manager_set_mock_location()
+ * @see location_manager_clear_mock_location()
*/
int location_manager_enable_mock_location(const bool enable);
/**
* @brief Sets a mock location for the given location method.
* @details The location sets the given altitude, latitude, longitude, climb, direction, speed, level, horizontal and vertical accuracy.
- *
* @since_tizen 3.0
* @privlevel public
* @privilege %http://tizen.org/privilege/location
* @param[in] manager The location manager handle
* @param[in] latitude The current latitude [-90.0 ~ 90.0] (degrees)
- * @param[in] longitude The current longitude [-180.0 ~ 180.0] (degrees)
+ * @param[in] longitude The current longitude [-180.0 ~ 180.0] (degrees)
* @param[in] altitude The current altitude (meters)
- * @param[in] speed The speed (km/h)
- * @param[in] direction The direction, degrees from the north [0.0 ~ 360.0]
+ * @param[in] speed The speed (km/h)
+ * @param[in] direction The direction, degrees from the north [0.0 ~ 360.0]
* @param[in] accuracy The horizontal accuracy (meters)
* @return 0 on success, otherwise a negative error value
* @retval #LOCATIONS_ERROR_NONE Successful
* @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled
* @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method
* @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
- * @see location_manager_is_enabled_method()
- * @see location_manager_enable_mock_location()
* @see location_manager_create()
+ * @see location_manager_is_enabled_mock_location()
+ * @see location_manager_enable_mock_location()
* @see location_manager_clear_mock_location()
*/
int location_manager_set_mock_location(location_manager_h manager, const double latitude, const double longitude, const double altitude, const double speed, const double direction, const double accuracy);
/**
* @brief Clears a mock location.
- *
* @since_tizen 3.0
* @privlevel public
* @privilege %http://tizen.org/privilege/location
* @retval #LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED The application does not have the privilege to call this method
* @retval #LOCATIONS_ERROR_SETTING_OFF MOCK location is not enabled
* @retval #LOCATIONS_ERROR_NOT_SUPPORTED Not supported
- * @see location_manager_is_enabled_method()
- * @see location_manager_enable_mock_location()
* @see location_manager_create()
+ * @see location_manager_is_enabled_mock_location()
+ * @see location_manager_enable_mock_location()
* @see location_manager_set_mock_location()
*/
int location_manager_clear_mock_location(location_manager_h manager);