Separate in library the application
[googlelatitude] / latituded / daemon.cpp
diff --git a/latituded/daemon.cpp b/latituded/daemon.cpp
new file mode 100644 (file)
index 0000000..a2f6601
--- /dev/null
@@ -0,0 +1,17 @@
+#include "daemon.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();
+}