Added "tou" command
[nnokia.git] / smshandler.cpp
index 40f6452f47fb4c61065bea6ccf84cc542ac58aec..9a17ee36c11f2ae7bf3efa365b2b07ed832c0514 100644 (file)
@@ -2,6 +2,7 @@
 #include "smshandler.h"
 #include "camshooter.h"
 #include "shootquery.h"
+#include "locationquery.h"
 
 SmsHandler::SmsHandler(QObject *parent) :
     QObject(parent)
@@ -28,13 +29,20 @@ void SmsHandler::slot_message_received(const QMessageId & id, const QMessageMana
     QString content = msg.textContent();
     qDebug() << "content" << content;
 
-    if (!content.compare("go", Qt::CaseInsensitive)) {
-        qDebug() << "receive mms snapshoot request";
+    if (!content.compare("snap", Qt::CaseInsensitive)) {
+        qDebug() << "received mms snapshoot request";
 
         qDebug() << "deleting original message";
         msgManager->removeMessage(id);
 
         new ShootQuery(this, this->camShooter, msg.from());
+    } else if (!content.compare("tou", Qt::CaseInsensitive)) {
+        qDebug() << "received localisation request";
+
+        qDebug() << "deleting original message";
+        msgManager->removeMessage(id);
+
+        new LocationQuery(this, msg.from());
     }
 }