File indexing completed on 2024-06-16 04:33:37

0001 /*
0002     SPDX-FileCopyrightText: 2010 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 
0009 
0010 #ifndef _K3B_DEFAULT_EXTERNAL_PROGRAMS_H_
0011 #define _K3B_DEFAULT_EXTERNAL_PROGRAMS_H_
0012 
0013 #include "k3bexternalbinmanager.h"
0014 #include "k3b_export.h"
0015 
0016 namespace K3b {
0017     class ExternalBinManager;
0018 
0019     LIBK3B_EXPORT void addDefaultPrograms( ExternalBinManager* );
0020     LIBK3B_EXPORT void addTranscodePrograms( ExternalBinManager* );
0021     LIBK3B_EXPORT void addVcdimagerPrograms( ExternalBinManager* );
0022 
0023     class LIBK3B_EXPORT AbstractCdrtoolsProgram : public SimpleExternalProgram
0024     {
0025     public:
0026         AbstractCdrtoolsProgram( const QString& program, const QString& cdrkitAlternative );
0027         ~AbstractCdrtoolsProgram() override;
0028 
0029     protected:
0030         bool usingCdrkit( const ExternalBin& bin ) const;
0031         QString getProgramPath( const QString& dir ) const override;
0032         QString versionIdentifier( const ExternalBin& bin ) const override;
0033         
0034     private:
0035         class Private;
0036         Private* d;
0037     };
0038 
0039     class LIBK3B_EXPORT CdrecordProgram : public AbstractCdrtoolsProgram
0040     {
0041     public:
0042         CdrecordProgram();
0043 
0044     protected:
0045         void parseFeatures( const QString& output, ExternalBin& bin ) const override;
0046     };
0047 
0048 
0049     class LIBK3B_EXPORT MkisofsProgram : public AbstractCdrtoolsProgram
0050     {
0051     public:
0052         MkisofsProgram();
0053 
0054     protected:
0055         void parseFeatures( const QString& output, ExternalBin& bin ) const override;
0056     };
0057 
0058 
0059     class LIBK3B_EXPORT ReadcdProgram : public AbstractCdrtoolsProgram
0060     {
0061     public:
0062         ReadcdProgram();
0063 
0064     protected:
0065         void parseFeatures( const QString& output, ExternalBin& bin ) const override;
0066     };
0067 
0068 
0069     class LIBK3B_EXPORT Cdda2wavProgram : public AbstractCdrtoolsProgram
0070     {
0071     public:
0072         Cdda2wavProgram();
0073 
0074     protected:
0075         void parseFeatures( const QString& output, ExternalBin& bin ) const override;
0076     };
0077 
0078 
0079     class LIBK3B_EXPORT CdrdaoProgram : public SimpleExternalProgram
0080     {
0081     public:
0082         CdrdaoProgram();
0083 
0084     protected:
0085         QString versionIdentifier( const ExternalBin& bin ) const override;
0086         bool scanFeatures( ExternalBin& bin ) const override;
0087     };
0088 
0089 
0090     class LIBK3B_EXPORT TranscodeProgram : public SimpleExternalProgram
0091     {
0092     public:
0093         explicit TranscodeProgram( const QString& transcodeProgram );
0094 
0095         // no user parameters (yet)
0096         bool supportsUserParameters() const override { return false; }
0097 
0098     protected:
0099         QString versionIdentifier( const ExternalBin& bin ) const override;
0100         bool scanFeatures( ExternalBin& bin ) const override;
0101     };
0102 
0103 
0104     class LIBK3B_EXPORT VcdbuilderProgram : public SimpleExternalProgram
0105     {
0106     public:
0107         explicit VcdbuilderProgram( const QString& );
0108         
0109     protected:
0110         QString versionIdentifier( const ExternalBin& bin ) const override;
0111     };
0112 
0113 
0114     class LIBK3B_EXPORT NormalizeProgram : public SimpleExternalProgram
0115     {
0116     public:
0117         NormalizeProgram();
0118     };
0119 
0120 
0121     class LIBK3B_EXPORT GrowisofsProgram : public SimpleExternalProgram
0122     {
0123     public:
0124         GrowisofsProgram();
0125 
0126     protected:
0127         bool scanFeatures( ExternalBin& bin ) const override;
0128     };
0129 
0130 
0131     class LIBK3B_EXPORT DvdformatProgram : public SimpleExternalProgram
0132     {
0133     public:
0134         DvdformatProgram();
0135 
0136     protected:
0137         Version parseVersion( const QString& output, const ExternalBin& bin ) const override;
0138         QString parseCopyright( const QString& output, const ExternalBin& bin ) const override;
0139     };
0140 
0141 
0142     class LIBK3B_EXPORT DvdBooktypeProgram : public SimpleExternalProgram
0143     {
0144     public:
0145         DvdBooktypeProgram();
0146 
0147     protected:
0148         Version parseVersion( const QString& output, const ExternalBin& bin ) const override;
0149         QString parseCopyright( const QString& output, const ExternalBin& bin ) const override;
0150     };
0151 
0152     class LIBK3B_EXPORT CdrskinProgram : public SimpleExternalProgram
0153     {
0154     public:
0155         CdrskinProgram();
0156 
0157     protected:
0158         bool scanFeatures(ExternalBin& bin) const override;
0159     };
0160 }
0161 
0162 #endif