diff options
author | kj7.sung <kj7.sung@samsung.com> | 2016-10-07 14:42:25 +0900 |
---|---|---|
committer | kj7.sung <kj7.sung@samsung.com> | 2016-11-17 13:15:51 +0900 |
commit | 75e2fa6e63a2c0cb108403bf5c76e242470933af (patch) | |
tree | 875654eac5a8804655b8eb1062cb40173fa6b1c2 | |
parent | 9bc92f359debf258a9ead2e050672d1771253ef4 (diff) | |
download | location-manager-75e2fa6e63a2c0cb108403bf5c76e242470933af.tar.gz location-manager-75e2fa6e63a2c0cb108403bf5c76e242470933af.tar.bz2 location-manager-75e2fa6e63a2c0cb108403bf5c76e242470933af.zip |
Dynamic interval table for multi handlesubmit/tizen/20161123.234422accepted/tizen/wearable/20161125.003422accepted/tizen/tv/20161125.003355accepted/tizen/mobile/20161125.003345accepted/tizen/ivi/20161125.003441accepted/tizen/common/20161124.170044
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
Change-Id: I3ea456de27959982c9506e61800253705d85eb2a
-rw-r--r-- | packaging/capi-location-manager.changes | 6 | ||||
-rw-r--r-- | packaging/capi-location-manager.spec | 2 | ||||
-rwxr-xr-x | src/locations.c | 43 |
3 files changed, 24 insertions, 27 deletions
diff --git a/packaging/capi-location-manager.changes b/packaging/capi-location-manager.changes index f1ed36c..77b2ac3 100644 --- a/packaging/capi-location-manager.changes +++ b/packaging/capi-location-manager.changes @@ -1,3 +1,9 @@ +[Version] capi-location-manager_0.7.5 +[Date] 28 Oct 2016 +[Title] Dynamic interval table for multi handle +[Developer] Kyoungjun Sung <kj7.sung@samsung.com> + +================================================================================ [Version] capi-location-manager_0.7.4 [Date] 6 Sep 2016 [Title] Passive location diff --git a/packaging/capi-location-manager.spec b/packaging/capi-location-manager.spec index 7369f84..2c26358 100644 --- a/packaging/capi-location-manager.spec +++ b/packaging/capi-location-manager.spec @@ -1,6 +1,6 @@ Name: capi-location-manager Summary: A Location Manager library in Tizen Native API -Version: 0.7.4 +Version: 0.7.5 Release: 1 Group: Location/API License: Apache-2.0 diff --git a/src/locations.c b/src/locations.c index 9313bcf..ef839e5 100755 --- a/src/locations.c +++ b/src/locations.c @@ -406,8 +406,14 @@ EXPORT_API bool location_manager_is_supported_method(location_method_e method) return false; } - set_last_result(LOCATIONS_ERROR_NONE); - return location_is_supported_method(_method); + gboolean ret = location_is_supported_method(_method); + if (ret) { + set_last_result(LOCATIONS_ERROR_NONE); + return true; + } else { + set_last_result(LOCATIONS_ERROR_NOT_SUPPORTED); + return false; + } } EXPORT_API int location_manager_is_enabled_method(location_method_e method, bool *enable) @@ -481,24 +487,14 @@ EXPORT_API int location_manager_create(location_method_e method, location_manage { LOCATIONS_LOGD("location_manager_create (method : %d)", method); - if (method == LOCATIONS_METHOD_HYBRID) { + if (method == LOCATIONS_METHOD_HYBRID) + LOCATIONS_NOT_SUPPORTED_CHECK(__is_location_supported()); + else if (method == LOCATIONS_METHOD_GPS) + LOCATIONS_NOT_SUPPORTED_CHECK(__is_gps_supported()); + else if (method == LOCATIONS_METHOD_WPS) + LOCATIONS_NOT_SUPPORTED_CHECK(__is_wps_supported()); + else if (method == LOCATIONS_METHOD_PASSIVE) LOCATIONS_NOT_SUPPORTED_CHECK(__is_location_supported()); - } else if (method == LOCATIONS_METHOD_GPS) { - if (__is_gps_supported() == LOCATIONS_ERROR_NOT_SUPPORTED) { - LOCATIONS_LOGE("LOCATIONS_ERROR_NOT_SUPPORTED(0x%08x) : fail to location feature", LOCATIONS_ERROR_NOT_SUPPORTED); - return LOCATIONS_ERROR_NOT_SUPPORTED; - } - } else if (method == LOCATIONS_METHOD_WPS) { - if (__is_wps_supported() == LOCATIONS_ERROR_NOT_SUPPORTED) { - LOCATIONS_LOGE("LOCATIONS_ERROR_NOT_SUPPORTED(0x%08x) : fail to location feature", LOCATIONS_ERROR_NOT_SUPPORTED); - return LOCATIONS_ERROR_NOT_SUPPORTED; - } - } else if (method == LOCATIONS_METHOD_PASSIVE) { - if (__is_location_supported() == LOCATIONS_ERROR_NOT_SUPPORTED) { - LOCATIONS_LOGE("LOCATIONS_ERROR_NOT_SUPPORTED(0x%08x) : fail to location feature", LOCATIONS_ERROR_NOT_SUPPORTED); - return LOCATIONS_ERROR_NOT_SUPPORTED; - } - } LocationMethod _method = __convert_LocationMethod(method); if (_method == LOCATION_METHOD_NONE) { @@ -527,7 +523,7 @@ EXPORT_API int location_manager_create(location_method_e method, location_manage memset(handle, 0, sizeof(location_manager_s)); - handle->object = location_new(_method); + handle->object = location_new(_method, FALSE); if (handle->object == NULL) { LOCATIONS_LOGE("LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE(0x%08x) : fail to location_new", LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE); free(handle); @@ -543,11 +539,6 @@ EXPORT_API int location_manager_create(location_method_e method, location_manage if (!handle->sig_id[_LOCATION_SIGNAL_SERVICE_DISABLED]) handle->sig_id[_LOCATION_SIGNAL_SERVICE_DISABLED] = g_signal_connect(handle->object, "service-disabled", G_CALLBACK(__cb_service_disabled), handle); -#if 0 - if (!handle->sig_id[_LOCATION_SIGNAL_STATUS_CHANGED]) - handle->sig_id[_LOCATION_SIGNAL_STATUS_CHANGED] = g_signal_connect(handle->object, "status-changed", G_CALLBACK(__cb_service_status_changed), handle); -#endif - *manager = (location_manager_h) handle; return LOCATIONS_ERROR_NONE; } @@ -581,7 +572,7 @@ EXPORT_API int location_manager_destroy(location_manager_h manager) handle->sig_id[_LOCATION_SIGNAL_ERROR_EMITTED] = 0; } - int ret = location_free(handle->object); + int ret = location_free(handle->object, FALSE); if (ret != LOCATIONS_ERROR_NONE) return __convert_error_code(ret); |