Dynamic interval table for multi handle 38/91338/3 accepted/tizen/common/20161124.170044 accepted/tizen/ivi/20161125.003441 accepted/tizen/mobile/20161125.003345 accepted/tizen/tv/20161125.003355 accepted/tizen/wearable/20161125.003422 submit/tizen/20161123.234422
authorkj7.sung <kj7.sung@samsung.com>
Fri, 7 Oct 2016 05:42:25 +0000 (14:42 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Thu, 17 Nov 2016 04:15:51 +0000 (13:15 +0900)
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
Change-Id: I3ea456de27959982c9506e61800253705d85eb2a

packaging/capi-location-manager.changes
packaging/capi-location-manager.spec
src/locations.c

index f1ed36c..77b2ac3 100644 (file)
@@ -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
index 7369f84..2c26358 100644 (file)
@@ -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
index 9313bcf..ef839e5 100755 (executable)
@@ -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);