#ifndef PROCESSBURNUDFDATA_H
#define PROCESSBURNUDFDATA_H

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

class DataCDROM;
class DataDirectory;

class ProcessBurnUDFData : public ProcessBasic
{
    Q_OBJECT
Q_SIGNALS:
    void clear();
public:
    ProcessBurnUDFData(void *, void *, QObject *parent=nullptr);
    ~ProcessBurnUDFData();
protected:
    bool prepare();
    bool config();
    bool working();
    bool worked();

private:
    void emptyDiscBurn();

protected slots:
    void slotsStart();
    void slotsOutput();
    void slotsError();
    void slotsFinished(int, QProcess::ExitStatus);
    void slotsCopy(QString, QString);
    void slotsProcessBarDVD();
    void slotsRemoveDisc(QString); // 有光驱被拔出
private:
    int      m_iCopied;
    int      m_iProgress;
    int      m_icountBurn;
    qreal    m_fSpeed;
    bool     m_isCreateISO;
    bool     m_bAppendBurn;
    bool     m_isVerficationData;
    bool     m_oFlag;
    bool     m_bBurnSuccess;
    bool     m_bBurnLogError;
    void    *m_oCDROM;
    void    *m_oRoot;
    QString  m_oCdrecord;
    QString  m_oMkisofs;
    QString  m_oGrowisofs;
    QString  m_oCreateISO;
    QString  m_isoOutput; //生成镜像目录
    QString  m_oMSINFO;
    QString  m_destination;
    QString  m_tempPath; // 写光盘前数据存储的临时目录
    QString  m_cmdArgumentStr; //记录命令参数的字符串
    AuditLog  m_oCreateIsoLog;
    AuditLog m_oBurnUdfDataLog;
    bool m_isSpecialMachine;
    QGSettings *auditburner;
    QString auditlogpath;
    DataCDROM *m_cloneCDROM;
    DataDirectory *m_root;
    unsigned long m_ototal;
    QTimer  *m_oProgressBarTimer_DVD;
};

#endif // PROCESSBURNDATA_H
