+[Version] capi-location-manager_0.7.6
+[Date] 2 Dec 2016
+[Title] Fix distance based callback
+[Developer] Kyoungjun Sung <kj7.sung@samsung.com>
+
+================================================================================
[Version] capi-location-manager_0.7.5
[Date] 28 Oct 2016
[Title] Dynamic interval table for multi handle
Name: capi-location-manager
Summary: A Location Manager library in Tizen Native API
-Version: 0.7.5
+Version: 0.7.6
Release: 1
Group: Location/API
License: Apache-2.0
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
--DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} -DTZ_SYS_RW_APP=%{TZ_SYS_RW_APP} \
+-DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
make %{?jobs:-j%jobs}
%files test
%manifest test/capi-location-manager-test.manifest
%{TZ_SYS_RO_PACKAGES}/capi-location-manager-test.xml
-%{TZ_SYS_RW_APP}/test/location/location_test
+%{TZ_SYS_SHARE}/location/location_test
%endif
sat->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_SATELLITE]);
} else if (type == DISTANCE_UPDATED && handle->user_cb[_LOCATIONS_EVENT_TYPE_DISTANCE]) {
LocationPosition *pos = (LocationPosition *) data;
- LocationVelocity *vel = (LocationVelocity *) velocity; /* current velocity */
- ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_DISTANCE])(0, pos->latitude, pos->longitude, pos->altitude,
- vel->speed, vel->direction, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_DISTANCE]);
+ LocationVelocity *vel = (LocationVelocity *) velocity;
+ 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]);
} else {
if (handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION] && (type & POSITION_UPDATED) != 0) {
}
}
-#if 0
-static void __cb_service_status_changed(GObject *self, guint status, gpointer userdata)
-{
- LOCATIONS_LOGD("Invoked. status = %u", status);
- location_manager_s *handle = (location_manager_s *) userdata;
-
- if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) {
- if (status == LOCATION_STATUS_2D_FIX || status == LOCATION_STATUS_3D_FIX)
- ((location_service_state_changed_cb)
- handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE])(LOCATIONS_SERVICE_ENABLED, handle->user_data[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]);
- else if (status == LOCATION_STATUS_NO_FIX)
- ((location_service_state_changed_cb)
- handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE])(LOCATIONS_SERVICE_DISABLED, handle->user_data[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]);
- else if (status == LOCATION_STATUS_MOCK_FAIL)
- ((location_service_state_changed_cb)
- handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE])(LOCATIONS_SERVICE_ERROR, handle->user_data[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]);
- }
-}
-#endif
-
static int __compare_position(gconstpointer a, gconstpointer b)
{
if (location_position_equal((LocationPosition *) a, (LocationPosition *)b) == TRUE)
handle->sig_id[_LOCATION_SIGNAL_SERVICE_DISABLED] = 0;
}
-#if 0
- if (handle->sig_id[_LOCATION_SIGNAL_STATUS_CHANGED]) {
- g_signal_handler_disconnect(handle->object, handle->sig_id[_LOCATION_SIGNAL_STATUS_CHANGED]);
- handle->sig_id[_LOCATION_SIGNAL_STATUS_CHANGED] = 0;
- }
-#endif
-
if (handle->sig_id[_LOCATION_SIGNAL_ERROR_EMITTED]) {
g_signal_handler_disconnect(handle->object, handle->sig_id[_LOCATION_SIGNAL_ERROR_EMITTED]);
handle->sig_id[_LOCATION_SIGNAL_ERROR_EMITTED] = 0;
TARGET_LINK_LIBRARIES(${src_name} ${fw_name} ${${fw_test}_LDFLAGS})
ENDFOREACH()
-INSTALL(TARGETS ${src_name} DESTINATION ${TZ_SYS_RW_APP}/test/location/)
+INSTALL(TARGETS ${src_name} DESTINATION ${TZ_SYS_SHARE}/location/)
INSTALL(FILES ${fw_test}.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
<privilege>http://tizen.org/privilege/location</privilege>
<privilege>http://tizen.org/privilege/location.enable</privilege>
</privileges>
- <ui-application appid="capi-location-manager-test" exec=${TZ_SYS_RW_APP}"/test/location/location-test" nodisplay="true" multiple="false" type="capp" taskmanage="false" launch_mode="single">
+ <ui-application appid="capi-location-manager-test" exec=${TZ_SYS_SHARE}"/location/location-test" nodisplay="true" multiple="false" type="capp" taskmanage="false" launch_mode="single">
<label>Location Manager Test</label>
</ui-application>
</manifest>
void _satellite_updated_cb(int num_of_active, int num_of_inview, time_t timestamp, void *user_data)
{
- fprintf(stderr, "-------------------------- satellite updated --------------------------\n");
- fprintf(stderr, "num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp);
+/* fprintf(stderr, "-------------------------- satellite updated --------------------------\n"); */
+ fprintf(stderr, "--- num_of_active[%d] num_of_inview[%d] timestamp[%ld]\n", num_of_active, num_of_inview, timestamp);
- test_timer = g_timeout_add_seconds(1, wait_test, NULL);
+ repeat_count++;
+ if (repeat_count > 60)
+ test_timer = g_timeout_add_seconds(1, wait_test, NULL);
}
static void print_location_status()
fprintf(stderr, "gps_status_set_satellite_updated_cb: %d\n", ret);
}
break;
- }
+ }
case 4:
case 5:
case 6: {
- int timeout = 30;
+ int timeout = 60;
fprintf(stderr, "\n Input timeout ==> ");
ret = scanf("%d", &timeout);
ret = location_manager_request_single_location(manager, timeout, _location_cb, manager);
fprintf(stderr, "request single_location (method: %d): %d\n", method, ret);
break;
- }
+ }
case 11:
case 12:
case 13: {