Youtube video and text (draft).
[speedfreak] / Client / xmlwriter.h
index 8f7ccda..ac60175 100644 (file)
@@ -1,27 +1,47 @@
+/*
+ * Xml writer
+ *
+ * @author     Tiina Kivilinna-Korhola
+ * @copyright  (c) 2010 Speed Freak team
+ * license     http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #ifndef XMLWRITER_H
 #define XMLWRITER_H
 
 #ifndef XMLWRITER_H
 #define XMLWRITER_H
 
-#include "ui_mainwindow.h"
+#include <QXmlStreamWriter>
+#include <QBuffer>
+#include <QtGui>
+#include <QNetworkRequest>
+#include <QIODevice>
+#include <QFile>
+#include <QMessageBox>
+#include <QDebug>
+#include <QDateTime>
+#include <QDate>
+#include <QTime>
+#include <QByteArray>
+#include <QApplication>
 
 
 
 
-class XmlWriter : public QObject
-{
+class XmlWriter : public QObject {
+    Q_OBJECT
 public:
 public:
-    XmlWriter(Ui_MainWindow* myMainWindow);
+    XmlWriter();
     ~XmlWriter();
 
 private:
     QXmlStreamWriter xmlwriter;
     ~XmlWriter();
 
 private:
     QXmlStreamWriter xmlwriter;
-    QMap<QString, int> resultmap;
-    Ui_MainWindow* ui;
 
 public slots:
 
 public slots:
-    bool writeXmlFile(QIODevice* device);
+    void writeRegistering(QBuffer *netbuf, QString usr, QString psswd, QString email);
+    void writeResult(QBuffer *netbuf, double result);
+    void writeGpsTrack(QBuffer *netbuf, int counter, int start, int stop, int lat, int lon, int alt, int speed, int time);
+    bool writeXmlFile(QIODevice *device);
+    //void writeXml(QString usr, QString psswd, QString email);
+    void writeXml();
     void writeItems();
     void writeItems();
-    void initResultmap();
-    void fillResultmap();
-    void xmlWrite();
-
 };
 
 #endif // XMLWRITER_H
 };
 
 #endif // XMLWRITER_H
+