From 0a6086909d5194b269778096b7a3f5a601a7e24e Mon Sep 17 00:00:00 2001 From: "kj7.sung" Date: Mon, 25 Sep 2017 13:06:53 +0900 Subject: [PATCH] batch : test app fixed Change-Id: I19195ff1520f0ae3aa1a4d18090ce1ef5efb3595 Signed-off-by: kj7.sung --- packaging/capi-location-manager.spec | 2 +- test/location_test.c | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/packaging/capi-location-manager.spec b/packaging/capi-location-manager.spec index dda2f3a..87d8e31 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.11 +Version: 0.7.12 Release: 1 Group: Location/API License: Apache-2.0 diff --git a/test/location_test.c b/test/location_test.c index 04d8210..95272ee 100755 --- a/test/location_test.c +++ b/test/location_test.c @@ -340,8 +340,7 @@ void _location_changed_cb(double latitude, double longitude, double altitude, do bool _get_location_cb(double latitude, double longitude, double altitude, double speed, double direction, double horizontal, double vertical, time_t timestamp, void *user_data) { - fprintf(stderr, "-------------------------- batch: get location --------------------------\n"); - fprintf(stderr, "[%ld] lat[%f] lon[%f] alt[%f] speed[%lf] direction[%lf], horizontal_accuracy[%lf]\n", timestamp, latitude, longitude, altitude, speed, direction, horizontal); + fprintf(stderr, "[%ld] pos[%f, %f, %f] spd[%.1f] dir[%.1f], hor[%.1f]\n", timestamp, latitude, longitude, altitude, speed, direction, horizontal); return TRUE; } @@ -387,7 +386,7 @@ static void print_location_status() fprintf(stderr, "gps: %d, ", is_enabled); location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, &is_enabled); - fprintf(stderr, "wps: %d, ", is_enabled); + fprintf(stderr, "wps: %d \n", is_enabled); } static int enable_method(location_method_e method, bool enable) @@ -719,8 +718,19 @@ static void location_cleanup() { int ret = 0; if (manager != NULL) { - ret = location_manager_stop(manager); - fprintf(stderr, "stop: %d\n", ret); + if (menu == 31) { + ret = location_manager_stop_batch(manager); + fprintf(stderr, "stop_batch: %d\n", ret); + + ret = location_manager_unset_location_batch_cb(manager); + fprintf(stderr, "unset_batch_cb: %d\n", ret); + } else { + ret = location_manager_stop(manager); + fprintf(stderr, "stop: %d\n", ret); + + ret = gps_status_unset_satellite_updated_cb(manager); + fprintf(stderr, "gps_status_unset_satellite_updated_cb: %d\n", ret); + } ret = location_manager_unset_service_state_changed_cb(manager); fprintf(stderr, "unset_service_state_changed_cb: %d\n", ret); @@ -728,9 +738,6 @@ static void location_cleanup() ret = location_manager_unset_position_updated_cb(manager); fprintf(stderr, "unset_position_updated_cb: %d\n", ret); - ret = gps_status_unset_satellite_updated_cb(manager); - fprintf(stderr, "gps_status_unset_satellite_updated_cb: %d\n", ret); - ret = location_manager_destroy(manager); fprintf(stderr, "destroy: %d\n", ret); manager = NULL; -- 2.34.1