LatitudeUpdater 0.1, fix the previous commit
[googlelatitude] / latitudedaemon.cpp
diff --git a/latitudedaemon.cpp b/latitudedaemon.cpp
new file mode 100644 (file)
index 0000000..35a31e6
--- /dev/null
@@ -0,0 +1,17 @@
+#include "latitudedaemon.h"
+
+LatitudeDaemon::LatitudeDaemon(QObject *parent) :
+    QObject(parent),
+    latitude(this),
+    gps(this) {
+    qDebug() << "* LatitudeDaemon::LatitudeDaemon";
+
+    connect(&latitude, SIGNAL(gotToken()), this, SLOT(gl_GotToken()) );
+    connect(&latitude, SIGNAL(notToken()), this, SLOT(gl_NotToken()) );
+    connect(&latitude, SIGNAL(needAuth()), this, SLOT(gl_needAuth()) );
+
+    connect(&gps, SIGNAL(gotUpdate()), this, SLOT(get_gps()) );
+    connect(&gps, SIGNAL(gotFix()), this, SLOT(set_latitude()) );
+
+    latitude.getAccess();
+}