#include "mapper-types.h"
#include "settings.h"
#include "gps.h"
+#include "gps-conn.h"
#include "map.h"
#include "route.h"
#include "track.h"
curl_global_init(CURL_GLOBAL_NOTHING);
gnome_vfs_init();
/* XXX: Load GPS configuration, then create gps */
-#ifdef WITH_BLUEZ
- _gps=gps_new(GPS_IO_RFCOMM);
-#else
-#ifdef WITH_HILDON_DBUS_BT
- _gps=gps_new(GPS_IO_HILDON_DBUS);
-#else
_gps=gps_new(GPS_IO_SIMULATION);
-#endif
-#endif
+ _gps->connection_retry=gps_retry_connection;
+ _gps->connection_error=NULL;
+ _gps->connection_progress=gps_conn_set_progress;
+ _gps->update_location=gps_location_update;
+ _gps->update_info=gps_info_update;
+
timezone_init();
gpx_init();
variables_init();
/* Initialize D-Bus system connection. */
if (NULL == (dbus_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error))) {
g_printerr("Failed to open connection to D-Bus: %s.\n", error->message);
+ popup_error(_window, "Failed to connect to D-Bus.");
error = NULL;
}
osso_hw_set_event_cb(_osso, NULL, osso_cb_hw_state, NULL);
#endif
- #ifdef WITH_HILDON_DBUS_BT
- if (NULL == (_rfcomm_req_proxy = dbus_g_proxy_new_for_name(dbus_conn, BTCOND_SERVICE, BTCOND_REQ_PATH, BTCOND_REQ_INTERFACE))) {
- g_printerr("Failed to open connection to %s.\n", BTCOND_REQ_INTERFACE);
- popup_error(_window, "Bluetooth connection handling failed.");
- }
- #endif
mis=MAPPER_INIT_UI;
p=0.9;
w="Misc";
case MAPPER_INIT_DONE:
progress_dialog_remove(init_dialog);
if (_enable_gps)
- gps_connect_now(_gps);
+ gps_connect_now(_gps);
return FALSE;
break;
}