#ifndef PROCESSPARSER_H
#define PROCESSPARSER_H

#include <QObject>
#include <qxmlstream.h>
#include <clienthandler.h>
#include "Data/typesDataServerClient.h"

class ProcessParser : public QObject
{
    Q_OBJECT
public:
    explicit ProcessParser(QObject *parent = nullptr);
    void initialize(ProcessingSystem *processingSystem);
    void read(ClientHandler *client, QByteArray array);


signals:
    void sigLogMessage(QString text);
private:
    ProcessingSystem *processingSystem;
    void clientAuth(QXmlStreamReader &xmlReader,ClientHandler *client);
    void clientDeAuth(QXmlStreamReader &xmlReader,ClientHandler *client);
    void toClientMessage(QXmlStreamReader &xmlReader,ClientHandler *client);
    void queryToDb(QXmlStreamReader &xmlReader,ClientHandler *client);
    void queryTasksXML(QXmlStreamReader &xmlReader,ClientHandler *client);
    void clientMessage(QXmlStreamReader &xmlReader,ClientHandler *client);
    void clientNotify(QXmlStreamReader &xmlReader,ClientHandler *client);
    void clientDataInfo(QXmlStreamReader &xmlReader, ClientHandler *client);
};

#endif // PROCESSPARSER_H
