#ifndef PROCESSBURNDATA_H
#define PROCESSBURNDATA_H

#include "processbasic.h"
#include "src/frame/auditlog.h"
#include "src/data/datadirectory.h"
#include <QObject>
#include <QTimer>
#include "kysdk/kysdk-system/libkysysinfo.h"
#include <QGSettings/QGSettings>

class DataCDROM;

class ProcessBurnData : public ProcessBasic
{
    Q_OBJECT
Q_SIGNALS:
    void clear();
public:
    ProcessBurnData(void *, void *, QObject *parent=nullptr);
    ~ProcessBurnData();
protected:
    bool prepare();
    bool config();
    bool working();
    bool worked();
protected slots:
    void slotsStart();
    void slotsOutput();
    void slotsError();
    void slotsFinished(int, QProcess::ExitStatus);
    void slotsCopy(QString, QString);
    void slotsProcessBarDVD();// 使DVD盘进度条按计时器时间走，不卡在关盘操作上
    void slotsRemoveDisc(QString); // 有光驱被拔出
private:
    int      m_iCopied;
    int      m_iProgress;
    qreal    m_fSpeed;
    bool     m_bCreateISO;
    bool     m_bAppendBurn;
    bool     m_bVerficationData;
    bool     m_oFlag;
    void    *m_oCDROM;
    void    *m_oRoot;
    QString  m_oCdrecord;
    QString  m_oMkisofs;
    QString  m_oGrowisofs;
    QString  m_oCreateISO;
    QString  m_oXorriso;
    QString  m_oISOOutput;
    QString  m_oMSINFO;
    AuditLog m_oBurnDataLog;
    QTimer  *m_oProgressBarTimer_DVD;
    QString  m_odestination;
    unsigned long m_oSize;
    unsigned long m_oNewSize;   // 需刻录内容的容量
    unsigned long m_ototal;
    void *m_ocopy;
    DataDirectory *m_root;
    AuditLog  m_oCreateIsoLog;
    bool m_isSpecialMachine;
    QGSettings *auditburner;
    QString auditlogpath;
    QString  m_oTempPath; // 写光盘前数据存储的临时目录
    DataCDROM *cloneCDROM;
};

#endif // PROCESSBURNDATA_H

