File indexing completed on 2024-05-05 04:50:54

0001 /*
0002     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 #ifndef _K3B_AUDIOSESSION_READING_JOB_H_
0006 #define _K3B_AUDIOSESSION_READING_JOB_H_
0007 
0008 #include "k3bthreadjob.h"
0009 
0010 #include <QStringList>
0011 
0012 class QIODevice;
0013 
0014 namespace K3b {
0015     namespace Device {
0016         class Device;
0017         class Toc;
0018     }
0019 
0020     class AudioSessionReadingJob : public ThreadJob
0021     {
0022         Q_OBJECT
0023 
0024     public:
0025         explicit AudioSessionReadingJob( JobHandler*, QObject* parent = 0 );
0026         ~AudioSessionReadingJob() override;
0027 
0028         /**
0029          * For now this simply reads all the audio tracks at the beginning
0030          * since we only support CD-Extra mixed mode cds.
0031          */
0032         void setDevice( Device::Device* );
0033 
0034         /**
0035          * Use for faster initialization
0036          */
0037         void setToc( const Device::Toc& toc );
0038 
0039         /**
0040          * the data gets written directly into ioDev instead of imagefiles.
0041          * To disable just set ioDev to 0 (the default)
0042          */
0043         void writeTo( QIODevice* ioDev );
0044 
0045         /**
0046          * Used if fd == -1
0047          */
0048         void setImageNames( const QStringList& l );
0049 
0050         void setParanoiaMode( int m );
0051         void setReadRetries( int );
0052         void setNeverSkip( bool b );
0053 
0054     public Q_SLOTS:
0055         void start() override;
0056 
0057     private:
0058         void jobFinished( bool ) override;
0059         bool run() override;
0060 
0061         class Private;
0062         Private* const d;
0063     };
0064 }
0065 
0066 #endif