X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Fxmlwriter.cpp;h=ff288d12eadebb2b96c1b975711ffefe8d4ce36e;hp=4d4c11262ff4b2466f542767d3a3d29a0a50e0c0;hb=17639e6f1949d4e577803c655aefd299f7f43cd7;hpb=03990e5a5135b260efdabb9bb6631cc7a57ba3da diff --git a/Client/xmlwriter.cpp b/Client/xmlwriter.cpp index 4d4c112..ff288d1 100644 --- a/Client/xmlwriter.cpp +++ b/Client/xmlwriter.cpp @@ -6,16 +6,6 @@ * license http://opensource.org/licenses/gpl-license.php GNU Public License */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include "xmlwriter.h" @@ -26,7 +16,7 @@ */ XmlWriter::XmlWriter() { - + tmpvalue = 10; } /** @@ -36,6 +26,7 @@ XmlWriter::~XmlWriter() { } + /** *@brief Writes registration items into tags. *@param netbuf a buffer where xmlstreamwriter writes to. @@ -44,8 +35,9 @@ XmlWriter::~XmlWriter() *@param email. */ void XmlWriter::writeRegistering(QBuffer *netbuf, QString usr, QString psswd, QString email) -//void XmlWriter::writeRegistering(QIODevice *netbuf, QString usr, QString psswd, QString email) { + qDebug() << "_writeRegistering"; + xmlwriter.setDevice(netbuf); xmlwriter.writeStartDocument(); @@ -74,13 +66,16 @@ void XmlWriter::writeRegistering(QBuffer *netbuf, QString usr, QString psswd, QS *@todo Replace test value to finally used variables. */ void XmlWriter::writeResult(QBuffer *netbuf) -//void XmlWriter::writeResult(QIODevice *netbuf) { + qDebug() << "_writeResult"; + xmlwriter.setDevice(netbuf); xmlwriter.writeStartDocument(); xmlwriter.writeStartElement("result"); - xmlwriter.writeAttribute("value", QString::number(14)); + tmpvalue++; + qDebug() << tmpvalue; + xmlwriter.writeAttribute("value", QString::number(tmpvalue)); xmlwriter.writeAttribute("unit", "seconds"); xmlwriter.writeAttribute("date", QDateTime::currentDateTime().toString()); xmlwriter.writeEndElement();