#include <telepathy-glib/interfaces.h>
#include <location/location-gps-device.h>
+#include <location/location-gpsd-control.h>
#include "connection-watcher.h"
#include "position-publisher.h"
struct _PositionPublisherPrivate
{
ConnectionWatcher *watcher;
+ LocationGPSDControl *gps_control;
LocationGPSDevice *gps_device;
GSList *connections;
GHashTable *location;
g_signal_connect (priv->watcher, "connection-added",
G_CALLBACK (connection_added_cb), obj);
+ priv->gps_control = location_gpsd_control_get_default();
+
+ g_object_set (G_OBJECT(priv->gps_control),
+ "preferred-method", LOCATION_METHOD_USER_SELECTED,
+ "preferred-interval", LOCATION_INTERVAL_120S,
+ NULL);
+
priv->gps_device = g_object_new (LOCATION_TYPE_GPS_DEVICE, NULL);
g_signal_connect (priv->gps_device, "changed",
priv->dispose_has_run = TRUE;
g_object_unref (priv->watcher);
+ g_object_unref (priv->gps_control);
g_object_unref (priv->gps_device);
for (l = priv->connections; l != NULL; l = g_slist_next (l))