Added classes.
[speedfreak] / Client / httpclient.cpp
index 98aa98a..984a0db 100644 (file)
@@ -1,14 +1,14 @@
 #include <QString>
 #include <QMessageBox>
 #include "httpclient.h"
-#include "carmainwindow.h"
+#include "mainwindow.h"
 
 
 /**
   *@brief Constructor, connects object to GUI
   *@param Pointer to carmainwindow, which is temporarily used during development
   */
-HttpClient::HttpClient(CarMainWindow *myCarw)
+HttpClient::HttpClient(MainWindow *myCarw)
 {
     myMainw = myCarw;
     netManager = new QNetworkAccessManager();
@@ -58,7 +58,7 @@ void HttpClient::requestRegistration()
   *@brief Sends result(s) to the server in xml format.
   *Send authentication information in the header.
   */
-void HttpClient::sendResultXml(QString category)
+void HttpClient::sendResultXml(QString category, double result)
 {
     qDebug() << "_sendResultXml";
 
@@ -70,7 +70,7 @@ void HttpClient::sendResultXml(QString category)
     QNetworkReply *currentDownload;
 
     xmlbuffer->open(QBuffer::ReadWrite);
-    myXmlwriter->writeResult(xmlbuffer);
+    myXmlwriter->writeResult(xmlbuffer, result);
     qDebug() << "carmainwindow: xmlbuffer->data(): " << xmlbuffer->data();
 
     QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword();