#ifndef POSTPROCESSORSYSTEM_H
#define POSTPROCESSORSYSTEM_H

#include "Core/hashcomparer.h"
#include "UpdateController.h"
#include <QObject>
#include <Data/Datas.h>

class PostProcessorSystem : public QObject
{
    Q_OBJECT
public:
    explicit PostProcessorSystem(QObject *parent = 0);
    void initialize(DataParserOutput *dataParserOutput,
                    HashComparer *hashComparer,
                    VersionContainer* versionContainer,
                    UpdateController* updateController);

    void socketDisable();
    void serverBlocked();
    void startCompare();
    void compareFiles();
    void checkAccessType(const QString& type);
    void saveLoginData(ServerAuthorization *auth);
    void setServerVersion(StreamingVersionData *serverVersion);
    void calculateCommonHash();
signals:
    void sigSocketDisabled();
    void sigServerBlocked();
    void sigStartCompare(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash);
    void sigCallUpdateList();
    void sigSaveLoginData(ServerAuthorization *serverAuth);


private:
    HashComparer *hashComparer;
    VersionContainer *versionContainer;
    UpdateController * updateController;
    DataParserOutput *dataParserOutput;
};

#endif // POSTPROCESSORSYSTEM_H
