/* Get Receiver MAC from GConf. Default is scanned via hci_inquiry. */
_gps->io.address = gconf_client_get_string(gconf_client, GCONF_KEY_GPS_MAC, NULL);
-_gps->io.type = gconf_client_get_int(gconf_client, GCONF_KEY_GPS_TYPE, NULL);
_gps->io.port = gconf_client_get_int(gconf_client, GCONF_KEY_GPS_PORT, NULL);
+value=gconf_client_get(gconf_client, GCONF_KEY_GPS_TYPE, NULL);
+if (value) {
+ GpsIOSourceType type;
+
+ type=gconf_value_get_int(value);
+ if (type>GPS_IO_TYPE_MIN && type<GPS_IO_TYPE_MAX)
+ _gps->io.type=type;
+ else
+ _gps->io.type=GPS_IO_SIMULATION;
+ gconf_value_free(value);
+} else {
+ _gps->io.type=GPS_IO_SIMULATION;
+}
+
/* Get Auto-Download. Default is FALSE. */
_auto_download = gconf_client_get_bool(gconf_client, GCONF_KEY_AUTO_DOWNLOAD, NULL);
* Types of GPS data sources
*/
typedef enum {
+ GPS_IO_TYPE_MIN=0,
GPS_IO_RFCOMM=1, /* Bluetooth rfcomm socket */
GPS_IO_HILDON_DBUS, /* Request rfcomm using hildon bluetooth D-Bus */
GPS_IO_BLUEZ_DBUS, /* Request rfcomm using bluez bluetooth D-Bus*/
GPS_IO_TCP, /* TCP */
GPS_IO_GPSD, /* TCP connection to gpsd (as TCP, but will send a request for NMEA mode */
GPS_IO_GYPSY, /* Gypsy events */
- GPS_IO_SIMULATION /* Random movement */
+ GPS_IO_SIMULATION, /* Random movement */
+ GPS_IO_TYPE_MAX
} GpsIOSourceType;
/** This enumerated type defines the possible connection states. */