#ifndef PROCESSBURNIMAGE_H
#define PROCESSBURNIMAGE_H

#include "src/process/processbasic.h"
#include "src/frame/auditlog.h"
#include "src/data/datacdrom.h"

#include <QObject>
#include "kysdk/kysdk-system/libkysysinfo.h"
#include <QGSettings/QGSettings>

class DataCDROM;

class ProcessBurnImage : public ProcessBasic
{
    Q_OBJECT
public:
    ProcessBurnImage(QString, void *, QObject *parent = nullptr);
    ~ProcessBurnImage();
protected:
    bool prepare() Q_DECL_OVERRIDE;
    bool config() Q_DECL_OVERRIDE;
protected slots:
    void slotsStart() Q_DECL_OVERRIDE;
    void slotsOutput() Q_DECL_OVERRIDE;
    void slotsError() Q_DECL_OVERRIDE;
    void slotsFinished(int,QProcess::ExitStatus) Q_DECL_OVERRIDE;
    void slotsRemoveDisc(QString); // 有光驱被拔出
private:
    bool verifyCDROM();
private:
    void        *m_oCDROM;
    int          m_iProgress;
    double       m_fSpeed;
    QString      m_oImage;
    AuditLog     m_oBurnImageLog;
    bool         m_isSpecialMachine;
    QGSettings  *auditburner;
    QString      auditlogpath;

    DataCDROM   *m_oCloneCDROM;
};

#endif // PROCESSBURNIMAGE_H
