File indexing completed on 2024-12-08 07:25:38

0001 /*
0002     SPDX-FileCopyrightText: 2003-2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl>
0004     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 
0010 #ifndef K3BISO9660_IMAGE_WRITING_JOB_H
0011 #define K3BISO9660_IMAGE_WRITING_JOB_H
0012 
0013 #include "k3bjob.h"
0014 #include "k3b_export.h"
0015 
0016 namespace K3b {
0017     namespace Device {
0018         class Device;
0019     }
0020 
0021     class LIBK3B_EXPORT Iso9660ImageWritingJob : public BurnJob
0022     {
0023         Q_OBJECT
0024 
0025     public:
0026         explicit Iso9660ImageWritingJob( JobHandler* );
0027         ~Iso9660ImageWritingJob() override;
0028 
0029         Device::Device* writer() const override { return m_device; }
0030 
0031         QString jobDescription() const override;
0032         QString jobDetails() const override;
0033         QString jobSource() const override;
0034         QString jobTarget() const override;
0035 
0036     public Q_SLOTS:
0037         void cancel() override;
0038         void start() override;
0039 
0040         void setImagePath( const QString& path ) { m_imagePath = path; }
0041         void setSpeed( int s ) { m_speed = s; }
0042         void setBurnDevice( K3b::Device::Device* dev ) { m_device = dev; }
0043         void setWritingMode( K3b::WritingMode mode ) { m_writingMode = mode; }
0044         void setSimulate( bool b ) { m_simulate = b; }
0045         void setNoFix( bool b ) { m_noFix = b; }
0046         void setDataMode( int m ) { m_dataMode = m; }
0047         void setVerifyData( bool b ) { m_verifyData = b; }
0048         void setCopies( int c ) { m_copies = c; }
0049 
0050     protected Q_SLOTS:
0051         void slotWriterJobFinished( bool );
0052         void slotVerificationFinished( bool );
0053         void slotVerificationProgress( int );
0054         void slotWriterPercent( int );
0055         void slotNextTrack( int, int );
0056         void startWriting();
0057 
0058     private:
0059         bool prepareWriter();
0060 
0061         WritingMode m_writingMode;
0062         bool m_simulate;
0063         Device::Device* m_device;
0064         bool m_noFix;
0065         int m_speed;
0066         int m_dataMode;
0067         bool m_verifyData;
0068         QString m_imagePath;
0069         int m_copies;
0070 
0071         class Private;
0072         Private* d;
0073     };
0074 }
0075 
0076 #endif