diff options
author | Jaekyu Park <jk7744.park@samsung.com> | 2016-04-12 21:50:09 +0900 |
---|---|---|
committer | Jaekyu Park <jk7744.park@samsung.com> | 2016-04-12 21:50:09 +0900 |
commit | dde33b41c8de7bed2384bad79cb9c063a8af6bad (patch) | |
tree | f1813e27303f75bb01a10436faf65b6bb246e4a2 | |
parent | c9299e91940199c2024e3832e423fc46c49f208e (diff) | |
download | location-manager-tizen_2.3.1.tar.gz location-manager-tizen_2.3.1.tar.bz2 location-manager-tizen_2.3.1.zip |
Tizen 2.4 SDK Rev5submit/tizen_2.3.1/20160414.052543accepted/tizen/2.3.1/wearable/20160414.080021accepted/tizen/2.3.1/mobile/20160414.075902tizen_2.3.1accepted/tizen_2.3.1_wearableaccepted/tizen_2.3.1_mobile
-rwxr-xr-x | doc/location-manager-doc.h | 51 | ||||
-rwxr-xr-x | include/locations.h | 3 | ||||
-rwxr-xr-x | src/locations.c | 9 |
3 files changed, 33 insertions, 30 deletions
diff --git a/doc/location-manager-doc.h b/doc/location-manager-doc.h index 971ec27..06803b0 100755 --- a/doc/location-manager-doc.h +++ b/doc/location-manager-doc.h @@ -122,33 +122,32 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a> * */ /** -* @ingroup CAPI_LOCATION_MANAGER_MODULE -* @defgroup CAPI_LOCATION_GPS_STATUS_MODULE GPS Status & Satellite -* @brief The GPS Status & Satellite API provides functions to acquire information about GPS satellites in range and in use. -* -* @section CAPI_LOCATION_GPS_STATUS_MODULE_HEADER Required Header -* \#include <locations.h> -* -* @section CAPI_LOCATION_GPS_STATUS_MODULE_OVERVIEW Overview -* The GPS Status & Satellite API provides functions to acquire data on satellites that are currently visible to the device. Information -* like azimuth and elevation of each satellite is available, along with number of satellites in range and in use. -* -* @par System Info note: -* All of the functions require a started location manager with the #LOCATIONS_METHOD_GPS method set. See the Location Manager API for details. -* -* The gps_status_get_nmea() function gets NMEA data from the GPS system. NMEA 0183 (or NMEA for short) is a combined electrical and data -* specification for communication between electronic devices. NMEA standard uses a simple ASCII, serial communications protocol that -* defines how data is transmitted in a "sentence" from one "talker" to multiple "listeners" at a time. For more details, see <a href = "http://en.wikipedia.org/wiki/NMEA_0183">NMEA_0183</a>. -* -* The gps_status_get_satellite() method returns a count of satellites in view. The gps_status_foreach_satellites_in_view() method is an -* iterator which will invoke a callback function for each satellite in view. The gps_status_get_satellite() method returns a count of -* satellites in use. -* + * @ingroup CAPI_LOCATION_MANAGER_MODULE + * @defgroup CAPI_LOCATION_GPS_STATUS_MODULE GPS Status & Satellite + * @brief The GPS Status & Satellite API provides functions to acquire information about GPS satellites in range and in use. + * + * @section CAPI_LOCATION_GPS_STATUS_MODULE_HEADER Required Header + * \#include <locations.h> + * + * @section CAPI_LOCATION_GPS_STATUS_MODULE_OVERVIEW Overview + * The GPS Status & Satellite API provides functions to acquire data on satellites that are currently visible to the device. Information + * like azimuth and elevation of each satellite is available, along with number of satellites in range and in use. + * + * @par System Info note: + * All of the functions require a started location manager with the #LOCATIONS_METHOD_GPS method set. See the Location Manager API for details. + * + * The gps_status_get_nmea() function gets NMEA data from the GPS system. NMEA 0183 (or NMEA for short) is a combined electrical and data + * specification for communication between electronic devices. NMEA standard uses a simple ASCII, serial communications protocol that + * defines how data is transmitted in a "sentence" from one "talker" to multiple "listeners" at a time. For more details, see <a href = "http://en.wikipedia.org/wiki/NMEA_0183">NMEA_0183</a>. + * + * The gps_status_get_satellite() method returns a count of satellites in view. The gps_status_foreach_satellites_in_view() method is an + * iterator which will invoke a callback function for each satellite in view. The gps_status_get_satellite() method returns a count of satellites in use. + * * @section CAPI_LOCATION_GPS_STATUS_MODULE_FEATURE Related Features * This API is related with the following features:\n * - http://tizen.org/feature/location\n @@ -161,7 +160,7 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a> * */ @@ -191,7 +190,7 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a> * */ @@ -221,7 +220,7 @@ * * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n * - * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a> + * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a> * @} * */ diff --git a/include/locations.h b/include/locations.h index 51061fb..9c286b5 100755 --- a/include/locations.h +++ b/include/locations.h @@ -901,13 +901,10 @@ int gps_status_set_satellite_updated_cb(location_manager_h manager, gps_status_s /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @privlevel public - * @privilege %http://tizen.org/privilege/location * @param[in] manager The location manager handle * @return @c 0 on success, otherwise a negative error value. * @retval #LOCATIONS_ERROR_NONE Successful * @retval #LOCATIONS_ERROR_INVALID_PARAMETER Invalid parameter - * @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 gps_status_set_satellite_updated_cb() */ diff --git a/src/locations.c b/src/locations.c index aa509a0..0d06fe1 100755 --- a/src/locations.c +++ b/src/locations.c @@ -1469,7 +1469,14 @@ EXPORT_API int gps_status_set_satellite_updated_cb(location_manager_h manager, g LOCATIONS_NULL_ARG_CHECK(callback); location_manager_s *handle = (location_manager_s *) manager; - location_set_option(handle->object, "USE_SV"); + int ret = location_set_option(handle->object, "USE_SV"); + if (ret != LOCATION_ERROR_NONE) { + if (ret == LOCATION_ERROR_NOT_ALLOWED) { + LOCATIONS_LOGE("LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED"); + return LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED; + } + return ret; + } g_object_set(handle->object, "sat-interval", interval, NULL); return __set_callback(_LOCATIONS_EVENT_TYPE_SATELLITE, manager, callback, user_data); } |