From: kj7.sung Date: Mon, 6 Feb 2017 04:27:10 +0000 (+0900) Subject: sync with latest 3.0 X-Git-Tag: accepted/tizen/common/20170208.155239^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fapi%2Flocation-manager.git;a=commitdiff_plain;h=22ee13708a129fdf7fb7652e022df099384a1c4e sync with latest 3.0 Change-Id: I455d3b71916ebebf5fca7969d56c707548581393 Signed-off-by: kj7.sung --- diff --git a/src/locations.c b/src/locations.c index 1efd9b0..b8e1a8a 100755 --- a/src/locations.c +++ b/src/locations.c @@ -69,12 +69,11 @@ static LocationMethod __convert_LocationMethod(location_method_e method) static void __cb_service_updated(GObject *self, guint type, gpointer data, gpointer velocity, gpointer accuracy, gpointer userdata) { - LOCATIONS_LOGD("Callback function has been invoked. "); location_manager_s *handle = (location_manager_s *) userdata; if (type == SATELLITE_UPDATED && handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE]) { LocationSatellite *sat = (LocationSatellite *)data; - LOCATIONS_LOGD("Current satellite information: timestamp : %d, number of active : %d, number of inview : %d", + LOCATIONS_LOGD("callback invoked[TYPE_SATELLITE] timestamp : %d, number of active : %d, number of inview : %d", sat->timestamp, sat->num_of_sat_used, sat->num_of_sat_inview); ((gps_status_satellite_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE])(sat->num_of_sat_used, sat->num_of_sat_inview, sat->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_SATELLITE]); @@ -84,12 +83,14 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin LocationAccuracy *acc = (LocationAccuracy *) accuracy; ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_DISTANCE])(pos->latitude, pos->longitude, pos->altitude, vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_DISTANCE]); + LOCATIONS_LOGD("callback invoked[TYPE_DISTANCE] timestamp : %d", pos->timestamp); } else { if (handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION] && (type & POSITION_UPDATED) != 0) { LocationPosition *pos = (LocationPosition *) data; ((location_position_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION])(pos->latitude, pos->longitude, pos->altitude, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POSITION]); + LOCATIONS_LOGD("callback invoked[TYPE_POSITION] timestamp : %d", pos->timestamp); } if (handle->user_cb[_LOCATIONS_EVENT_TYPE_VELOCITY] && (type & VELOCITY_UPDATED) != 0) { @@ -104,6 +105,7 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin LocationAccuracy *acc = (LocationAccuracy *) accuracy; ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POS_VEL])(pos->latitude, pos->longitude, pos->altitude, vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POS_VEL]); + LOCATIONS_LOGD("callback invoked[TYPE_POS_VEL] timestamp : %d", pos->timestamp); } } } @@ -134,7 +136,7 @@ static void __cb_batch_updated(GObject *self, guint num_of_location, gpointer us static void __cb_service_enabled(GObject *self, guint status, gpointer userdata) { - LOCATIONS_LOGD("Invoked. status = %d", status); + LOCATIONS_LOGD("Invoked[service_enabled]. status = %d", status); location_manager_s *handle = (location_manager_s *) userdata; if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) { ((location_service_state_changed_cb) @@ -144,7 +146,7 @@ static void __cb_service_enabled(GObject *self, guint status, gpointer userdata) static void __cb_service_disabled(GObject *self, guint status, gpointer userdata) { - LOCATIONS_LOGD("Invoked. status = %d", status); + LOCATIONS_LOGD("Invoked[service_disabled]. status = %d", status); location_manager_s *handle = (location_manager_s *) userdata; if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) { ((location_service_state_changed_cb) @@ -1051,9 +1053,6 @@ EXPORT_API int location_manager_unset_distance_based_location_changed_cb(locatio LOCATIONS_LOGD("location_manager_unset_distance_updated_cb"); LOCATIONS_NOT_SUPPORTED_CHECK(__is_location_supported()); LOCATIONS_NULL_ARG_CHECK(manager); - location_manager_s *handle = (location_manager_s *) manager; - g_object_set(handle->object, "min-interval", 0, NULL); - g_object_set(handle->object, "min-distance", 0, NULL); return __unset_callback(_LOCATIONS_EVENT_TYPE_DISTANCE, manager); }