Version 0.6-2, use of cell+gps, fix "start daemon"
[googlelatitude] / src / glatitude.h
index b752c81..d4aa126 100644 (file)
@@ -1,43 +1,37 @@
 #ifndef GLATITUDE_H
 #define GLATITUDE_H
 
+#include <QtCore>
 #include <QtNetwork>
 
 class GoogleLatitude : public QObject {
     Q_OBJECT
 
 signals:
-    void setOK();
-    void setERROR();
-    void getOK();
-
-public slots:
-    void get();
+    void glat_ok();
+    void glat_error();
 
 public:
     GoogleLatitude(QObject *parent = 0);
-    void login(QString username, QString password);
-    void set(double latitude, double longitude, double accuracy=1000.);
-    double get_lat() { return latitude; }
-    double get_lon() { return longitude; }
-    double get_acc() { return accuracy; }
+    void set_login(QString username, QString password);
+    void update(double la, double lo, double ac);
+    void reset();
 
 private slots:
-    void finishedreply(QNetworkReply *r);
+    void glat_reply(QNetworkReply *r);
 
 private:
-    // info
     QString user;
     QString pass;
+    bool login_error;
     double latitude;
     double longitude;
     double accuracy;
-    // stuff
+
     QNetworkAccessManager *worker;
     QUrl urllogin;
     QUrl urldologin;
     QUrl urlupdate;
-    QUrl urlloc;
 };
 
 #endif // GLATITUDE_H