control = location_gpsd_control_get_default();
device = (LocationGPSDevice *)g_object_new(LOCATION_TYPE_GPS_DEVICE, NULL);
g_object_set(G_OBJECT(control),
"preferred-method", LOCATION_METHOD_USER_SELECTED,
"preferred-interval", LOCATION_INTERVAL_DEFAULT,
NULL);
g_signal_connect(control, "error-verbose", G_CALLBACK(on_error), loop);
g_signal_connect(device, "changed", G_CALLBACK(on_changed), control);
g_signal_connect(control, "gpsd-stopped", G_CALLBACK(on_stop), loop);
control = location_gpsd_control_get_default();
device = (LocationGPSDevice *)g_object_new(LOCATION_TYPE_GPS_DEVICE, NULL);
g_object_set(G_OBJECT(control),
"preferred-method", LOCATION_METHOD_USER_SELECTED,
"preferred-interval", LOCATION_INTERVAL_DEFAULT,
NULL);
g_signal_connect(control, "error-verbose", G_CALLBACK(on_error), loop);
g_signal_connect(device, "changed", G_CALLBACK(on_changed), control);
g_signal_connect(control, "gpsd-stopped", G_CALLBACK(on_stop), loop);
To copy to clipboard, switch view to plain text mode
Bookmarks