+++ /dev/null
-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
+++ /dev/null
-TARGET = LatitudeUpdaterDaemon
-QT -= gui
-
-SOURCES += latitudedaemon.cpp main-daemon.cpp
-HEADERS += latitudedaemon.h
-
-include(LatitudeUpdater.pri)
+++ /dev/null
-[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
+++ /dev/null
-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)
+++ /dev/null
-[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
+++ /dev/null
-TARGET = LatitudeUpdaterWidget
-
-SOURCES += latitudewidget.cpp main-widget.cpp
-HEADERS += latitudewidget.h
-
-include(LatitudeUpdater.pri)
-
}
} 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)
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)
+++ /dev/null
-#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();
- }
-}
+++ /dev/null
-#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
+++ /dev/null
-#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();
- }
-}
+++ /dev/null
-#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
--- /dev/null
+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()
+ }
+ }
+ }
+}
--- /dev/null
+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
--- /dev/null
+#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();
+}
--- /dev/null
+import QtQuick 1.0
+import com.meego 1.0
+
+PageStackWindow {
+ id: rootWindow
+ initialPage: mainPage
+ MainPage {
+ id: mainPage
+ }
+ showToolBar: false
+ showStatusBar: true
+}
--- /dev/null
+#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();
+}
--- /dev/null
+#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
--- /dev/null
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ <file>MainPage.qml</file>
+ </qresource>
+</RCC>
--- /dev/null
+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
--- /dev/null
+#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();
+}
--- /dev/null
+#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();
+}
+
--- /dev/null
+#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
+
--- /dev/null
+#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();
+}
--- /dev/null
+#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
--- /dev/null
+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
--- /dev/null
+#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();
+}
+++ /dev/null
-#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();
-}
+++ /dev/null
-#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
+++ /dev/null
-#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();
-}
+++ /dev/null
-#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
-# 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
--- /dev/null
+[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
--- /dev/null
+[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
+++ /dev/null
-#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();
-}
-
+++ /dev/null
-#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
-
--- /dev/null
+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()
--- /dev/null
+#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();
+ }
+}
--- /dev/null
+#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
--- /dev/null
+#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();
+ }
+}
--- /dev/null
+#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
--- /dev/null
+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()
--- /dev/null
+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()
+++ /dev/null
-#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();
-}
+++ /dev/null
-#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();
-}
+++ /dev/null
-#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();
-}
+++ /dev/null
-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()
- }
- }
- }
-}
+++ /dev/null
-import QtQuick 1.0
-import com.meego 1.0
-
-PageStackWindow {
- id: rootWindow
- initialPage: mainPage
- MainPage {
- id: mainPage
- }
- showToolBar: false
- showStatusBar: true
-}
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
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: 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
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):
-The Debian Package googlelatitude
+The Debian Package latitudeupdater
----------------------------
Comments regarding the Package
-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
-- 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
-- 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
-- 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
-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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
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):
-<!-- 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>
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
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
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
+++ /dev/null
-<RCC>
- <qresource prefix="/">
- <file>qml/main.qml</file>
- <file>qml/MainPage.qml</file>
- </qresource>
-</RCC>