#ifndef PROCESSINGSYSTEM_H
#define PROCESSINGSYSTEM_H

#include "sendsystem.h"
#include "typesDataServerClient.h"

#include <clienthandler.h>
#include <serverlmswidget.h>
#include "instructorsandtraineeswidget.h"

class SendSystem;
class ServerLMSWidget;
class InstructorsAndTrainees;
class Logger;
class DataParser;
class ClientHandler;

class ProcessingSystem : public QObject
{
    Q_OBJECT
public:
    explicit ProcessingSystem(QObject *parent = nullptr);

    void initialize(DataParser* dataParser,ServerLMSWidget *server,
                    InstructorsAndTraineesWidget *instructorsAndTrainees);
    void processingClientAutorization(ClientHandler *client, ClientAutorization clientAutorization);
    void processingClientMessage(ClientHandler *client, ClientMessage clientMessage);
    void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);

signals:
    void sigUpdateListClients();
    void sigAuthChanged();
    void sigLogMessage(QString log);
    void sigAddToMessanger(QString login,QString text);

private:
    ServerLMSWidget *server;
    DataParser *dataParser;
    InstructorsAndTraineesWidget *pInstructorsAndTrainees;
};

#endif // PROCESSINGSYSTEM_H
