Settings dialog changed. Log in/Log out functionality improved.
[speedfreak] / Client / httpclient.h
1 /*
2  * Http client Connects application to server.
3  *
4  * @author     Tiina Kivilinna-Korhola
5  * @copyright  (c) 2010 Speed Freak team
6  * license     http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #ifndef HTTPCLIENT_H
10 #define HTTPCLIENT_H
11
12 #include <QNetworkAccessManager>
13 #include <QNetworkRequest>
14 #include <QNetworkReply>
15 #include "xmlwriter.h"
16 #include "xmlreader.h"
17 class MainWindow;
18
19
20
21 class HttpClient : public QObject {
22     Q_OBJECT
23 public:
24     HttpClient(MainWindow *myCarw);
25     ~HttpClient();
26     XmlWriter *myXmlwriter;
27     XmlReader *myXmlreader;
28
29 private:
30     MainWindow *myMainw;
31     QNetworkAccessManager *netManager;
32
33 signals:
34     void loginOK();
35
36 public slots:
37     void requestRegistration();
38     void checkLogin();
39     void sendResultXml(QString category, double result);
40     void sendRouteXml();
41     void requestTopList(QString category, QString limit);
42     void requestCategories();
43     void ackOfResult();
44     void ackOfRoute();
45     void ackOfRegistration();
46     void ackOfCategories();
47     void ackOfToplist();
48     void ackOfLogin();
49     void errorFromServer(QNetworkReply::NetworkError);
50
51 };
52
53 #endif // HTTPCLIENT_H