1 
2 #ifndef RIPPERPLUGIN_H
3 #define RIPPERPLUGIN_H
4 
5 #include <kcoreaddons_export.h>
6 #include <QVariantList>
7 
8 #include "backendplugin.h"
9 
10 #include <KUrl>
11 
12 class RipperPlugin;
13 
14 
15 class KCOREADDONS_EXPORT RipperPluginItem : public BackendPluginItem
16 {
17     Q_OBJECT
18 public:
19     explicit RipperPluginItem( QObject *parent );
20     virtual ~RipperPluginItem();
21 
22     struct Data {
23         int fromSector; // cd paranoia
24         int toSector;
25 
26         int fileCount; // icedax
27         int processedFiles;
28         float lastFileProgress;
29     } data;
30 };
31 
32 
33 /** @author Daniel Faust <hessijames@gmail.com> */
34 class KCOREADDONS_EXPORT RipperPlugin : public BackendPlugin
35 {
36     Q_OBJECT
37 public:
38     explicit RipperPlugin( QObject *parent );
39     virtual ~RipperPlugin();
40 
41     virtual QString type() const;
42 
43     virtual QList<ConversionPipeTrunk> codecTable() = 0;
44 
45     /** rips a track */
46     virtual int rip( const QString& device, int track, int tracks, const KUrl& outputFile ) = 0;
47     /** returns a command for ripping a track through a pipe; "" if pipes aren't supported */
48     virtual QStringList ripCommand( const QString& device, int track, int tracks, const KUrl& outputFile ) = 0;
49 };
50 
51 #endif // RIPPERPLUGIN_H
52