Separate in library the application
authorDeveloper <developer@virtu.(none)>
Sun, 11 Sep 2011 21:02:51 +0000 (23:02 +0200)
committerDeveloper <developer@virtu.(none)>
Sun, 11 Sep 2011 21:02:51 +0000 (23:02 +0200)
65 files changed:
LatitudeUpdater.pri [deleted file]
LatitudeUpdaterDaemon.pro [deleted file]
LatitudeUpdaterQML.desktop [deleted file]
LatitudeUpdaterQML.png [deleted file]
LatitudeUpdaterQML.pro [deleted file]
LatitudeUpdaterWidget.desktop [deleted file]
LatitudeUpdaterWidget.png [deleted file]
LatitudeUpdaterWidget.pro [deleted file]
deployment.pri
googlelatitude.cpp [deleted file]
googlelatitude.h [deleted file]
gpscontrol.cpp [deleted file]
gpscontrol.h [deleted file]
latitude.qml/MainPage.qml [new file with mode: 0644]
latitude.qml/latitude.qml.pro [new file with mode: 0644]
latitude.qml/main.cpp [new file with mode: 0644]
latitude.qml/main.qml [new file with mode: 0644]
latitude.qml/qml.cpp [new file with mode: 0644]
latitude.qml/qml.h [new file with mode: 0644]
latitude.qml/resouses.qrc [new file with mode: 0644]
latitude.qt/latitude.qt.pro [new file with mode: 0644]
latitude.qt/main.cpp [new file with mode: 0644]
latitude.qt/widget.cpp [new file with mode: 0644]
latitude.qt/widget.h [new file with mode: 0644]
latituded/daemon.cpp [new file with mode: 0644]
latituded/daemon.h [new file with mode: 0644]
latituded/latituded.pro [new file with mode: 0644]
latituded/main.cpp [new file with mode: 0644]
latitudedaemon.cpp [deleted file]
latitudedaemon.h [deleted file]
latitudeqml.cpp [deleted file]
latitudeqml.h [deleted file]
latitudeupdater.pro
latitudeupdater64.png [new file with mode: 0644]
latitudeupdater80.png [new file with mode: 0644]
latitudeupdater_fremantle.desktop [new file with mode: 0644]
latitudeupdater_harmattan.desktop [new file with mode: 0644]
latitudewidget.cpp [deleted file]
latitudewidget.h [deleted file]
libkqoauth/libkqoauth.pro [new file with mode: 0644]
liblatitudeupdater/googlelatitude.cpp [new file with mode: 0644]
liblatitudeupdater/googlelatitude.h [new file with mode: 0644]
liblatitudeupdater/gpscontrol.cpp [new file with mode: 0644]
liblatitudeupdater/gpscontrol.h [new file with mode: 0644]
liblatitudeupdater/liblatitudeupdater.pro [new file with mode: 0644]
liblocationmaemo5/liblocationmaemo5.pro [new file with mode: 0644]
main-daemon.cpp [deleted file]
main-qml.cpp [deleted file]
main-widget.cpp [deleted file]
qml/MainPage.qml [deleted file]
qml/main.qml [deleted file]
qtc_packaging/debian_fremantle/control
qtc_packaging/debian_fremantle/copyright
qtc_packaging/debian_harmattan/README
qtc_packaging/debian_harmattan/changelog
qtc_packaging/debian_harmattan/control
qtc_packaging/debian_harmattan/copyright
qtc_packaging/debian_harmattan/googlelatitude.aegis
qtc_packaging/debian_harmattan/manifest.aegis [new file with mode: 0644]
qtc_packaging/debian_harmattan/rules
qtc_packaging/debian_harmattan/rules.real
qtc_packaging/icon-256.png [new file with mode: 0644]
qtc_packaging/meego-1.jpg [new file with mode: 0644]
qtc_packaging/screenshot-1.jpg [new file with mode: 0644]
resouses.qrc [deleted file]

diff --git a/LatitudeUpdater.pri b/LatitudeUpdater.pri
deleted file mode 100644 (file)
index 469e384..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-QT       += network
-CONFIG   += mobility
-MOBILITY += location
-
-SOURCES        += gpscontrol.cpp googlelatitude.cpp
-HEADERS += gpscontrol.h   googlelatitude.h
-
-INCLUDEPATH    += libkqoauth
-SOURCES        += libkqoauth/kqoauthauthreplyserver.cpp \
-        libkqoauth/kqoauthrequest.cpp \
-        libkqoauth/kqoauthmanager.cpp \
-        libkqoauth/kqoauthrequest_xauth.cpp \
-        libkqoauth/kqoauthrequest_1.cpp \
-        libkqoauth/kqoauthutils.cpp
-PUBLIC_HEADERS += libkqoauth/kqoauthmanager.h \
-        libkqoauth/kqoauthrequest.h \
-        libkqoauth/kqoauthrequest_1.h \
-        libkqoauth/kqoauthrequest_xauth.h \
-        libkqoauth/kqoauthglobals.h
-PRIVATE_HEADERS += libkqoauth/kqoauthrequest_p.h \
-        libkqoauth/kqoauthmanager_p.h \
-        libkqoauth/kqoauthauthreplyserver.h \
-        libkqoauth/kqoauthauthreplyserver_p.h \
-        libkqoauth/kqoauthutils.h \
-        libkqoauth/kqoauthrequest_xauth_p.h
-HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
-
-contains(QT_CONFIG, maemo5): {
-    QT          += maemo5
-    CONFIG      += link_pkgconfig
-    PKGCONFIG   += glib-2.0 liblocation
-    SOURCES    += liblocationmaemo5/gconfitem.cpp \
-        liblocationmaemo5/liblocationwrapper.cpp \
-        liblocationmaemo5/qgeopositioninfosource_maemo5.cpp \
-        liblocationmaemo5/qgeosatelliteinfosource_maemo5.cpp
-    HEADERS    += liblocationmaemo5/gconfitem_p.h \
-        liblocationmaemo5/liblocationwrapper_p.h \
-        liblocationmaemo5/qgeopositioninfosource_maemo5_p.h \
-        liblocationmaemo5/qgeosatelliteinfosource_maemo5_p.h
-}
-
-# Please do not modify the following two lines. Required for deployment.
-include(deployment.pri)
-qtcAddDeployment()
-
-OTHER_FILES += \
-        qtc_packaging/debian_harmattan/rules \
-        qtc_packaging/debian_harmattan/rules.real \
-        qtc_packaging/debian_harmattan/README \
-        qtc_packaging/debian_harmattan/copyright \
-        qtc_packaging/debian_harmattan/control \
-        qtc_packaging/debian_harmattan/compat \
-        qtc_packaging/debian_harmattan/changelog \
-        qtc_packaging/debian_fremantle/rules \
-        qtc_packaging/debian_fremantle/rules.real \
-        qtc_packaging/debian_fremantle/README \
-        qtc_packaging/debian_fremantle/copyright \
-        qtc_packaging/debian_fremantle/control \
-        qtc_packaging/debian_fremantle/compat \
-        qtc_packaging/debian_fremantle/changelog
diff --git a/LatitudeUpdaterDaemon.pro b/LatitudeUpdaterDaemon.pro
deleted file mode 100644 (file)
index 5c2211a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET = LatitudeUpdaterDaemon
-QT    -= gui
-
-SOURCES += latitudedaemon.cpp main-daemon.cpp
-HEADERS += latitudedaemon.h
-
-include(LatitudeUpdater.pri)
diff --git a/LatitudeUpdaterQML.desktop b/LatitudeUpdaterQML.desktop
deleted file mode 100644 (file)
index 4648ddc..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=LatitudeQML
-Exec=/usr/bin/invoker --single-instance --type=e /opt/linfati.com/bin/LatitudeUpdaterQML
-Icon=LatitudeUpdaterQML
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/LatitudeUpdaterQML.png b/LatitudeUpdaterQML.png
deleted file mode 100644 (file)
index d98268f..0000000
Binary files a/LatitudeUpdaterQML.png and /dev/null differ
diff --git a/LatitudeUpdaterQML.pro b/LatitudeUpdaterQML.pro
deleted file mode 100644 (file)
index 643d411..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-TARGET = LatitudeUpdaterQML
-QT    += declarative
-
-SOURCES += latitudeqml.cpp main-qml.cpp
-HEADERS += latitudeqml.h
-
-RESOURCES   += resouses.qrc
-OTHER_FILES += qml/main.qml qml/MainPage.qml
-
-include(LatitudeUpdater.pri)
diff --git a/LatitudeUpdaterWidget.desktop b/LatitudeUpdaterWidget.desktop
deleted file mode 100644 (file)
index 4fe89bb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=LatitudeWidget
-Exec=/opt/linfati.com/bin/LatitudeUpdaterWidget
-Icon=LatitudeUpdaterWidget
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/LatitudeUpdaterWidget.png b/LatitudeUpdaterWidget.png
deleted file mode 100644 (file)
index d98268f..0000000
Binary files a/LatitudeUpdaterWidget.png and /dev/null differ
diff --git a/LatitudeUpdaterWidget.pro b/LatitudeUpdaterWidget.pro
deleted file mode 100644 (file)
index 8dee1bb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-TARGET          = LatitudeUpdaterWidget
-
-SOURCES += latitudewidget.cpp main-widget.cpp
-HEADERS += latitudewidget.h
-
-include(LatitudeUpdater.pri)
-
index 266eed3..d515c67 100644 (file)
@@ -51,9 +51,16 @@ symbian {
     }
 } else:unix {
     maemo5 {
+        desktopfile.files = $${TARGET}_fremantle.desktop
         desktopfile.path = /usr/share/applications/hildon
-    } else {
+        icon.files = $${TARGET}64.png
+        icon.path = /usr/share/icons/hicolor/64x64/apps
+    } else:!isEmpty(MEEGO_VERSION_MAJOR) {
+        desktopfile.files = $${TARGET}_harmattan.desktop
         desktopfile.path = /usr/share/applications
+        icon.files = $${TARGET}80.png
+        icon.path = /usr/share/icons/hicolor/80x80/apps
+    } else { # Assumed to be a Desktop Unix
         copyCommand =
         for(deploymentfolder, DEPLOYMENTFOLDERS) {
             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
@@ -92,16 +99,18 @@ symbian {
         export($$itempath)
         INSTALLS += $$item
     }
-    icon.files = $${TARGET}.png
-    icon.path = /usr/share/icons/hicolor/64x64/apps
-    desktopfile.files = $${TARGET}.desktop
+
+    !isEmpty(desktopfile.path) {
+        export(icon.files)
+        export(icon.path)
+        export(desktopfile.files)
+        export(desktopfile.path)
+        INSTALLS += icon desktopfile
+    }
+
     target.path = $${installPrefix}/bin
-    export(icon.files)
-    export(icon.path)
-    export(desktopfile.files)
-    export(desktopfile.path)
     export(target.path)
-    INSTALLS += desktopfile icon target
+    INSTALLS += target
 }
 
 export (ICON)
diff --git a/googlelatitude.cpp b/googlelatitude.cpp
deleted file mode 100644 (file)
index 47e90c5..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-#include "googlelatitude.h"
-#include <QtNetwork/QNetworkConfigurationManager>
-
-GoogleLatitude::GoogleLatitude(QObject *parent) :
-    QObject(parent),
-    OauthSettings(this),
-    OAuthGetRequestToken("https://www.google.com/accounts/OAuthGetRequestToken"),
-    OAuthAuthorizeToken("https://www.google.com/accounts/OAuthAuthorizeToken"),
-    OAuthGetAccessToken("https://www.google.com/accounts/OAuthGetAccessToken"),
-    CurrentLocation("https://www.googleapis.com/latitude/v1/currentLocation"),
-    UserAuthorization(""),
-    ConsumerKey("1062862865804.apps.googleusercontent.com"),
-    ConsumerSecretKey("EYQaRaUJ9Fznw8mPMor660Kx"),
-    CurrentLatitude(0),
-    CurrentLongitude(0),
-    CurrentAccuracy(0) {
-    qDebug() << "* GoogleLatitude::GoogleLatitude";
-    OauthRequest = new KQOAuthRequest(this);
-    OauthManager = new KQOAuthManager(this);
-    GoogleOauthAdditional.insert("scope", "https://www.googleapis.com/auth/latitude");
-    GoogleOauthAdditional.insert("xoauth_displayname", "LatitudeUpdater");
-
-    connect(OauthManager, SIGNAL(temporaryTokenReceived(QString,QString)),
-            this, SLOT(onTemporaryTokenReceived(QString, QString)));
-
-    connect(OauthManager, SIGNAL(authorizationReceived(QString,QString)),
-            this, SLOT(onAuthorizationReceived(QString, QString)));
-
-    connect(OauthManager, SIGNAL(accessTokenReceived(QString,QString)),
-            this, SLOT(onAccessTokenReceived(QString,QString)));
-
-    connect(OauthManager, SIGNAL(requestReady(QByteArray)),
-            this, SLOT(onRequestReady(QByteArray)));
-
-    connect(OauthManager, SIGNAL(authorizedRequestDone()),
-            this, SLOT(onAuthorizedRequestDone()));
-
-    connect(this, SIGNAL(gotToken()),
-            this, SLOT(getCurrentLocation()));
-
-    connect(this, SIGNAL(notToken()),
-            this, SLOT(onNotToken()));
-
-    connect(this, SIGNAL(gotToken()),
-            this, SLOT(onGotToken()));
-
-    connect(this, SIGNAL(needAuth()),
-            this, SLOT(onNeedAuth()));
-}
-
-GoogleLatitude::~GoogleLatitude() {
-    qDebug() << "* GoogleLatitude::~GoogleLatitude";
-    delete OauthManager;
-    delete OauthRequest;
-}
-
-void GoogleLatitude::getAccess() {
-    qDebug() << "* GoogleLatitude::getAccess";
-    if ( OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull() ) {
-        OauthRequest->clearRequest();
-        OauthRequest->initRequest(KQOAuthRequest::TemporaryCredentials, OAuthGetRequestToken);
-        OauthRequest->setConsumerKey(ConsumerKey);
-        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
-        OauthRequest->setAdditionalParameters(GoogleOauthAdditional);
-        OauthManager->setHandleUserAuthorization(true);
-        OauthRequest->setHttpMethod(KQOAuthRequest::POST);
-        OauthManager->executeRequest(OauthRequest);
-    } else {
-        emit gotToken();
-    }
-}
-
-void GoogleLatitude::getCurrentLocation() {
-    qDebug() << "* GoogleLatitude::getCurrentLocation";
-    if ( OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull() ) {
-        emit notToken();
-    } else {
-        OauthRequest->clearRequest();
-        OauthRequest->initRequest(KQOAuthRequest::AuthorizedRequest, CurrentLocation);
-        OauthRequest->setToken(OauthSettings.value("oauth_token").toString());
-        OauthRequest->setTokenSecret(OauthSettings.value("oauth_token_secret").toString());
-        OauthRequest->setConsumerKey(ConsumerKey);
-        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
-        OauthRequest->setHttpMethod(KQOAuthRequest::GET);
-        OauthManager->executeRequest(OauthRequest);
-    }
-}
-
-void GoogleLatitude::sendCurrentLocation() {
-    qDebug() << "* GoogleLatitude::sendCurrentLocation";
-    if (OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull()) {
-        emit notToken();
-    } else {
-        if (abs(CurrentLatitude) <= 0.01) return;
-        if (abs(CurrentLongitude) <= 0.01) return;
-        if (abs(CurrentAccuracy) <= 0.01) return;
-
-        QNetworkConfigurationManager mgr;
-        if (!OauthSettings.value("net_auto").toBool() && !mgr.isOnline()) {
-            qDebug() << "* GoogleLatitude::sendCurrentLocation" << "offline";
-            return;
-        }
-
-        QByteArray json_location;
-        json_location = "{\"data\": {\"kind\":\"latitude#location\",";
-        json_location += QString("\"latitude\":%1,").arg(CurrentLatitude);
-        json_location += QString("\"longitude\":%1,").arg(CurrentLongitude);
-        json_location += QString("\"accuracy\":%1").arg(CurrentAccuracy);
-        json_location += "}}";
-        qDebug() << "json_location" <<  json_location;
-
-        OauthRequest->clearRequest();
-        OauthRequest->initRequest(KQOAuthRequest::AuthorizedRequest, CurrentLocation);
-        OauthRequest->setToken(OauthSettings.value("oauth_token").toString());
-        OauthRequest->setTokenSecret(OauthSettings.value("oauth_token_secret").toString());
-        OauthRequest->setConsumerKey(ConsumerKey);
-        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
-        OauthRequest->setHttpMethod(KQOAuthRequest::POST);
-        OauthRequest->setContentType("application/json");
-        OauthRequest->setRawData(json_location);
-        OauthManager->executeRequest(OauthRequest);
-    }
-}
-
-void GoogleLatitude::setCurrentLocation(double lat, double lon, double acc) {
-    qDebug() << "* GoogleLatitude::setCurrentLocation" << lat << lon << acc;
-    CurrentLatitude = lat;
-    CurrentLongitude = lon;
-    CurrentAccuracy = acc;
-}
-
-QUrl GoogleLatitude::getUserAuthorization() {
-    qDebug() << "* GoogleLatitude::getUserAuthorization";
-    return UserAuthorization;
-}
-
-void GoogleLatitude::setAutoConnect(bool status) {
-    qDebug() << "* GoogleLatitude::setAutoConnect" << status;
-    OauthSettings.setValue("net_auto", status);
-}
-
-bool GoogleLatitude::getAutoConnect() {
-    qDebug() << "* GoogleLatitude::getAutoConnect";
-    return OauthSettings.value("net_auto").toBool();
-}
-
-void GoogleLatitude::onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret) {
-    qDebug() << "* GoogleLatitude::onTemporaryTokenReceived" << temporaryToken << temporaryTokenSecret;
-    if( OauthManager->lastError() == KQOAuthManager::NoError) {
-        UserAuthorization = OauthManager->getUserAuthorization(OAuthAuthorizeToken);
-        qDebug() << "* GoogleLatitude::onTemporaryTokenReceived" << "UserAuthorization" << UserAuthorization;
-        emit needAuth();
-    }
-}
-
-void GoogleLatitude::onAuthorizationReceived(QString token, QString verifier) {
-    qDebug() << "* GoogleLatitude::onAuthorizationReceived" << token << verifier;
-    OauthManager->getUserAccessTokens(OAuthGetAccessToken);
-    if(OauthManager->lastError() != KQOAuthManager::NoError) {
-        emit notToken();
-    }
-}
-
-void GoogleLatitude::onAccessTokenReceived(QString token, QString tokenSecret) {
-    qDebug() << "* GoogleLatitude::onAccessTokenReceived" << token << tokenSecret;
-    OauthSettings.setValue("oauth_token", token);
-    OauthSettings.setValue("oauth_token_secret", tokenSecret);
-    emit gotToken();
-}
-
-void GoogleLatitude::onRequestReady(QByteArray response) {
-    qDebug() << "* GoogleLatitude::onRequestReady" << response;
-    if (response.contains("Invalid Credentials") ) {
-        OauthSettings.remove("oauth_token");
-        OauthSettings.remove("oauth_token_secret");
-        emit notToken();
-    }
-}
diff --git a/googlelatitude.h b/googlelatitude.h
deleted file mode 100644 (file)
index 1f99a24..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef GOOGLELATITUDE_H
-#define GOOGLELATITUDE_H
-
-#include <QtCore/QObject>
-#include <QtCore/QSettings>
-#include <QtCore/QtDebug>
-#include <QtKOAuth>
-
-class GoogleLatitude : public QObject {
-    Q_OBJECT
-
-public:
-    GoogleLatitude(QObject *parent = 0);
-    ~GoogleLatitude();
-
-public slots:
-    void getAccess();
-    void getCurrentLocation();
-    void sendCurrentLocation();
-    void setCurrentLocation(double la, double lo, double ac);
-    QUrl getUserAuthorization();
-    void setAutoConnect(bool status);
-    bool getAutoConnect();
-
-private slots:
-    void onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret);
-    void onAuthorizationReceived(QString token, QString verifier);
-    void onAccessTokenReceived(QString token, QString tokenSecret);
-    void onRequestReady(QByteArray response);
-    void onAuthorizedRequestDone() { qDebug() << "* GoogleLatitude::onAuthorizedRequestDone"; }
-    void onNotToken() { qDebug() << "* GoogleLatitude::onNotToken"; }
-    void onGotToken() { qDebug() << "* GoogleLatitude::onGotToken"; }
-    void onNeedAuth() { qDebug() << "* GoogleLatitude::onNeedAuth"; }
-
-signals:
-    void notToken();
-    void gotToken();
-    void needAuth();
-
-private:
-    QSettings OauthSettings;
-    QUrl OAuthGetRequestToken;
-    QUrl OAuthAuthorizeToken;
-    QUrl OAuthGetAccessToken;
-    QUrl CurrentLocation;
-    QUrl UserAuthorization;
-    KQOAuthParameters GoogleOauthAdditional;
-    QString ConsumerKey;
-    QString ConsumerSecretKey;
-    double CurrentLatitude;
-    double CurrentLongitude;
-    double CurrentAccuracy;
-    KQOAuthManager *OauthManager;
-    KQOAuthRequest *OauthRequest;
-};
-
-#endif // GOOGLELATITUDE_H
diff --git a/gpscontrol.cpp b/gpscontrol.cpp
deleted file mode 100644 (file)
index 2b900c9..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-#include "gpscontrol.h"
-#include <QtNetwork/QNetworkConfigurationManager>
-
-GpsControl::GpsControl(QObject *parent) :
-    QObject(parent),
-    GpsSettings(this),
-    GpsSource(QGeoPositionInfoSource::createDefaultSource(this)),
-    GpsPosition(),
-    GpsTimeout(this),
-    GpsInterval(this) {
-    qDebug() << "* GpsControl::GpsControl";
-
-    GpsTimeout.setSingleShot(true);
-    GpsInterval.setSingleShot(true);
-
-    setPositioningMethod(GpsSettings.value("gps_method", "cell").toString());
-    setTimeOut(GpsSettings.value("gps_timeout", 60).toInt());
-    setInterval(GpsSettings.value("gps_interval", 15*60).toInt());
-
-    if (!GpsSource) qDebug() << "* GpsControl::GpsControl" << "Not GpsSource";
-
-    if (GpsSource) connect(GpsSource, SIGNAL(positionUpdated(QGeoPositionInfo)),
-                           this, SLOT(setCurrentLocation(QGeoPositionInfo)));
-
-    connect(this, SIGNAL(gotUpdate()),
-            this, SLOT(onGotUpdate()));
-
-    connect(this, SIGNAL(gotFix()),
-            this, SLOT(onGotFix()));
-
-}
-
-void GpsControl::setTimeOut(int sec) {
-    qDebug() << "* GpsControl::setTimeOut" << sec;
-    GpsSettings.setValue("gps_timeout", sec);
-}
-
-int GpsControl::getTimeOut() {
-    qDebug() << "* GpsControl::getTimeOut";
-    return GpsSettings.value("gps_timeout").toInt();
-}
-
-void GpsControl::setInterval(int sec) {
-    qDebug() << "* GpsControl::setInterval" << sec;
-    GpsSettings.setValue("gps_interval", sec);
-}
-
-int GpsControl::getInterval() {
-    qDebug() << "* GpsControl::getInterval";
-    return GpsSettings.value("gps_interval").toInt();
-}
-
-void GpsControl::setPositioningMethod(QString method) {
-    qDebug() << "* GpsControl::setPositioningMethod" << method;
-    if (method == "gps") {
-        GpsSettings.setValue("gps_method", method);
-        if (GpsSource) GpsSource->setPreferredPositioningMethods(
-                    QGeoPositionInfoSource::SatellitePositioningMethods);
-    }
-    if (method == "cell") {
-        GpsSettings.setValue("gps_method", method);
-        if (GpsSource) GpsSource->setPreferredPositioningMethods(
-                    QGeoPositionInfoSource::NonSatellitePositioningMethods);
-    }
-    if (method == "all") {
-        GpsSettings.setValue("gps_method", method);
-        if (GpsSource) GpsSource->setPreferredPositioningMethods(
-                    QGeoPositionInfoSource::AllPositioningMethods);
-    }
-}
-
-void GpsControl::startUpdates() {
-    qDebug() << "* GpsControl::startUpdates";
-
-    GpsTimeout.singleShot(GpsSettings.value("gps_timeout").toInt()*1000,
-                          this, SLOT(stopUpdates()));
-    GpsInterval.singleShot(GpsSettings.value("gps_interval").toInt()*1000,
-                           this, SLOT(startUpdates()));
-
-    QNetworkConfigurationManager mgr;
-    if (!GpsSettings.value("net_auto").toBool() && !mgr.isOnline()) {
-        qDebug() << "* GpsControl::startUpdates" << "offline";
-        return;
-    }
-
-    if (GpsSource) GpsSource->startUpdates();
-}
-
-void GpsControl::stopUpdates(bool force) {
-    qDebug() << "* GpsControl::stopUpdates" << force;
-
-    if (GpsSource) GpsSource->stopUpdates();
-
-    if (force) {
-        GpsTimeout.stop();
-        GpsInterval.stop();
-    } else {
-        if (GpsSource && GpsSource->lastKnownPosition(GpsSettings.value("gps_method")
-                                         == "gps" ? true : false).isValid() ) {
-            emit gotFix();
-        }
-    }
-}
-
-double GpsControl::getCurrentLatitude() {
-    qDebug() << "* GpsControl::getCurrentLatitude";
-    return GpsPosition.coordinate().latitude();
-}
-
-double GpsControl::getCurrentLongitude() {
-    qDebug() << "* GpsControl::getCurrentLongitude";
-    return GpsPosition.coordinate().longitude();
-}
-
-double GpsControl::getCurrentAccuracy() {
-    qDebug() << "* GpsControl::getCurrentAccuracy";
-    return GpsPosition.attribute(QGeoPositionInfo::HorizontalAccuracy);
-}
-
-unsigned int GpsControl::getCurrentTimestamp() {
-    qDebug() << "* GpsControl::getCurrentTimestamp";
-    return GpsPosition.timestamp().toTime_t();
-}
-
-void GpsControl::setCurrentLocation(QGeoPositionInfo pos) {
-    qDebug() << "* GpsControl::setCurrentLocation" << pos;
-    if (pos.isValid()) {
-        GpsPosition = pos;
-        emit gotUpdate();
-    }
-}
diff --git a/gpscontrol.h b/gpscontrol.h
deleted file mode 100644 (file)
index 7a7f6f5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef GPSCONTROL_H
-#define GPSCONTROL_H
-
-#include <QObject>
-#include <QtCore/QDebug>
-#include <QtCore/QSettings>
-#include <QtCore/QTimer>
-#include <QtLocation/QGeoPositionInfo>
-#include <QtLocation/QGeoPositionInfoSource>
-
-using namespace QtMobility;
-
-class GpsControl : public QObject {
-    Q_OBJECT
-public:
-    GpsControl(QObject *parent = 0);
-
-signals:
-    void gotUpdate();
-    void gotFix();
-
-public slots:
-    void setTimeOut(int sec);
-    int getTimeOut();
-    void setInterval(int sec);
-    int getInterval();
-    void setPositioningMethod(QString method);
-    QString getPositioningMethod() {return GpsSettings.value("gps_method").toString();}
-    void startUpdates();
-    void stopUpdates(bool force = false);
-    double getCurrentLatitude();
-    double getCurrentLongitude();
-    double getCurrentAccuracy();
-    unsigned int getCurrentTimestamp();
-
-private slots:
-    void setCurrentLocation(QGeoPositionInfo pos);
-    void onGotUpdate() { qDebug() << "* GpsControl::ongotUpdate"; }
-    void onGotFix() { qDebug() << "* GpsControl::ongotFix"; }
-
-private:
-    QSettings GpsSettings;
-    QGeoPositionInfoSource *GpsSource;
-    QGeoPositionInfo GpsPosition;
-    QTimer GpsTimeout;
-    QTimer GpsInterval;
-};
-
-#endif // GPSCONTROL_H
diff --git a/latitude.qml/MainPage.qml b/latitude.qml/MainPage.qml
new file mode 100644 (file)
index 0000000..caeb84f
--- /dev/null
@@ -0,0 +1,202 @@
+import QtQuick 1.0
+import com.meego 1.0
+
+Page {
+    id: mainPage
+    orientationLock: PageOrientation.LockLandscape
+    Column {
+        spacing: 16
+        Row {
+            width: rootWindow.width
+            Button {
+                id: do_auth
+                width: rootWindow.width / 3
+                text: "Auth"
+                enabled: false
+                onClicked: {
+                    Qt.openUrlExternally(latitude.getUserAuthorization())
+                }
+            }
+            Button {
+                id: do_start
+                width: rootWindow.width / 3
+                text: "Start"
+                enabled: false
+                onClicked: {
+                    do_start.enabled = false;
+                    do_stop.enabled = true;
+                    if (!demonio.demonio_start()) {
+                        gps.startUpdates()
+                    }
+                }
+            }
+            Button {
+                id: do_stop
+                width: rootWindow.width / 3
+                text: "Stop"
+                enabled: false
+                onClicked: {
+                    do_start.enabled = true;
+                    do_stop.enabled = false;
+                    if (!demonio.demonio_stop()) {
+                        gps.stopUpdates(true)
+                    }
+                }
+            }
+        }
+        Row {
+            Label {
+                id: method_label
+                text: "Method"
+                width: rootWindow.width / 4
+                anchors.verticalCenter: method_button.verticalCenter
+            }
+            ButtonRow {
+                id: method_button
+                width: rootWindow.width * 2 / 3
+                Button {
+                    id: method_cell
+                    text: "Cell Tower"
+                    checked: gps.getPositioningMethod() == "cell" ? true : false
+                    onClicked: gps.setPositioningMethod("cell")
+                }
+                Button {
+                    id: method_all
+                    text: "Both"
+                    checked: gps.getPositioningMethod() == "all" ? true : false
+                    onClicked: gps.setPositioningMethod("all")
+                }
+                Button {
+                    id: method_agps
+                    text: "Only GPS"
+                    checked: gps.getPositioningMethod() == "gps" ? true : false
+                    onClicked: gps.setPositioningMethod("gps")
+                }
+            }
+        }
+        Row {
+            Label {
+                id: timeout_label
+                text: "Time Out"
+                width: rootWindow.width / 4
+                anchors.verticalCenter: timeout_slider.verticalCenter
+            }
+            Slider {
+                id: timeout_slider
+                width: rootWindow.width / 2
+                valueIndicatorVisible: true
+                minimumValue: 5
+                maximumValue: 120
+                stepSize: 5
+                value: gps.getTimeOut()
+            }
+            Label {
+                id: timeout_value
+                text: timeout_slider.value + " seg."
+                width: rootWindow.width / 4
+                anchors.verticalCenter: timeout_slider.verticalCenter
+            }
+            Connections {
+                target: timeout_slider
+                onValueChanged: {
+                    timeout_value.text = timeout_slider.value + " seg."
+                    gps.setTimeOut(timeout_slider.value)
+                }
+            }
+        }
+        Row {
+            Label {
+                id: interval_label
+                text: "Interval"
+                width: rootWindow.width / 4
+                anchors.verticalCenter: interval_slider.verticalCenter
+            }
+            Slider {
+                id: interval_slider
+                width: rootWindow.width / 2
+                valueIndicatorVisible: true
+                minimumValue: 5
+                maximumValue: 60
+                stepSize: 5
+                value: gps.getInterval() / 60
+            }
+            Label {
+                id: interval_value
+                text:  interval_slider.value + " min."
+                width: rootWindow.width / 4
+                anchors.verticalCenter: interval_slider.verticalCenter
+            }
+            Connections {
+                target: interval_slider
+                onValueChanged: {
+                    interval_value.text = interval_slider.value + " min."
+                    gps.setInterval(interval_slider.value*60)
+                }
+            }
+        }
+        Row {
+            Label {
+                id: connect_label
+                text: "Auto Connect"
+                width: rootWindow.width / 4
+                anchors.verticalCenter: connect_switch.verticalCenter
+            }
+            Switch {
+                id: connect_switch
+                width: rootWindow.width / 2
+                checked: latitude.getAutoConnect() ? true : false
+                onCheckedChanged: {
+                    connect_value.text = checked
+                    latitude.setAutoConnect(checked)
+                }
+            }
+            Label {
+                id: connect_value
+                text:  connect_switch.checked
+                width: rootWindow.width / 4
+                anchors.verticalCenter: connect_switch.verticalCenter
+            }
+        }
+
+        Connections {
+            target: latitude
+            onGotToken: {
+                do_auth.enabled = false;
+                if (demonio.demonio_status()) {
+                    do_start.enabled = false;
+                    do_stop.enabled = true;
+                } else {
+                    do_start.enabled = true;
+                    do_stop.enabled = false;
+                }
+            }
+        }
+        Connections {
+            target: latitude
+            onNotToken: {
+                do_auth.enabled = true;
+                do_start.enabled = false;
+                do_stop.enabled = false;
+                if (!demonio.demonio_stop()) {
+                    gps.stopUpdates(true)
+                }
+            }
+        }
+        Connections {
+            target: latitude
+            onNeedAuth: {
+                do_auth.enabled = true;
+            }
+        }
+
+        Connections {
+            target: gps
+            onGotFix: {
+                latitude.setCurrentLocation(gps.getCurrentLatitude(),
+                                            gps.getCurrentLongitude(),
+                                            gps.getCurrentAccuracy())
+                latitude.sendCurrentLocation()
+            }
+        }
+    }
+}
diff --git a/latitude.qml/latitude.qml.pro b/latitude.qml/latitude.qml.pro
new file mode 100644 (file)
index 0000000..2635e0d
--- /dev/null
@@ -0,0 +1,26 @@
+TEMPLATE = app
+TARGET   = latitude.qml
+target.path = /opt/linfati.com/bin/
+INSTALLS += target
+
+QT       += network
+CONFIG   += mobility
+MOBILITY += location
+
+INCLUDEPATH += ../liblatitudeupdater
+INCLUDEPATH += ../libkqoauth
+
+LIBS += ../liblocationmaemo5/liblocationmaemo5.a
+LIBS += ../liblatitudeupdater/liblatitudeupdater.a
+LIBS += ../libkqoauth/libkqoauth.a
+
+QT       += declarative
+HEADERS  += qml.h
+SOURCES  += qml.cpp main.cpp
+RESOURCES   += resouses.qrc
+OTHER_FILES += main.qml MainPage.qml
+
+# enable booster
+CONFIG += qdeclarative-boostable
+QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
+QMAKE_LFLAGS += -pie -rdynamic
diff --git a/latitude.qml/main.cpp b/latitude.qml/main.cpp
new file mode 100644 (file)
index 0000000..1614a09
--- /dev/null
@@ -0,0 +1,16 @@
+#include <QtGui/QApplication>
+#include "qml.h"
+
+Q_DECL_EXPORT int main(int argc, char *argv[]) {
+    qDebug() << "* Main QML";
+    QCoreApplication::setOrganizationName("linfati.com");
+    QCoreApplication::setOrganizationDomain("linfati.com");
+    QCoreApplication::setApplicationName("latitudeupdater");
+
+    QApplication lu(argc, argv);
+
+    LatitudeQML mygui;
+    mygui.showFullScreen();
+
+    return lu.exec();
+}
diff --git a/latitude.qml/main.qml b/latitude.qml/main.qml
new file mode 100644 (file)
index 0000000..6655bf5
--- /dev/null
@@ -0,0 +1,12 @@
+import QtQuick 1.0
+import com.meego 1.0
+
+PageStackWindow {
+    id: rootWindow
+    initialPage: mainPage
+    MainPage {
+        id: mainPage
+    }
+    showToolBar: false
+    showStatusBar: true
+}
diff --git a/latitude.qml/qml.cpp b/latitude.qml/qml.cpp
new file mode 100644 (file)
index 0000000..95981ec
--- /dev/null
@@ -0,0 +1,18 @@
+#include "qml.h"
+#include <QtDeclarative/QDeclarativeContext>
+
+LatitudeQML::LatitudeQML(QDeclarativeView *parent) :
+    QDeclarativeView(parent),
+    latitude(this),
+    gps(this),
+    demonio("/opt/linfati.com/bin/latituded"),
+    cli(this) {
+    qDebug() << "* LatitudeQML::LatitudeQML";
+
+    rootContext()->setContextProperty("latitude", &latitude);
+    rootContext()->setContextProperty("gps", &gps);
+    rootContext()->setContextProperty("demonio", this);
+    setSource(QUrl("qrc:/main.qml"));
+
+    latitude.getAccess();
+}
diff --git a/latitude.qml/qml.h b/latitude.qml/qml.h
new file mode 100644 (file)
index 0000000..a23d734
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef LatitudeQML_H
+#define LatitudeQML_H
+
+#include <QObject>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtCore/QProcess>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtCore/QFile>
+#include "googlelatitude.h"
+#include "gpscontrol.h"
+
+class LatitudeQML : public QDeclarativeView {
+    Q_OBJECT
+public:
+    LatitudeQML(QDeclarativeView *parent = 0);
+
+signals:
+
+public slots:
+    bool demonio_status() {
+        qDebug() << "LatitudeQML::demonio_status";
+        if (system("killall -0 latituded 2> /dev/null" )) {
+            return false;
+        }
+        return true;
+    }
+    bool demonio_start() {
+        qDebug() << "LatitudeQML::demonio_start";
+        if (demonio.exists()) {
+            cli.startDetached(demonio.fileName());
+            return true;
+        }
+        qDebug() << "LatitudeQML:: demonio none";
+        return false;
+    }
+    bool demonio_stop() {
+        qDebug() << "LatitudeQML::demonio_stop";
+        if (demonio.exists()) {
+            qDebug() << "LatitudeQML:: demonio kill" << system("killall latituded 2> /dev/null");
+            return true;
+        }
+        return false;
+    }
+
+private slots:
+
+private:
+    GoogleLatitude latitude;
+    GpsControl gps;
+    QFile demonio;
+    QProcess cli;
+};
+
+#endif // LatitudeQML_H
diff --git a/latitude.qml/resouses.qrc b/latitude.qml/resouses.qrc
new file mode 100644 (file)
index 0000000..44f1eb8
--- /dev/null
@@ -0,0 +1,6 @@
+<RCC>
+    <qresource prefix="/">
+        <file>main.qml</file>
+        <file>MainPage.qml</file>
+    </qresource>
+</RCC>
diff --git a/latitude.qt/latitude.qt.pro b/latitude.qt/latitude.qt.pro
new file mode 100644 (file)
index 0000000..ba96b9b
--- /dev/null
@@ -0,0 +1,18 @@
+TEMPLATE = app
+TARGET   = latitude.qt
+target.path = /opt/linfati.com/bin/
+INSTALLS += target
+
+QT       += network
+CONFIG   += mobility
+MOBILITY += location
+
+INCLUDEPATH += ../liblatitudeupdater
+INCLUDEPATH += ../libkqoauth
+
+LIBS += ../liblocationmaemo5/liblocationmaemo5.a
+LIBS += ../liblatitudeupdater/liblatitudeupdater.a
+LIBS += ../libkqoauth/libkqoauth.a
+
+HEADERS  += widget.h
+SOURCES  += widget.cpp main.cpp
diff --git a/latitude.qt/main.cpp b/latitude.qt/main.cpp
new file mode 100644 (file)
index 0000000..c403fbf
--- /dev/null
@@ -0,0 +1,16 @@
+#include <QtGui/QApplication>
+#include "widget.h"
+
+int main(int argc, char *argv[]) {
+    qDebug() << "* Main Widget";
+    QCoreApplication::setOrganizationName("linfati.com");
+    QCoreApplication::setOrganizationDomain("linfati.com");
+    QCoreApplication::setApplicationName("latitudeupdater");
+
+    QApplication lu(argc, argv);
+
+    LatitudeGUI mygui;
+    mygui.showMaximized();
+
+    return lu.exec();
+}
diff --git a/latitude.qt/widget.cpp b/latitude.qt/widget.cpp
new file mode 100644 (file)
index 0000000..86d8e46
--- /dev/null
@@ -0,0 +1,116 @@
+#include "widget.h"
+
+LatitudeGUI::LatitudeGUI(QWidget *parent) :
+    QWidget(parent),
+    latitude(this),
+    gps(this),
+    demonio("/opt/linfati.com/bin/latituded"),
+    cli(this) {
+    qDebug() << "* LatitudeGUI::LatitudeGUI";
+    setWindowTitle(tr("LatitudeUpdater"));
+
+    // row 1
+    layout_row1 = new QHBoxLayout();
+    do_oauth = new QPushButton("Auth");
+    do_start = new QPushButton("Start");
+    do_stop = new QPushButton("Stop");
+    layout_row1->addWidget(do_oauth);
+    layout_row1->addWidget(do_start);
+    layout_row1->addWidget(do_stop);
+
+    do_oauth->setDisabled(true);
+    do_start->setDisabled(true);
+    do_stop->setDisabled(true);
+
+    connect(do_oauth, SIGNAL(clicked()), this, SLOT(gl_webauth()) );
+    connect(do_start, SIGNAL(clicked()), this, SLOT(gps_start()) );
+    connect(do_stop, SIGNAL(clicked()), this, SLOT(gps_stop()) );
+
+    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(gotFix()), this, SLOT(set_latitude()) );
+
+    // row 2
+    layout_row2 = new QHBoxLayout();
+    gps_group = new QButtonGroup();
+    gps_method = new QLabel("Method");
+    gps_cell = new QRadioButton("Cell Tower");
+    gps_both = new QRadioButton("Both");
+    gps_agps = new QRadioButton("Only Gps");
+    gps_group->addButton(gps_cell);
+    gps_group->addButton(gps_both);
+    gps_group->addButton(gps_agps);
+    layout_row2->addWidget(gps_method);
+    layout_row2->addWidget(gps_cell);
+    layout_row2->addWidget(gps_both);
+    layout_row2->addWidget(gps_agps);
+
+    if ( gps.getPositioningMethod() == "gps" ) gps_agps->setChecked(true);
+    if ( gps.getPositioningMethod() == "cell" ) gps_cell->setChecked(true);
+    if ( gps.getPositioningMethod() == "all" ) gps_both->setChecked(true);
+
+    connect(gps_cell, SIGNAL(clicked()), this, SLOT(set_method()) );
+    connect(gps_both, SIGNAL(clicked()), this, SLOT(set_method()) );
+    connect(gps_agps, SIGNAL(clicked()), this, SLOT(set_method()) );
+
+    // row 3
+    layout_row3 = new QHBoxLayout();
+    gps_to_label = new QLabel("Time Out");
+    gps_to_slider = new QSlider(Qt::Horizontal);
+    gps_to_slider->setSingleStep(5);
+    gps_to_slider->setRange(5, 120);
+    gps_to_slider->setValue(gps.getTimeOut());
+    gps_to_slider_value = new QLabel(QString("%1 sec.").arg(gps_to_slider->value()));
+    layout_row3->addWidget(gps_to_label);
+    layout_row3->addWidget(gps_to_slider);
+    layout_row3->addWidget(gps_to_slider_value);
+
+    connect(gps_to_slider, SIGNAL(valueChanged(int)), this, SLOT(set_to(int)) );
+
+    // row 4
+    layout_row4 = new QHBoxLayout();
+    gps_i_label = new QLabel("Interval");
+
+    gps_i_slider = new QSlider(Qt::Horizontal);
+    gps_i_slider->setSingleStep(5);
+    gps_i_slider->setRange(5, 60);
+    gps_i_slider->setValue(gps.getInterval()/60);
+    gps_i_slider_value = new QLabel(QString("%1 min.").arg(gps_i_slider->value()));
+    layout_row4->addWidget(gps_i_label);
+    layout_row4->addWidget(gps_i_slider);
+    layout_row4->addWidget(gps_i_slider_value);
+
+    connect(gps_i_slider, SIGNAL(valueChanged(int)), this, SLOT(set_i(int)) );
+
+    // row 5
+    layout_row5 = new QHBoxLayout();
+    gps_ac_group = new QButtonGroup();
+    gps_ac_label = new QLabel("Auto Connect");
+    gps_ac_yes = new QRadioButton("Yes");
+    gps_ac_not = new QRadioButton("No");
+    gps_ac_group->addButton(gps_ac_yes);
+    gps_ac_group->addButton(gps_ac_not);
+    layout_row5->addWidget(gps_ac_label);
+    layout_row5->addWidget(gps_ac_yes);
+    layout_row5->addWidget(gps_ac_not);
+
+    if ( latitude.getAutoConnect() == true ) gps_ac_yes->setChecked(true);
+    if ( latitude.getAutoConnect() == false ) gps_ac_not->setChecked(true);
+
+    connect(gps_ac_yes, SIGNAL(clicked()), this, SLOT(set_ac_yes()) );
+    connect(gps_ac_not, SIGNAL(clicked()), this, SLOT(set_ac_not()) );
+
+    // gui
+    layout_gui = new QVBoxLayout();
+    layout_gui->addLayout(layout_row1);
+    layout_gui->addLayout(layout_row2);
+    layout_gui->addLayout(layout_row3);
+    layout_gui->addLayout(layout_row4);
+    layout_gui->addLayout(layout_row5);
+
+    setLayout(layout_gui);
+    latitude.getAccess();
+}
+
diff --git a/latitude.qt/widget.h b/latitude.qt/widget.h
new file mode 100644 (file)
index 0000000..eb1c3e3
--- /dev/null
@@ -0,0 +1,149 @@
+#ifndef LATITUDEGUI_H
+#define LATITUDEGUI_H
+
+#include <QtGui/QWidget>
+#include <QtGui/QPushButton>
+#include <QtGui/QLabel>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSlider>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QDesktopServices>
+#include <QtCore/QProcess>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtCore/QFile>
+#include "googlelatitude.h"
+#include "gpscontrol.h"
+
+class LatitudeGUI : public QWidget {
+    Q_OBJECT
+public:
+    LatitudeGUI(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+private slots:
+    void gl_GotToken() {
+        qDebug() << "* LatitudeGUI::gl_GotToken";
+        do_oauth->setDisabled(true);
+        if (system("killall -0 latituded 2> /dev/null" )) {
+            do_start->setEnabled(true);
+            do_stop->setDisabled(true);
+        } else {
+            do_start->setDisabled(true);
+            do_stop->setEnabled(true);
+        }
+    }
+    void gl_NotToken() {
+        qDebug() << "* LatitudeGUI::gl_NotToken";
+        do_oauth->setEnabled(true);
+        do_start->setDisabled(true);
+        do_stop->setDisabled(true);
+        gps.stopUpdates(true);
+    }
+    void gl_needAuth() {
+        qDebug() << "* LatitudeGUI::gl_needAuth";
+        do_oauth->setEnabled(true);
+    }
+    void gl_webauth() {
+        qDebug() << "* LatitudeGUI::gl_webauth";
+        QDesktopServices::openUrl(latitude.getUserAuthorization());
+    }
+    void gps_start() {
+        qDebug() << "* LatitudeGUI::gps_start";
+        do_start->setDisabled(true);
+        do_stop->setEnabled(true);
+        if (demonio.exists()) {
+            qDebug() << "* LatitudeGUI:: demonio";
+            cli.startDetached(demonio.fileName());
+            return;
+        }
+        qDebug() << "* LatitudeGUI:: demonio none";
+        gps.startUpdates();
+    }
+    void gps_stop() {
+        qDebug() << "* LatitudeGUI::gps_stop";
+        do_start->setEnabled(true);
+        do_stop->setDisabled(true);
+        if (demonio.exists()) {
+            qDebug() << "* LatitudeGUI:: demonio kill" << system("killall latituded 2> /dev/null");
+        } else {
+            gps.stopUpdates(true);
+        }
+    }
+    void set_latitude() {
+        qDebug() << "* LatitudeGUI::set_latitude";
+        latitude.setCurrentLocation(gps.getCurrentLatitude(),
+                                    gps.getCurrentLongitude(),
+                                    gps.getCurrentAccuracy());
+        latitude.sendCurrentLocation();
+    }
+    void set_method() {
+        qDebug() << "* LatitudeGUI::set_method";
+        if (gps_cell->isChecked()) gps.setPositioningMethod("cell");
+        if (gps_both->isChecked()) gps.setPositioningMethod("all");
+        if (gps_agps->isChecked()) gps.setPositioningMethod("gps");
+    }
+    void set_to(int value) {
+        qDebug() << "* LatitudeGUI::set_to()" << value;
+        gps.setTimeOut(value);
+        gps_to_slider_value->setText(QString("%1 sec.").arg(value));
+
+    }
+    void set_i(int value) {
+        qDebug() << "* LatitudeGUI::set_i()" << value;
+        gps.setInterval(value*60);
+        gps_i_slider_value->setText(QString("%1 min.").arg(value));
+    }
+    void set_ac_yes() {
+        qDebug() << "* LatitudeGUI::set_ac_yes";
+        latitude.setAutoConnect(true);
+    }
+    void set_ac_not() {
+        qDebug() << "* LatitudeGUI::set_ac_not";
+        latitude.setAutoConnect(false);
+    }
+
+private:
+    GoogleLatitude latitude;
+    GpsControl gps;
+    QFile demonio;
+    QProcess cli;
+
+    QHBoxLayout *layout_row1;
+    QPushButton *do_oauth;
+    QPushButton *do_start;
+    QPushButton *do_stop;
+
+    QHBoxLayout *layout_row2;
+    QLabel *gps_method;
+    QButtonGroup *gps_group;
+    QRadioButton *gps_cell;
+    QRadioButton *gps_both;
+    QRadioButton *gps_agps;
+
+    QHBoxLayout *layout_row3;
+    QLabel *gps_to_label;
+    QSlider *gps_to_slider;
+    QLabel *gps_to_slider_value;
+
+    QHBoxLayout *layout_row4;
+    QLabel *gps_i_label;
+    QSlider *gps_i_slider;
+    QLabel *gps_i_slider_value;
+
+    QHBoxLayout *layout_row5;
+    QLabel *gps_ac_label;
+    QButtonGroup *gps_ac_group;
+    QRadioButton *gps_ac_yes;
+    QRadioButton *gps_ac_not;
+
+    QVBoxLayout *layout_gui;
+};
+
+#endif // LATITUDEGUI_H
+
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();
+}
diff --git a/latituded/daemon.h b/latituded/daemon.h
new file mode 100644 (file)
index 0000000..d18a673
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef LATITUDEDAEMON_H
+#define LATITUDEDAEMON_H
+
+#include <QObject>
+#include <QtCore/QCoreApplication>
+#include "googlelatitude.h"
+#include "gpscontrol.h"
+
+class LatitudeDaemon : public QObject {
+    Q_OBJECT
+public:
+    LatitudeDaemon(QObject *parent = 0);
+signals:
+
+public slots:
+
+private slots:
+    void gl_GotToken() {
+        qDebug() << "LatitudeDaemon::gl_GotToken()";
+        gps.startUpdates();
+    }
+    void gl_NotToken() {
+        qDebug() << "LatitudeDaemon::gl_NotToken()";
+        QCoreApplication::exit();
+    }
+    void gl_needAuth() {
+        qDebug() << "LatitudeDaemon::gl_needAuth()";
+        QCoreApplication::exit();
+    }
+    void get_gps() {
+        qDebug() << "LatitudeDaemon::get_gps()"
+                 << gps.getCurrentLatitude()
+                 << gps.getCurrentLongitude()
+                 << gps.getCurrentAccuracy()
+                 << gps.getCurrentTimestamp();
+    }
+    void set_latitude() {
+        qDebug() << "LatitudeDaemon::set_latitude()"
+                 << gps.getCurrentLatitude()
+                 << gps.getCurrentLongitude()
+                 << gps.getCurrentAccuracy()
+                 << gps.getCurrentTimestamp();
+        latitude.setCurrentLocation(gps.getCurrentLatitude(),
+                                    gps.getCurrentLongitude(),
+                                    gps.getCurrentAccuracy());
+        latitude.sendCurrentLocation();
+    }
+
+private:
+    GoogleLatitude latitude;
+    GpsControl gps;
+};
+
+#endif // LATITUDEDAEMON_H
diff --git a/latituded/latituded.pro b/latituded/latituded.pro
new file mode 100644 (file)
index 0000000..111a573
--- /dev/null
@@ -0,0 +1,18 @@
+TEMPLATE = app
+TARGET   = latituded
+target.path = /opt/linfati.com/bin/
+INSTALLS += target
+
+QT       += network
+CONFIG   += mobility
+MOBILITY += location
+
+INCLUDEPATH += ../liblatitudeupdater
+INCLUDEPATH += ../libkqoauth
+
+LIBS += ../liblocationmaemo5/liblocationmaemo5.a
+LIBS += ../liblatitudeupdater/liblatitudeupdater.a
+LIBS += ../libkqoauth/libkqoauth.a
+
+HEADERS += daemon.h
+SOURCES += daemon.cpp main.cpp
diff --git a/latituded/main.cpp b/latituded/main.cpp
new file mode 100644 (file)
index 0000000..fe07d64
--- /dev/null
@@ -0,0 +1,16 @@
+#include <QtCore/QCoreApplication>
+#include "daemon.h"
+
+int main(int argc, char *argv[]) {
+    qDebug() << "* Main Daemon";
+    QCoreApplication::setOrganizationName("linfati.com");
+    QCoreApplication::setOrganizationDomain("linfati.com");
+    QCoreApplication::setApplicationName("latitudeupdater");
+
+    QCoreApplication lu(argc, argv);
+    LatitudeDaemon mygui;
+
+    Q_UNUSED(mygui)
+
+    return lu.exec();
+}
diff --git a/latitudedaemon.cpp b/latitudedaemon.cpp
deleted file mode 100644 (file)
index 35a31e6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#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();
-}
diff --git a/latitudedaemon.h b/latitudedaemon.h
deleted file mode 100644 (file)
index d18a673..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef LATITUDEDAEMON_H
-#define LATITUDEDAEMON_H
-
-#include <QObject>
-#include <QtCore/QCoreApplication>
-#include "googlelatitude.h"
-#include "gpscontrol.h"
-
-class LatitudeDaemon : public QObject {
-    Q_OBJECT
-public:
-    LatitudeDaemon(QObject *parent = 0);
-signals:
-
-public slots:
-
-private slots:
-    void gl_GotToken() {
-        qDebug() << "LatitudeDaemon::gl_GotToken()";
-        gps.startUpdates();
-    }
-    void gl_NotToken() {
-        qDebug() << "LatitudeDaemon::gl_NotToken()";
-        QCoreApplication::exit();
-    }
-    void gl_needAuth() {
-        qDebug() << "LatitudeDaemon::gl_needAuth()";
-        QCoreApplication::exit();
-    }
-    void get_gps() {
-        qDebug() << "LatitudeDaemon::get_gps()"
-                 << gps.getCurrentLatitude()
-                 << gps.getCurrentLongitude()
-                 << gps.getCurrentAccuracy()
-                 << gps.getCurrentTimestamp();
-    }
-    void set_latitude() {
-        qDebug() << "LatitudeDaemon::set_latitude()"
-                 << gps.getCurrentLatitude()
-                 << gps.getCurrentLongitude()
-                 << gps.getCurrentAccuracy()
-                 << gps.getCurrentTimestamp();
-        latitude.setCurrentLocation(gps.getCurrentLatitude(),
-                                    gps.getCurrentLongitude(),
-                                    gps.getCurrentAccuracy());
-        latitude.sendCurrentLocation();
-    }
-
-private:
-    GoogleLatitude latitude;
-    GpsControl gps;
-};
-
-#endif // LATITUDEDAEMON_H
diff --git a/latitudeqml.cpp b/latitudeqml.cpp
deleted file mode 100644 (file)
index 69b5ba8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "latitudeqml.h"
-#include <QtDeclarative/QDeclarativeContext>
-
-LatitudeQML::LatitudeQML(QDeclarativeView *parent) :
-    QDeclarativeView(parent),
-    latitude(this),
-    gps(this),
-    demonio(QCoreApplication::applicationDirPath()
-        + QDir::separator()
-        + "LatitudeUpdaterDaemon"),
-    cli(this) {
-    qDebug() << "* LatitudeQML::LatitudeQML";
-
-    rootContext()->setContextProperty("latitude", &latitude);
-    rootContext()->setContextProperty("gps", &gps);
-    rootContext()->setContextProperty("demonio", this);
-    setSource(QUrl("qrc:/qml/main.qml"));
-
-    latitude.getAccess();
-}
diff --git a/latitudeqml.h b/latitudeqml.h
deleted file mode 100644 (file)
index 82db1f4..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef LatitudeQML_H
-#define LatitudeQML_H
-
-#include <QObject>
-#include <QtDeclarative/QDeclarativeView>
-#include <QtCore/QProcess>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFile>
-#include "googlelatitude.h"
-#include "gpscontrol.h"
-
-class LatitudeQML : public QDeclarativeView {
-    Q_OBJECT
-public:
-    LatitudeQML(QDeclarativeView *parent = 0);
-
-signals:
-
-public slots:
-    bool demonio_status() {
-        qDebug() << "LatitudeQML::demonio_status";
-        if (system("killall -0 LatitudeUpdaterDaemon 2> /dev/null" )) {
-            return false;
-        }
-        return true;
-    }
-    bool demonio_start() {
-        qDebug() << "LatitudeQML::demonio_start";
-        if (demonio.exists()) {
-            cli.startDetached(demonio.fileName());
-            return true;
-        }
-        qDebug() << "LatitudeQML:: demonio none";
-        return false;
-    }
-    bool demonio_stop() {
-        qDebug() << "LatitudeQML::demonio_stop";
-        if (demonio.exists()) {
-            qDebug() << "LatitudeQML:: demonio kill" << system("killall LatitudeUpdaterDaemon 2> /dev/null");
-            return true;
-        }
-        return false;
-    }
-
-private slots:
-
-private:
-    GoogleLatitude latitude;
-    GpsControl gps;
-    QFile demonio;
-    QProcess cli;
-};
-
-#endif // LatitudeQML_H
index 33d560f..f8d0ff5 100644 (file)
@@ -1,30 +1,32 @@
-# temporal fix
-linux-g++-maemo:!contains(MEEGO_EDITION,harmattan): {
-        MEEGO_VERSION_MAJOR     = 1
-        MEEGO_VERSION_MINOR     = 2
-        MEEGO_VERSION_PATCH     = 0
-        MEEGO_EDITION          = harmattan
-        DEFINES               += MEEGO_EDITION_HARMATTAN
-}
-
 TEMPLATE = subdirs
+CONFIG  += ordered
+
+SUBDIRS = \
+        liblocationmaemo5 \
+        libkqoauth \
+        liblatitudeupdater \
+        latituded \
+        latitude.qt \
+        latitude.qml
+
+contains(QT_CONFIG, maemo5): message(Maemo5)
+contains(MEEGO_EDITION,harmattan): message(Maemo6)
+
+include(deployment.pri)
+qtcAddDeployment()
 
-contains(QT_CONFIG, maemo5): {
-        SUBDIRS = LatitudeUpdaterDaemon.pro LatitudeUpdaterWidget.pro
-        DEFINES += GUIFOUND
-        message(Maemo5)
-}
-contains(MEEGO_EDITION,harmattan): {
-        SUBDIRS = LatitudeUpdaterDaemon.pro LatitudeUpdaterQML.pro
-        DEFINES += GUIFOUND
-        message(Maemo6)
-}
-contains(CONFIG, simulator): {        
-        SUBDIRS = LatitudeUpdaterWidget.pro
-        DEFINES += GUIFOUND
-        message(Simulator)
-}
-!contains(DEFINES, GUIFOUND): {
-        SUBDIRS = LatitudeUpdaterDaemon.pro LatitudeUpdaterWidget.pro LatitudeUpdaterQML.pro
-        message(Plataform not found)
-}
+OTHER_FILES += \
+        qtc_packaging/debian_harmattan/rules \
+        qtc_packaging/debian_harmattan/rules.real \
+        qtc_packaging/debian_harmattan/README \
+        qtc_packaging/debian_harmattan/copyright \
+        qtc_packaging/debian_harmattan/control \
+        qtc_packaging/debian_harmattan/compat \
+        qtc_packaging/debian_harmattan/changelog \
+        qtc_packaging/debian_fremantle/rules \
+        qtc_packaging/debian_fremantle/rules.real \
+        qtc_packaging/debian_fremantle/README \
+        qtc_packaging/debian_fremantle/copyright \
+        qtc_packaging/debian_fremantle/control \
+        qtc_packaging/debian_fremantle/compat \
+        qtc_packaging/debian_fremantle/changelog
diff --git a/latitudeupdater64.png b/latitudeupdater64.png
new file mode 100644 (file)
index 0000000..d98268f
Binary files /dev/null and b/latitudeupdater64.png differ
diff --git a/latitudeupdater80.png b/latitudeupdater80.png
new file mode 100644 (file)
index 0000000..b581969
Binary files /dev/null and b/latitudeupdater80.png differ
diff --git a/latitudeupdater_fremantle.desktop b/latitudeupdater_fremantle.desktop
new file mode 100644 (file)
index 0000000..3ee3617
--- /dev/null
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=LatitudeUpdater
+Exec=/opt/linfati.com/bin/latitude.qt
+Icon=latitudeupdater64
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/latitudeupdater_harmattan.desktop b/latitudeupdater_harmattan.desktop
new file mode 100644 (file)
index 0000000..3b961bc
--- /dev/null
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=LatitudeUpdater
+Exec=/usr/bin/invoker --single-instance --type=d /opt/linfati.com/bin/latitude.qml
+Icon=/usr/share/icons/hicolor/80x80/apps/latitudeupdater80.png
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/latitudewidget.cpp b/latitudewidget.cpp
deleted file mode 100644 (file)
index 37f4e50..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#include "latitudewidget.h"
-
-LatitudeGUI::LatitudeGUI(QWidget *parent) :
-    QWidget(parent),
-    latitude(this),
-    gps(this),
-    demonio(QCoreApplication::applicationDirPath()
-        + QDir::separator()
-        + "LatitudeUpdaterDaemon"),
-    cli(this) {
-    qDebug() << "* LatitudeGUI::LatitudeGUI";
-    setWindowTitle(tr("LatitudeUpdater"));
-
-    // row 1
-    layout_row1 = new QHBoxLayout();
-    do_oauth = new QPushButton("Auth");
-    do_start = new QPushButton("Start");
-    do_stop = new QPushButton("Stop");
-    layout_row1->addWidget(do_oauth);
-    layout_row1->addWidget(do_start);
-    layout_row1->addWidget(do_stop);
-
-    do_oauth->setDisabled(true);
-    do_start->setDisabled(true);
-    do_stop->setDisabled(true);
-
-    connect(do_oauth, SIGNAL(clicked()), this, SLOT(gl_webauth()) );
-    connect(do_start, SIGNAL(clicked()), this, SLOT(gps_start()) );
-    connect(do_stop, SIGNAL(clicked()), this, SLOT(gps_stop()) );
-
-    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(gotFix()), this, SLOT(set_latitude()) );
-
-    // row 2
-    layout_row2 = new QHBoxLayout();
-    gps_group = new QButtonGroup();
-    gps_method = new QLabel("Method");
-    gps_cell = new QRadioButton("Cell Tower");
-    gps_both = new QRadioButton("Both");
-    gps_agps = new QRadioButton("Only Gps");
-    gps_group->addButton(gps_cell);
-    gps_group->addButton(gps_both);
-    gps_group->addButton(gps_agps);
-    layout_row2->addWidget(gps_method);
-    layout_row2->addWidget(gps_cell);
-    layout_row2->addWidget(gps_both);
-    layout_row2->addWidget(gps_agps);
-
-    if ( gps.getPositioningMethod() == "gps" ) gps_agps->setChecked(true);
-    if ( gps.getPositioningMethod() == "cell" ) gps_cell->setChecked(true);
-    if ( gps.getPositioningMethod() == "all" ) gps_both->setChecked(true);
-
-    connect(gps_cell, SIGNAL(clicked()), this, SLOT(set_method()) );
-    connect(gps_both, SIGNAL(clicked()), this, SLOT(set_method()) );
-    connect(gps_agps, SIGNAL(clicked()), this, SLOT(set_method()) );
-
-    // row 3
-    layout_row3 = new QHBoxLayout();
-    gps_to_label = new QLabel("Time Out");
-    gps_to_slider = new QSlider(Qt::Horizontal);
-    gps_to_slider->setSingleStep(5);
-    gps_to_slider->setRange(5, 120);
-    gps_to_slider->setValue(gps.getTimeOut());
-    gps_to_slider_value = new QLabel(QString("%1 sec.").arg(gps_to_slider->value()));
-    layout_row3->addWidget(gps_to_label);
-    layout_row3->addWidget(gps_to_slider);
-    layout_row3->addWidget(gps_to_slider_value);
-
-    connect(gps_to_slider, SIGNAL(valueChanged(int)), this, SLOT(set_to(int)) );
-
-    // row 4
-    layout_row4 = new QHBoxLayout();
-    gps_i_label = new QLabel("Interval");
-
-    gps_i_slider = new QSlider(Qt::Horizontal);
-    gps_i_slider->setSingleStep(5);
-    gps_i_slider->setRange(5, 60);
-    gps_i_slider->setValue(gps.getInterval()/60);
-    gps_i_slider_value = new QLabel(QString("%1 min.").arg(gps_i_slider->value()));
-    layout_row4->addWidget(gps_i_label);
-    layout_row4->addWidget(gps_i_slider);
-    layout_row4->addWidget(gps_i_slider_value);
-
-    connect(gps_i_slider, SIGNAL(valueChanged(int)), this, SLOT(set_i(int)) );
-
-    // row 5
-    layout_row5 = new QHBoxLayout();
-    gps_ac_group = new QButtonGroup();
-    gps_ac_label = new QLabel("Auto Connect");
-    gps_ac_yes = new QRadioButton("Yes");
-    gps_ac_not = new QRadioButton("No");
-    gps_ac_group->addButton(gps_ac_yes);
-    gps_ac_group->addButton(gps_ac_not);
-    layout_row5->addWidget(gps_ac_label);
-    layout_row5->addWidget(gps_ac_yes);
-    layout_row5->addWidget(gps_ac_not);
-
-    if ( latitude.getAutoConnect() == true ) gps_ac_yes->setChecked(true);
-    if ( latitude.getAutoConnect() == false ) gps_ac_not->setChecked(true);
-
-    connect(gps_ac_yes, SIGNAL(clicked()), this, SLOT(set_ac_yes()) );
-    connect(gps_ac_not, SIGNAL(clicked()), this, SLOT(set_ac_not()) );
-
-    // gui
-    layout_gui = new QVBoxLayout();
-    layout_gui->addLayout(layout_row1);
-    layout_gui->addLayout(layout_row2);
-    layout_gui->addLayout(layout_row3);
-    layout_gui->addLayout(layout_row4);
-    layout_gui->addLayout(layout_row5);
-
-    setLayout(layout_gui);
-    latitude.getAccess();
-}
-
diff --git a/latitudewidget.h b/latitudewidget.h
deleted file mode 100644 (file)
index 6821240..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-#ifndef LATITUDEGUI_H
-#define LATITUDEGUI_H
-
-#include <QtGui/QWidget>
-#include <QtGui/QPushButton>
-#include <QtGui/QLabel>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QRadioButton>
-#include <QtGui/QSlider>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QDesktopServices>
-#include <QtCore/QProcess>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFile>
-#include "googlelatitude.h"
-#include "gpscontrol.h"
-
-class LatitudeGUI : public QWidget {
-    Q_OBJECT
-public:
-    LatitudeGUI(QWidget *parent = 0);
-
-signals:
-
-public slots:
-
-private slots:
-    void gl_GotToken() {
-        qDebug() << "* LatitudeGUI::gl_GotToken";
-        do_oauth->setDisabled(true);
-        if (system("killall -0 LatitudeUpdaterDaemon 2> /dev/null" )) {
-            do_start->setEnabled(true);
-            do_stop->setDisabled(true);
-        } else {
-            do_start->setDisabled(true);
-            do_stop->setEnabled(true);
-        }
-    }
-    void gl_NotToken() {
-        qDebug() << "* LatitudeGUI::gl_NotToken";
-        do_oauth->setEnabled(true);
-        do_start->setDisabled(true);
-        do_stop->setDisabled(true);
-        gps.stopUpdates(true);
-    }
-    void gl_needAuth() {
-        qDebug() << "* LatitudeGUI::gl_needAuth";
-        do_oauth->setEnabled(true);
-    }
-    void gl_webauth() {
-        qDebug() << "* LatitudeGUI::gl_webauth";
-        QDesktopServices::openUrl(latitude.getUserAuthorization());
-    }
-    void gps_start() {
-        qDebug() << "* LatitudeGUI::gps_start";
-        do_start->setDisabled(true);
-        do_stop->setEnabled(true);
-        if (demonio.exists()) {
-            qDebug() << "* LatitudeGUI:: demonio";
-            cli.startDetached(demonio.fileName());
-            return;
-        }
-        qDebug() << "* LatitudeGUI:: demonio none";
-        gps.startUpdates();
-    }
-    void gps_stop() {
-        qDebug() << "* LatitudeGUI::gps_stop";
-        do_start->setEnabled(true);
-        do_stop->setDisabled(true);
-        if (demonio.exists()) {
-            qDebug() << "* LatitudeGUI:: demonio kill" << system("killall LatitudeUpdaterDaemon 2> /dev/null");
-        } else {
-            gps.stopUpdates(true);
-        }
-    }
-    void set_latitude() {
-        qDebug() << "* LatitudeGUI::set_latitude";
-        latitude.setCurrentLocation(gps.getCurrentLatitude(),
-                                    gps.getCurrentLongitude(),
-                                    gps.getCurrentAccuracy());
-        latitude.sendCurrentLocation();
-    }
-    void set_method() {
-        qDebug() << "* LatitudeGUI::set_method";
-        if (gps_cell->isChecked()) gps.setPositioningMethod("cell");
-        if (gps_both->isChecked()) gps.setPositioningMethod("all");
-        if (gps_agps->isChecked()) gps.setPositioningMethod("gps");
-    }
-    void set_to(int value) {
-        qDebug() << "* LatitudeGUI::set_to()" << value;
-        gps.setTimeOut(value);
-        gps_to_slider_value->setText(QString("%1 sec.").arg(value));
-
-    }
-    void set_i(int value) {
-        qDebug() << "* LatitudeGUI::set_i()" << value;
-        gps.setInterval(value*60);
-        gps_i_slider_value->setText(QString("%1 min.").arg(value));
-    }
-    void set_ac_yes() {
-        qDebug() << "* LatitudeGUI::set_ac_yes";
-        latitude.setAutoConnect(true);
-    }
-    void set_ac_not() {
-        qDebug() << "* LatitudeGUI::set_ac_not";
-        latitude.setAutoConnect(false);
-    }
-
-private:
-    GoogleLatitude latitude;
-    GpsControl gps;
-    QFile demonio;
-    QProcess cli;
-
-    QHBoxLayout *layout_row1;
-    QPushButton *do_oauth;
-    QPushButton *do_start;
-    QPushButton *do_stop;
-
-    QHBoxLayout *layout_row2;
-    QLabel *gps_method;
-    QButtonGroup *gps_group;
-    QRadioButton *gps_cell;
-    QRadioButton *gps_both;
-    QRadioButton *gps_agps;
-
-    QHBoxLayout *layout_row3;
-    QLabel *gps_to_label;
-    QSlider *gps_to_slider;
-    QLabel *gps_to_slider_value;
-
-    QHBoxLayout *layout_row4;
-    QLabel *gps_i_label;
-    QSlider *gps_i_slider;
-    QLabel *gps_i_slider_value;
-
-    QHBoxLayout *layout_row5;
-    QLabel *gps_ac_label;
-    QButtonGroup *gps_ac_group;
-    QRadioButton *gps_ac_yes;
-    QRadioButton *gps_ac_not;
-
-    QVBoxLayout *layout_gui;
-};
-
-#endif // LATITUDEGUI_H
-
diff --git a/libkqoauth/libkqoauth.pro b/libkqoauth/libkqoauth.pro
new file mode 100644 (file)
index 0000000..4b8e4ca
--- /dev/null
@@ -0,0 +1,26 @@
+TEMPLATE = lib
+CONFIG   += staticlib
+TARGET   = kqoauth
+
+QT       += network
+
+HEADERS += kqoauthauthreplyserver.h \
+           kqoauthauthreplyserver_p.h \
+           kqoauthglobals.h \
+           kqoauthmanager.h \
+           kqoauthmanager_p.h \
+           kqoauthrequest.h \
+           kqoauthrequest_1.h \
+           kqoauthrequest_p.h \
+           kqoauthrequest_xauth.h \
+           kqoauthrequest_xauth_p.h \
+           kqoauthutils.h
+SOURCES += kqoauthauthreplyserver.cpp \
+           kqoauthmanager.cpp \
+           kqoauthrequest.cpp \
+           kqoauthrequest_1.cpp \
+           kqoauthrequest_xauth.cpp \
+           kqoauthutils.cpp
+
+include(../deployment.pri)
+qtcAddDeployment()
diff --git a/liblatitudeupdater/googlelatitude.cpp b/liblatitudeupdater/googlelatitude.cpp
new file mode 100644 (file)
index 0000000..47e90c5
--- /dev/null
@@ -0,0 +1,178 @@
+#include "googlelatitude.h"
+#include <QtNetwork/QNetworkConfigurationManager>
+
+GoogleLatitude::GoogleLatitude(QObject *parent) :
+    QObject(parent),
+    OauthSettings(this),
+    OAuthGetRequestToken("https://www.google.com/accounts/OAuthGetRequestToken"),
+    OAuthAuthorizeToken("https://www.google.com/accounts/OAuthAuthorizeToken"),
+    OAuthGetAccessToken("https://www.google.com/accounts/OAuthGetAccessToken"),
+    CurrentLocation("https://www.googleapis.com/latitude/v1/currentLocation"),
+    UserAuthorization(""),
+    ConsumerKey("1062862865804.apps.googleusercontent.com"),
+    ConsumerSecretKey("EYQaRaUJ9Fznw8mPMor660Kx"),
+    CurrentLatitude(0),
+    CurrentLongitude(0),
+    CurrentAccuracy(0) {
+    qDebug() << "* GoogleLatitude::GoogleLatitude";
+    OauthRequest = new KQOAuthRequest(this);
+    OauthManager = new KQOAuthManager(this);
+    GoogleOauthAdditional.insert("scope", "https://www.googleapis.com/auth/latitude");
+    GoogleOauthAdditional.insert("xoauth_displayname", "LatitudeUpdater");
+
+    connect(OauthManager, SIGNAL(temporaryTokenReceived(QString,QString)),
+            this, SLOT(onTemporaryTokenReceived(QString, QString)));
+
+    connect(OauthManager, SIGNAL(authorizationReceived(QString,QString)),
+            this, SLOT(onAuthorizationReceived(QString, QString)));
+
+    connect(OauthManager, SIGNAL(accessTokenReceived(QString,QString)),
+            this, SLOT(onAccessTokenReceived(QString,QString)));
+
+    connect(OauthManager, SIGNAL(requestReady(QByteArray)),
+            this, SLOT(onRequestReady(QByteArray)));
+
+    connect(OauthManager, SIGNAL(authorizedRequestDone()),
+            this, SLOT(onAuthorizedRequestDone()));
+
+    connect(this, SIGNAL(gotToken()),
+            this, SLOT(getCurrentLocation()));
+
+    connect(this, SIGNAL(notToken()),
+            this, SLOT(onNotToken()));
+
+    connect(this, SIGNAL(gotToken()),
+            this, SLOT(onGotToken()));
+
+    connect(this, SIGNAL(needAuth()),
+            this, SLOT(onNeedAuth()));
+}
+
+GoogleLatitude::~GoogleLatitude() {
+    qDebug() << "* GoogleLatitude::~GoogleLatitude";
+    delete OauthManager;
+    delete OauthRequest;
+}
+
+void GoogleLatitude::getAccess() {
+    qDebug() << "* GoogleLatitude::getAccess";
+    if ( OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull() ) {
+        OauthRequest->clearRequest();
+        OauthRequest->initRequest(KQOAuthRequest::TemporaryCredentials, OAuthGetRequestToken);
+        OauthRequest->setConsumerKey(ConsumerKey);
+        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
+        OauthRequest->setAdditionalParameters(GoogleOauthAdditional);
+        OauthManager->setHandleUserAuthorization(true);
+        OauthRequest->setHttpMethod(KQOAuthRequest::POST);
+        OauthManager->executeRequest(OauthRequest);
+    } else {
+        emit gotToken();
+    }
+}
+
+void GoogleLatitude::getCurrentLocation() {
+    qDebug() << "* GoogleLatitude::getCurrentLocation";
+    if ( OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull() ) {
+        emit notToken();
+    } else {
+        OauthRequest->clearRequest();
+        OauthRequest->initRequest(KQOAuthRequest::AuthorizedRequest, CurrentLocation);
+        OauthRequest->setToken(OauthSettings.value("oauth_token").toString());
+        OauthRequest->setTokenSecret(OauthSettings.value("oauth_token_secret").toString());
+        OauthRequest->setConsumerKey(ConsumerKey);
+        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
+        OauthRequest->setHttpMethod(KQOAuthRequest::GET);
+        OauthManager->executeRequest(OauthRequest);
+    }
+}
+
+void GoogleLatitude::sendCurrentLocation() {
+    qDebug() << "* GoogleLatitude::sendCurrentLocation";
+    if (OauthSettings.value("oauth_token").isNull() || OauthSettings.value("oauth_token_secret").isNull()) {
+        emit notToken();
+    } else {
+        if (abs(CurrentLatitude) <= 0.01) return;
+        if (abs(CurrentLongitude) <= 0.01) return;
+        if (abs(CurrentAccuracy) <= 0.01) return;
+
+        QNetworkConfigurationManager mgr;
+        if (!OauthSettings.value("net_auto").toBool() && !mgr.isOnline()) {
+            qDebug() << "* GoogleLatitude::sendCurrentLocation" << "offline";
+            return;
+        }
+
+        QByteArray json_location;
+        json_location = "{\"data\": {\"kind\":\"latitude#location\",";
+        json_location += QString("\"latitude\":%1,").arg(CurrentLatitude);
+        json_location += QString("\"longitude\":%1,").arg(CurrentLongitude);
+        json_location += QString("\"accuracy\":%1").arg(CurrentAccuracy);
+        json_location += "}}";
+        qDebug() << "json_location" <<  json_location;
+
+        OauthRequest->clearRequest();
+        OauthRequest->initRequest(KQOAuthRequest::AuthorizedRequest, CurrentLocation);
+        OauthRequest->setToken(OauthSettings.value("oauth_token").toString());
+        OauthRequest->setTokenSecret(OauthSettings.value("oauth_token_secret").toString());
+        OauthRequest->setConsumerKey(ConsumerKey);
+        OauthRequest->setConsumerSecretKey(ConsumerSecretKey);
+        OauthRequest->setHttpMethod(KQOAuthRequest::POST);
+        OauthRequest->setContentType("application/json");
+        OauthRequest->setRawData(json_location);
+        OauthManager->executeRequest(OauthRequest);
+    }
+}
+
+void GoogleLatitude::setCurrentLocation(double lat, double lon, double acc) {
+    qDebug() << "* GoogleLatitude::setCurrentLocation" << lat << lon << acc;
+    CurrentLatitude = lat;
+    CurrentLongitude = lon;
+    CurrentAccuracy = acc;
+}
+
+QUrl GoogleLatitude::getUserAuthorization() {
+    qDebug() << "* GoogleLatitude::getUserAuthorization";
+    return UserAuthorization;
+}
+
+void GoogleLatitude::setAutoConnect(bool status) {
+    qDebug() << "* GoogleLatitude::setAutoConnect" << status;
+    OauthSettings.setValue("net_auto", status);
+}
+
+bool GoogleLatitude::getAutoConnect() {
+    qDebug() << "* GoogleLatitude::getAutoConnect";
+    return OauthSettings.value("net_auto").toBool();
+}
+
+void GoogleLatitude::onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret) {
+    qDebug() << "* GoogleLatitude::onTemporaryTokenReceived" << temporaryToken << temporaryTokenSecret;
+    if( OauthManager->lastError() == KQOAuthManager::NoError) {
+        UserAuthorization = OauthManager->getUserAuthorization(OAuthAuthorizeToken);
+        qDebug() << "* GoogleLatitude::onTemporaryTokenReceived" << "UserAuthorization" << UserAuthorization;
+        emit needAuth();
+    }
+}
+
+void GoogleLatitude::onAuthorizationReceived(QString token, QString verifier) {
+    qDebug() << "* GoogleLatitude::onAuthorizationReceived" << token << verifier;
+    OauthManager->getUserAccessTokens(OAuthGetAccessToken);
+    if(OauthManager->lastError() != KQOAuthManager::NoError) {
+        emit notToken();
+    }
+}
+
+void GoogleLatitude::onAccessTokenReceived(QString token, QString tokenSecret) {
+    qDebug() << "* GoogleLatitude::onAccessTokenReceived" << token << tokenSecret;
+    OauthSettings.setValue("oauth_token", token);
+    OauthSettings.setValue("oauth_token_secret", tokenSecret);
+    emit gotToken();
+}
+
+void GoogleLatitude::onRequestReady(QByteArray response) {
+    qDebug() << "* GoogleLatitude::onRequestReady" << response;
+    if (response.contains("Invalid Credentials") ) {
+        OauthSettings.remove("oauth_token");
+        OauthSettings.remove("oauth_token_secret");
+        emit notToken();
+    }
+}
diff --git a/liblatitudeupdater/googlelatitude.h b/liblatitudeupdater/googlelatitude.h
new file mode 100644 (file)
index 0000000..1f99a24
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef GOOGLELATITUDE_H
+#define GOOGLELATITUDE_H
+
+#include <QtCore/QObject>
+#include <QtCore/QSettings>
+#include <QtCore/QtDebug>
+#include <QtKOAuth>
+
+class GoogleLatitude : public QObject {
+    Q_OBJECT
+
+public:
+    GoogleLatitude(QObject *parent = 0);
+    ~GoogleLatitude();
+
+public slots:
+    void getAccess();
+    void getCurrentLocation();
+    void sendCurrentLocation();
+    void setCurrentLocation(double la, double lo, double ac);
+    QUrl getUserAuthorization();
+    void setAutoConnect(bool status);
+    bool getAutoConnect();
+
+private slots:
+    void onTemporaryTokenReceived(QString temporaryToken, QString temporaryTokenSecret);
+    void onAuthorizationReceived(QString token, QString verifier);
+    void onAccessTokenReceived(QString token, QString tokenSecret);
+    void onRequestReady(QByteArray response);
+    void onAuthorizedRequestDone() { qDebug() << "* GoogleLatitude::onAuthorizedRequestDone"; }
+    void onNotToken() { qDebug() << "* GoogleLatitude::onNotToken"; }
+    void onGotToken() { qDebug() << "* GoogleLatitude::onGotToken"; }
+    void onNeedAuth() { qDebug() << "* GoogleLatitude::onNeedAuth"; }
+
+signals:
+    void notToken();
+    void gotToken();
+    void needAuth();
+
+private:
+    QSettings OauthSettings;
+    QUrl OAuthGetRequestToken;
+    QUrl OAuthAuthorizeToken;
+    QUrl OAuthGetAccessToken;
+    QUrl CurrentLocation;
+    QUrl UserAuthorization;
+    KQOAuthParameters GoogleOauthAdditional;
+    QString ConsumerKey;
+    QString ConsumerSecretKey;
+    double CurrentLatitude;
+    double CurrentLongitude;
+    double CurrentAccuracy;
+    KQOAuthManager *OauthManager;
+    KQOAuthRequest *OauthRequest;
+};
+
+#endif // GOOGLELATITUDE_H
diff --git a/liblatitudeupdater/gpscontrol.cpp b/liblatitudeupdater/gpscontrol.cpp
new file mode 100644 (file)
index 0000000..2b900c9
--- /dev/null
@@ -0,0 +1,131 @@
+#include "gpscontrol.h"
+#include <QtNetwork/QNetworkConfigurationManager>
+
+GpsControl::GpsControl(QObject *parent) :
+    QObject(parent),
+    GpsSettings(this),
+    GpsSource(QGeoPositionInfoSource::createDefaultSource(this)),
+    GpsPosition(),
+    GpsTimeout(this),
+    GpsInterval(this) {
+    qDebug() << "* GpsControl::GpsControl";
+
+    GpsTimeout.setSingleShot(true);
+    GpsInterval.setSingleShot(true);
+
+    setPositioningMethod(GpsSettings.value("gps_method", "cell").toString());
+    setTimeOut(GpsSettings.value("gps_timeout", 60).toInt());
+    setInterval(GpsSettings.value("gps_interval", 15*60).toInt());
+
+    if (!GpsSource) qDebug() << "* GpsControl::GpsControl" << "Not GpsSource";
+
+    if (GpsSource) connect(GpsSource, SIGNAL(positionUpdated(QGeoPositionInfo)),
+                           this, SLOT(setCurrentLocation(QGeoPositionInfo)));
+
+    connect(this, SIGNAL(gotUpdate()),
+            this, SLOT(onGotUpdate()));
+
+    connect(this, SIGNAL(gotFix()),
+            this, SLOT(onGotFix()));
+
+}
+
+void GpsControl::setTimeOut(int sec) {
+    qDebug() << "* GpsControl::setTimeOut" << sec;
+    GpsSettings.setValue("gps_timeout", sec);
+}
+
+int GpsControl::getTimeOut() {
+    qDebug() << "* GpsControl::getTimeOut";
+    return GpsSettings.value("gps_timeout").toInt();
+}
+
+void GpsControl::setInterval(int sec) {
+    qDebug() << "* GpsControl::setInterval" << sec;
+    GpsSettings.setValue("gps_interval", sec);
+}
+
+int GpsControl::getInterval() {
+    qDebug() << "* GpsControl::getInterval";
+    return GpsSettings.value("gps_interval").toInt();
+}
+
+void GpsControl::setPositioningMethod(QString method) {
+    qDebug() << "* GpsControl::setPositioningMethod" << method;
+    if (method == "gps") {
+        GpsSettings.setValue("gps_method", method);
+        if (GpsSource) GpsSource->setPreferredPositioningMethods(
+                    QGeoPositionInfoSource::SatellitePositioningMethods);
+    }
+    if (method == "cell") {
+        GpsSettings.setValue("gps_method", method);
+        if (GpsSource) GpsSource->setPreferredPositioningMethods(
+                    QGeoPositionInfoSource::NonSatellitePositioningMethods);
+    }
+    if (method == "all") {
+        GpsSettings.setValue("gps_method", method);
+        if (GpsSource) GpsSource->setPreferredPositioningMethods(
+                    QGeoPositionInfoSource::AllPositioningMethods);
+    }
+}
+
+void GpsControl::startUpdates() {
+    qDebug() << "* GpsControl::startUpdates";
+
+    GpsTimeout.singleShot(GpsSettings.value("gps_timeout").toInt()*1000,
+                          this, SLOT(stopUpdates()));
+    GpsInterval.singleShot(GpsSettings.value("gps_interval").toInt()*1000,
+                           this, SLOT(startUpdates()));
+
+    QNetworkConfigurationManager mgr;
+    if (!GpsSettings.value("net_auto").toBool() && !mgr.isOnline()) {
+        qDebug() << "* GpsControl::startUpdates" << "offline";
+        return;
+    }
+
+    if (GpsSource) GpsSource->startUpdates();
+}
+
+void GpsControl::stopUpdates(bool force) {
+    qDebug() << "* GpsControl::stopUpdates" << force;
+
+    if (GpsSource) GpsSource->stopUpdates();
+
+    if (force) {
+        GpsTimeout.stop();
+        GpsInterval.stop();
+    } else {
+        if (GpsSource && GpsSource->lastKnownPosition(GpsSettings.value("gps_method")
+                                         == "gps" ? true : false).isValid() ) {
+            emit gotFix();
+        }
+    }
+}
+
+double GpsControl::getCurrentLatitude() {
+    qDebug() << "* GpsControl::getCurrentLatitude";
+    return GpsPosition.coordinate().latitude();
+}
+
+double GpsControl::getCurrentLongitude() {
+    qDebug() << "* GpsControl::getCurrentLongitude";
+    return GpsPosition.coordinate().longitude();
+}
+
+double GpsControl::getCurrentAccuracy() {
+    qDebug() << "* GpsControl::getCurrentAccuracy";
+    return GpsPosition.attribute(QGeoPositionInfo::HorizontalAccuracy);
+}
+
+unsigned int GpsControl::getCurrentTimestamp() {
+    qDebug() << "* GpsControl::getCurrentTimestamp";
+    return GpsPosition.timestamp().toTime_t();
+}
+
+void GpsControl::setCurrentLocation(QGeoPositionInfo pos) {
+    qDebug() << "* GpsControl::setCurrentLocation" << pos;
+    if (pos.isValid()) {
+        GpsPosition = pos;
+        emit gotUpdate();
+    }
+}
diff --git a/liblatitudeupdater/gpscontrol.h b/liblatitudeupdater/gpscontrol.h
new file mode 100644 (file)
index 0000000..7a7f6f5
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef GPSCONTROL_H
+#define GPSCONTROL_H
+
+#include <QObject>
+#include <QtCore/QDebug>
+#include <QtCore/QSettings>
+#include <QtCore/QTimer>
+#include <QtLocation/QGeoPositionInfo>
+#include <QtLocation/QGeoPositionInfoSource>
+
+using namespace QtMobility;
+
+class GpsControl : public QObject {
+    Q_OBJECT
+public:
+    GpsControl(QObject *parent = 0);
+
+signals:
+    void gotUpdate();
+    void gotFix();
+
+public slots:
+    void setTimeOut(int sec);
+    int getTimeOut();
+    void setInterval(int sec);
+    int getInterval();
+    void setPositioningMethod(QString method);
+    QString getPositioningMethod() {return GpsSettings.value("gps_method").toString();}
+    void startUpdates();
+    void stopUpdates(bool force = false);
+    double getCurrentLatitude();
+    double getCurrentLongitude();
+    double getCurrentAccuracy();
+    unsigned int getCurrentTimestamp();
+
+private slots:
+    void setCurrentLocation(QGeoPositionInfo pos);
+    void onGotUpdate() { qDebug() << "* GpsControl::ongotUpdate"; }
+    void onGotFix() { qDebug() << "* GpsControl::ongotFix"; }
+
+private:
+    QSettings GpsSettings;
+    QGeoPositionInfoSource *GpsSource;
+    QGeoPositionInfo GpsPosition;
+    QTimer GpsTimeout;
+    QTimer GpsInterval;
+};
+
+#endif // GPSCONTROL_H
diff --git a/liblatitudeupdater/liblatitudeupdater.pro b/liblatitudeupdater/liblatitudeupdater.pro
new file mode 100644 (file)
index 0000000..48d5c06
--- /dev/null
@@ -0,0 +1,15 @@
+TEMPLATE = lib
+CONFIG   += staticlib
+TARGET   = latitudeupdater
+
+QT       += network
+CONFIG   += mobility
+MOBILITY += location
+
+INCLUDEPATH += ../libkqoauth
+
+HEADERS += googlelatitude.h gpscontrol.h
+SOURCES += googlelatitude.cpp gpscontrol.cpp
+
+include(../deployment.pri)
+qtcAddDeployment()
diff --git a/liblocationmaemo5/liblocationmaemo5.pro b/liblocationmaemo5/liblocationmaemo5.pro
new file mode 100644 (file)
index 0000000..8492b81
--- /dev/null
@@ -0,0 +1,24 @@
+TEMPLATE = lib
+CONFIG   += staticlib
+TARGET   = locationmaemo5
+
+CONFIG   += mobility
+MOBILITY += location
+
+contains(QT_CONFIG, maemo5): {
+QT          += maemo5
+CONFIG      += link_pkgconfig
+PKGCONFIG   += glib-2.0 liblocation
+
+HEADERS += gconfitem_p.h \
+           liblocationwrapper_p.h \
+           qgeopositioninfosource_maemo5_p.h \
+           qgeosatelliteinfosource_maemo5_p.h
+SOURCES += gconfitem.cpp \
+           liblocationwrapper.cpp \
+           qgeopositioninfosource_maemo5.cpp \
+           qgeosatelliteinfosource_maemo5.cpp
+}
+
+include(../deployment.pri)
+qtcAddDeployment()
diff --git a/main-daemon.cpp b/main-daemon.cpp
deleted file mode 100644 (file)
index 99230d3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <QtCore/QCoreApplication>
-#include "latitudedaemon.h"
-
-int main(int argc, char *argv[]) {
-    qDebug() << "* Main Daemon";
-    QCoreApplication::setOrganizationName("linfati.com");
-    QCoreApplication::setOrganizationDomain("linfati.com");
-    QCoreApplication::setApplicationName("latitudeupdater");
-
-    QCoreApplication lu(argc, argv);
-    LatitudeDaemon mygui;
-
-    Q_UNUSED(mygui)
-
-    return lu.exec();
-}
diff --git a/main-qml.cpp b/main-qml.cpp
deleted file mode 100644 (file)
index f17ff01..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <QtGui/QApplication>
-#include "latitudeqml.h"
-
-int main(int argc, char *argv[]) {
-    qDebug() << "* Main QML";
-    QCoreApplication::setOrganizationName("linfati.com");
-    QCoreApplication::setOrganizationDomain("linfati.com");
-    QCoreApplication::setApplicationName("latitudeupdater");
-
-    QApplication lu(argc, argv);
-    LatitudeQML mygui;
-
-    mygui.showFullScreen();
-
-    return lu.exec();
-}
diff --git a/main-widget.cpp b/main-widget.cpp
deleted file mode 100644 (file)
index aca9cf7..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <QtGui/QApplication>
-#include "latitudewidget.h"
-
-int main(int argc, char *argv[]) {
-    qDebug() << "* Main Widget";
-    QCoreApplication::setOrganizationName("linfati.com");
-    QCoreApplication::setOrganizationDomain("linfati.com");
-    QCoreApplication::setApplicationName("latitudeupdater");
-
-    QApplication lu(argc, argv);
-    LatitudeGUI mygui;
-
-    mygui.showMaximized();
-
-    return lu.exec();
-}
diff --git a/qml/MainPage.qml b/qml/MainPage.qml
deleted file mode 100644 (file)
index caeb84f..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-import QtQuick 1.0
-import com.meego 1.0
-
-Page {
-    id: mainPage
-    orientationLock: PageOrientation.LockLandscape
-    Column {
-        spacing: 16
-        Row {
-            width: rootWindow.width
-            Button {
-                id: do_auth
-                width: rootWindow.width / 3
-                text: "Auth"
-                enabled: false
-                onClicked: {
-                    Qt.openUrlExternally(latitude.getUserAuthorization())
-                }
-            }
-            Button {
-                id: do_start
-                width: rootWindow.width / 3
-                text: "Start"
-                enabled: false
-                onClicked: {
-                    do_start.enabled = false;
-                    do_stop.enabled = true;
-                    if (!demonio.demonio_start()) {
-                        gps.startUpdates()
-                    }
-                }
-            }
-            Button {
-                id: do_stop
-                width: rootWindow.width / 3
-                text: "Stop"
-                enabled: false
-                onClicked: {
-                    do_start.enabled = true;
-                    do_stop.enabled = false;
-                    if (!demonio.demonio_stop()) {
-                        gps.stopUpdates(true)
-                    }
-                }
-            }
-        }
-        Row {
-            Label {
-                id: method_label
-                text: "Method"
-                width: rootWindow.width / 4
-                anchors.verticalCenter: method_button.verticalCenter
-            }
-            ButtonRow {
-                id: method_button
-                width: rootWindow.width * 2 / 3
-                Button {
-                    id: method_cell
-                    text: "Cell Tower"
-                    checked: gps.getPositioningMethod() == "cell" ? true : false
-                    onClicked: gps.setPositioningMethod("cell")
-                }
-                Button {
-                    id: method_all
-                    text: "Both"
-                    checked: gps.getPositioningMethod() == "all" ? true : false
-                    onClicked: gps.setPositioningMethod("all")
-                }
-                Button {
-                    id: method_agps
-                    text: "Only GPS"
-                    checked: gps.getPositioningMethod() == "gps" ? true : false
-                    onClicked: gps.setPositioningMethod("gps")
-                }
-            }
-        }
-        Row {
-            Label {
-                id: timeout_label
-                text: "Time Out"
-                width: rootWindow.width / 4
-                anchors.verticalCenter: timeout_slider.verticalCenter
-            }
-            Slider {
-                id: timeout_slider
-                width: rootWindow.width / 2
-                valueIndicatorVisible: true
-                minimumValue: 5
-                maximumValue: 120
-                stepSize: 5
-                value: gps.getTimeOut()
-            }
-            Label {
-                id: timeout_value
-                text: timeout_slider.value + " seg."
-                width: rootWindow.width / 4
-                anchors.verticalCenter: timeout_slider.verticalCenter
-            }
-            Connections {
-                target: timeout_slider
-                onValueChanged: {
-                    timeout_value.text = timeout_slider.value + " seg."
-                    gps.setTimeOut(timeout_slider.value)
-                }
-            }
-        }
-        Row {
-            Label {
-                id: interval_label
-                text: "Interval"
-                width: rootWindow.width / 4
-                anchors.verticalCenter: interval_slider.verticalCenter
-            }
-            Slider {
-                id: interval_slider
-                width: rootWindow.width / 2
-                valueIndicatorVisible: true
-                minimumValue: 5
-                maximumValue: 60
-                stepSize: 5
-                value: gps.getInterval() / 60
-            }
-            Label {
-                id: interval_value
-                text:  interval_slider.value + " min."
-                width: rootWindow.width / 4
-                anchors.verticalCenter: interval_slider.verticalCenter
-            }
-            Connections {
-                target: interval_slider
-                onValueChanged: {
-                    interval_value.text = interval_slider.value + " min."
-                    gps.setInterval(interval_slider.value*60)
-                }
-            }
-        }
-        Row {
-            Label {
-                id: connect_label
-                text: "Auto Connect"
-                width: rootWindow.width / 4
-                anchors.verticalCenter: connect_switch.verticalCenter
-            }
-            Switch {
-                id: connect_switch
-                width: rootWindow.width / 2
-                checked: latitude.getAutoConnect() ? true : false
-                onCheckedChanged: {
-                    connect_value.text = checked
-                    latitude.setAutoConnect(checked)
-                }
-            }
-            Label {
-                id: connect_value
-                text:  connect_switch.checked
-                width: rootWindow.width / 4
-                anchors.verticalCenter: connect_switch.verticalCenter
-            }
-        }
-
-        Connections {
-            target: latitude
-            onGotToken: {
-                do_auth.enabled = false;
-                if (demonio.demonio_status()) {
-                    do_start.enabled = false;
-                    do_stop.enabled = true;
-                } else {
-                    do_start.enabled = true;
-                    do_stop.enabled = false;
-                }
-            }
-        }
-        Connections {
-            target: latitude
-            onNotToken: {
-                do_auth.enabled = true;
-                do_start.enabled = false;
-                do_stop.enabled = false;
-                if (!demonio.demonio_stop()) {
-                    gps.stopUpdates(true)
-                }
-            }
-        }
-        Connections {
-            target: latitude
-            onNeedAuth: {
-                do_auth.enabled = true;
-            }
-        }
-
-        Connections {
-            target: gps
-            onGotFix: {
-                latitude.setCurrentLocation(gps.getCurrentLatitude(),
-                                            gps.getCurrentLongitude(),
-                                            gps.getCurrentAccuracy())
-                latitude.sendCurrentLocation()
-            }
-        }
-    }
-}
diff --git a/qml/main.qml b/qml/main.qml
deleted file mode 100644 (file)
index 6655bf5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.0
-import com.meego 1.0
-
-PageStackWindow {
-    id: rootWindow
-    initialPage: mainPage
-    MainPage {
-        id: mainPage
-    }
-    showToolBar: false
-    showStatusBar: true
-}
index 81fddb6..f3b0a58 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Rodrigo Linfati <rodrigo@linfati.cl>
 Build-Depends: debhelper (>= 5), libqt4-dev, libqtm-dev, liblocation-dev, libgconf2-dev
 Standards-Version: 3.7.3
-Homepage: http://googlelatitude.garage.maemo.org/
+Homepage: http://www.linfati.com/
 XSBC-Bugtracker: mailto:rodrigo@linfati.cl
 
 Package: googlelatitude
@@ -14,6 +14,7 @@ Description: Google Latitude Updater
  Features:
   - Retrieve location using Cell Tower and/or Gps and send to Google Latitude
   - Run as Daemon
+ Note: This is an unofficial client
 XB-Maemo-Display-Name: LatitudeUpdater
 XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAABrRJREFUaIHNmX9oHGUaxz+T3U3StNvG5tqYNgRNkzMH8XKeyxXleqUgaPHAnnpWOTiItCdivKtFkYJ/+IcoRbQXTgmU07YgFUVoK/3jKtiUu6PkIGkttN2kadIYzk2TbLJJ92d2dt73/pjM/pzZ3dnZyn1gmJl33nfm+8z7vM/7vDMKpvy1D/gL0GF+/UfnJtAP7uPQF8m+oBTW/WgdpMI/ji67yHl4bXN2ibuwUuryEx88iW9HKwBCCKSU6WMAKWXOsbHZrW+1md1n2h/jX2//e1O+WhMD6Oj4VStSSm5FFAJxl403ZBMFUx/IZ2t0knt/tt70mpkBeD36m5hLKHSdPeBEYlVY2nUAt0hSVwcrK7nXTA1QkKiaJCX11zMwMHDXReajadDX9zIASenCI5K4TJyhxqxxti/+v2PaA07FaxrMzsLYGCST+haNQmMjdHTomx3yB3g2pgYIIVgNGmU+ACYnYXAQrl3TzwHi8SFUdQJFuYfa2m24XD/B7W7KbsmhQwrNzaUNEBaCTA2wy7ffwtCQJBjUx0wsdoGamhH279/Jgw8+ixCCiYkJQqHrXLw4z8zM7zBC0HvvafT0pHjhhTrq660NsMLShcr1okAAzp0TqKo+nCKRI7z44nYeeeQgipKJkd3d3QDs2AHvv3+O6elf43KtBVxcueJiYWGU11/vsnyOlREVu1A4DGfOwMiIRMoaUqlZHnjgNK+++lrxhsAbbzxOOAxHj8YZH/ezfftVenv/WFR89sSWjWUUKsU338DlywIpFUDicn3OSy/1lmxnEImAqqo8/PCVouINPbZ6oBwXunRJQ9P0wByNnuHNN39LbW1tGdJ1Wlrgscdu4POVNrqiMSCEdaOrVyEazcwqhw//ho0bN5YUko/P5yurXrEoZNuFpISRkdyySsTbodg8YGqA0ciMSARmZtTsmo4Fmj+/PD22o9DUFMzNZc41bQm4pwKJhcTj+pavVQiBYncQW+W5wSAI4UmfK4rHtF65aBqkUpBI6HsrqhaFPAV67a8XDNFGnlSKisJodhTSNH1fUwNbtgAkAH3eV5Q1SEl6M1xPCD13T6UKXcIuxSaysnpgaSlzvLwM58/HkbIeIXRxi4vOBJZCSmm5cLM9BrZuBa83TiiUGbizs4s0N5cOpdEoXLigJ39mHDoEmwpWvRW4kBACIRVTG1wuOHlyC7t3Z8qeeSbO4KDZ+MgwPLzExx//g+Hhf1JXp+LxSJLJV2hoeChdx0y8YYAtFzIaWfXbunW554qyld7eUT77zDqb9PkaOXbseeD5dNm+fTHGxiybFOoxoeJkTlXHc86//76LTz65VZ4amxTTY2qAPpEVz6eHhjrZufM/SKmly44fv5+BgViFMq2pKBcqpxfeeWc7nZ2ncspOnmxg794lgsHibYWg7GVrMT22c6F8jh17FlVdyCkLBBp5+ukEX32lr9jybxUIwNmzEAqVNwlWtKiXsoxPZqsMDTWxvLzE4cOfcv78H/B4mpGynv5+6O+3lEUs9h3btn3I3r1PsXv3U8BaSwOsZkPHa2KDDRsaeffdg5w+/SWnTg1z/XqcSKQdt3sLbnczoKCqN1HVMVpbA7S1eXj00V+yf/8XJe9dkQFlfbQ0Yc+e59iz5zkAwuE7zM/PMjc3y8LCPPfd56Ot7fd4vebfOYthPxeSNj4MWeD1rsfrXU97e6ej+zjOhd5662VHApxiex6QEpACpQq9UBVSydWXWujWZj1wc/p6pKO1aw2bw5PM7jwI5MZi4zixpgm1foMzceEgcvG/ADmTVfbztGiIOz8oCFH41cPMgP5Lf7/6N/e+n7Kp04uHuOVfk4ZklBhtjoyQAT8g05HG7G9NeDrJ1NfLpu2L/iNzu6VphimlpGlbA7/4Uzc1DR7CLT2VqQ8HUW98h//EOHemMx8K8n1e0+qMKwX/yCqLlQAc8YPS1dJVx0MHekg2tZNa01i2cBnwo4YTXHx7ApCj4NkFfbftqrBMJUrj2QVydGZ0hVRkBU9wAlesvKWZIX70xE2ciAdHBvTdNoy4cvTaqhGTpZuF59PiF28pOBEPjlwoG92dNne66Pnzz9E2dyDWNuVWCc8jfvCTiqw4dptsHPRANnpPzI1rqOEEyu0bKJHcfNoQ7z8+TrXEQ9UMyLjTtU9HSUVWUG7fSF+Vd+ZIRVYYPTFOaKqGaomHqrlQNro7NbVLul/pRkpZdbfJpko9kI3eEwuTCmo4sTpgq+s22dyFHgD46F5QBzfeL7uklISmXIC7pdri4a4ZYHDEr++r/+YN/gc9CxXyOCXFlQAAAABJRU5ErkJggg==
 
index 73b9a6b..33b3d11 100644 (file)
@@ -1,7 +1,7 @@
 This package was debianized by Rodrigo Linfati <rodrigo@linfati.cl> on
 sab, 02 gen 2010 22:12:52 +0100.
 
-It was downloaded from <http://googlelatitude.garage.maemo.org/>
+It was downloaded from <http://www.linfati.com/>
 
 Upstream Author(s):
 
index cdce769..e67f568 100644 (file)
@@ -1,4 +1,4 @@
-The Debian Package googlelatitude
+The Debian Package latitudeupdater
 ----------------------------
 
 Comments regarding the Package
index 006c02e..073fff5 100644 (file)
@@ -1,10 +1,10 @@
-googlelatitude (0.7-1) unstable; urgency=low
+latitudeupdater (0.7-1) unstable; urgency=low
 
   * Enable invoker
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 10 Aug 2011 19:48:00 +0200
 
-googlelatitude (0.7-0) unstable; urgency=low
+latitudeupdater (0.7-0) unstable; urgency=low
 
   * OAuth Support
   * Google Latitude 1.0 API Support
@@ -15,20 +15,20 @@ googlelatitude (0.7-0) unstable; urgency=low
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Thu, 21 Jul 2011 21:58:20 +0200
 
-googlelatitude (0.6-2) unstable; urgency=low
+latitudeupdater (0.6-2) unstable; urgency=low
 
   * enable use of gps+cell
   * fix the "start daemon" bug
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Thu, 27 Jan 2011 16:07:22 +0100
 
-googlelatitude (0.6-1) unstable; urgency=low
+latitudeupdater (0.6-1) unstable; urgency=low
 
   * auto update setting for daemon, fix start at boot time, fix NaN in gps eph
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 26 Jan 2011 17:23:41 +0100
 
-googlelatitude (0.6-0) unstable; urgency=low
+latitudeupdater (0.6-0) unstable; urgency=low
 
   * Daemon at boot time (default off)
   * If not network, do not try to update
@@ -38,32 +38,32 @@ googlelatitude (0.6-0) unstable; urgency=low
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 26 Jan 2011 16:32:34 +0100
 
-googlelatitude (0.4-7) unstable; urgency=low
+latitudeupdater (0.4-7) unstable; urgency=low
 
   * fix maximal accuracy
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Tue, 25 Jan 2011 00:48:01 +0100
 
-googlelatitude (0.4-6) unstable; urgency=low
+latitudeupdater (0.4-6) unstable; urgency=low
 
   * GUI for the daemon mode
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Sat, 22 Jan 2011 23:26:09 +0100
 
-googlelatitude (0.4-5) unstable; urgency=low
+latitudeupdater (0.4-5) unstable; urgency=low
 
   * New daemon mode
   * bugs fix
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Sat, 22 Jan 2011 18:51:23 +0100
 
-googlelatitude (0.4-0) unstable; urgency=low
+latitudeupdater (0.4-0) unstable; urgency=low
 
   * Bump version
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 05 May 2010 16:14:00 +0200
 
-googlelatitude (0.3-9) unstable; urgency=low
+latitudeupdater (0.3-9) unstable; urgency=low
 
   * Cleanup, preparation for pr1.2
   * Now Google Location and Buzz
@@ -71,74 +71,74 @@ googlelatitude (0.3-9) unstable; urgency=low
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 05 May 2010 16:05:51 +0200
 
-googlelatitude (0.3-8) unstable; urgency=low
+latitudeupdater (0.3-8) unstable; urgency=low
 
   * Testing, minor bugs fix
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Sat, 02 Jan 2010 03:53:51 +0100
 
-googlelatitude (0.3-7) unstable; urgency=low
+latitudeupdater (0.3-7) unstable; urgency=low
 
   * libqt4 -> diablo = OK, fremantle -> fail
   * libqt4-maemo5 -> fremantle => OK
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Sat, 02 Jan 2010 03:40:22 +0100
 
-googlelatitude (0.3-6) unstable; urgency=low
+latitudeupdater (0.3-6) unstable; urgency=low
 
   * test libqt4 + libqt4-maemo5
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Sat, 02 Jan 2010 02:44:33 +0100
 
-googlelatitude (0.3-5) unstable; urgency=low
+latitudeupdater (0.3-5) unstable; urgency=low
 
   * some fix, support to auto update, auto stop on real-fix
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Fri, 01 Jan 2010 23:32:32 +0100
 
-googlelatitude (0.3-1) unstable; urgency=low
+latitudeupdater (0.3-1) unstable; urgency=low
 
   * initial support to liblocation
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Fri, 01 Jan 2010 16:20:56 +0100
 
-googlelatitude (0.2-2) unstable; urgency=low
+latitudeupdater (0.2-2) unstable; urgency=low
 
   * minor change in gui
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Tue, 29 Dec 2009 23:23:46 +0100
 
-googlelatitude (0.2-1) unstable; urgency=low
+latitudeupdater (0.2-1) unstable; urgency=low
 
   * more fix...
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Tue, 29 Dec 2009 21:53:01 +0100
 
-googlelatitude (0.2-0) unstable; urgency=low
+latitudeupdater (0.2-0) unstable; urgency=low
 
   * Google Maps via WebKit
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Tue, 29 Dec 2009 12:58:25 +0100
 
-googlelatitude (0.1-4) unstable; urgency=low
+latitudeupdater (0.1-4) unstable; urgency=low
 
   * add libgconf2-dev depend... Â¿why?
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 16 Dec 2009 19:08:20 +0100
 
-googlelatitude (0.1-3) unstable; urgency=low
+latitudeupdater (0.1-3) unstable; urgency=low
 
   * fix depend from libqt4-dev to libqt4-maemo5-dev
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 16 Dec 2009 16:35:12 +0100
 
-googlelatitude (0.1-2) unstable; urgency=low
+latitudeupdater (0.1-2) unstable; urgency=low
 
   * fix section
 
  -- Rodrigo Linfati <rodrigo@linfati.cl>  Wed, 16 Dec 2009 15:34:52 +0100
 
-googlelatitude (0.1-1) unstable; urgency=low
+latitudeupdater (0.1-1) unstable; urgency=low
 
   * Initial release
 
index 2f69d36..e347342 100644 (file)
@@ -1,19 +1,20 @@
-Source: googlelatitude
+Source: latitudeupdater
 Section: user/navigation
 Priority: optional
 Maintainer: Rodrigo Linfati <rodrigo@linfati.cl>
 Build-Depends: debhelper (>= 5), libqt4-dev, libqtm-dev, applauncherd-dev, aegis-builder
 Standards-Version: 3.7.3
-Homepage: http://googlelatitude.garage.maemo.org/
+Homepage: http://www.linfati.com/
 XSBC-Bugtracker: mailto:rodrigo@linfati.cl
 
-Package: googlelatitude
+Package: latitudeupdater
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Google Latitude Updater
  Features:
   - Retrieve location using Cell Tower and/or Gps and send to Google Latitude
   - Run as Daemon
+  Note: This is an unofficial client
 XSBC-Maemo-Display-Name: LatitudeUpdater
 XB-Maemo-Icon-26: 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
 
index 73b9a6b..33b3d11 100644 (file)
@@ -1,7 +1,7 @@
 This package was debianized by Rodrigo Linfati <rodrigo@linfati.cl> on
 sab, 02 gen 2010 22:12:52 +0100.
 
-It was downloaded from <http://googlelatitude.garage.maemo.org/>
+It was downloaded from <http://www.linfati.com/>
 
 Upstream Author(s):
 
index e950644..39bc771 100644 (file)
@@ -1,30 +1,10 @@
-<!-- Generated by aegis-manifest 0.20110429-1+harmattan on 2011-08-04. -->
-<!-- To disable non-interactive creation of and updates to this file,
-     and adding of the resulting Aegis manifest into a Debian package,
-     replace this file with an empty (zero-length) file. -->
-<!-- The checksum is used for detecting any manual changes of the <aegis>
-     section. If the checksum is found and matches this section, file
-     contents will be updated without user interaction.
-     Modify the file or remove the checksum to disable this functionality. -->
-<!-- modified-checksum:44f3b8c5847ae5db21f364cc8de3e3f3 -->
 <aegis>
        <request policy="add">
-               <!-- /usr/lib/libQtLocation.so.1:_ZN10QtMobility22QGeoPositionInfoSource19createDefaultSourceEP7QObject -->
-               <!-- /usr/lib/libQtLocation.so.1:_ZNK10QtMobility14QGeoCoordinate8latitudeEv -->
-               <!-- /usr/lib/libQtLocation.so.1:_ZNK10QtMobility14QGeoCoordinate9longitudeEv -->
                <credential name="Location" />
-
                <for path="/opt/linfati.com/bin/LatitudeUpdaterDaemon" />
        </request>
        <request policy="add">
-               <!-- Application uses QDeclarativeView or QDeclarativeEngine
-                    and inherited tokens discovered from QML imports. -->
-
-               <!-- /usr/lib/libQtLocation.so.1:_ZN10QtMobility22QGeoPositionInfoSource19createDefaultSourceEP7QObject -->
-               <!-- /usr/lib/libQtLocation.so.1:_ZNK10QtMobility14QGeoCoordinate8latitudeEv -->
-               <!-- /usr/lib/libQtLocation.so.1:_ZNK10QtMobility14QGeoCoordinate9longitudeEv -->
                <credential name="Location" />
-
                <for path="/opt/linfati.com/bin/LatitudeUpdaterQML" />
        </request>
 </aegis>
diff --git a/qtc_packaging/debian_harmattan/manifest.aegis b/qtc_packaging/debian_harmattan/manifest.aegis
new file mode 100644 (file)
index 0000000..e69de29
index e1b9481..40675ed 100755 (executable)
@@ -34,7 +34,7 @@ install: build
        dh_testroot
        dh_clean -k 
        dh_installdirs
-       $(MAKE)  INSTALL_ROOT="$(CURDIR)"/debian/googlelatitude install
+       $(MAKE)  INSTALL_ROOT="$(CURDIR)"/debian/latitudeupdater install
 
 # Build architecture-independent files here.
 binary-indep: build install
index bea4b59..5b1e3f0 100755 (executable)
@@ -34,7 +34,7 @@ install: build
        dh_testroot
        dh_clean -k 
        dh_installdirs
-       $(MAKE)  INSTALL_ROOT="$(CURDIR)"/debian/googlelatitude install
+       $(MAKE)  INSTALL_ROOT="$(CURDIR)"/debian/latitudeupdater install
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -70,7 +70,7 @@ binary-arch: build install
        dh_gencontrol
        dh_md5sums
        dh_builddeb
-       aegis-deb-add -control debian/googlelatitude/DEBIAN/control .. debian/googlelatitude.aegis=_aegis
+       aegis-deb-add -control debian/latitudeupdater/DEBIAN/control .. debian/latitudeupdater.aegis=_aegis
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/qtc_packaging/icon-256.png b/qtc_packaging/icon-256.png
new file mode 100644 (file)
index 0000000..d12a613
Binary files /dev/null and b/qtc_packaging/icon-256.png differ
diff --git a/qtc_packaging/meego-1.jpg b/qtc_packaging/meego-1.jpg
new file mode 100644 (file)
index 0000000..c5d3c02
Binary files /dev/null and b/qtc_packaging/meego-1.jpg differ
diff --git a/qtc_packaging/screenshot-1.jpg b/qtc_packaging/screenshot-1.jpg
new file mode 100644 (file)
index 0000000..b94408c
Binary files /dev/null and b/qtc_packaging/screenshot-1.jpg differ
diff --git a/resouses.qrc b/resouses.qrc
deleted file mode 100644 (file)
index 3d7ed28..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<RCC>
-    <qresource prefix="/">
-        <file>qml/main.qml</file>
-        <file>qml/MainPage.qml</file>
-    </qresource>
-</RCC>