File indexing completed on 2024-05-12 04:51:08
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef _K3B_MOVIX_DOC_PREPARER_H_ 0007 #define _K3B_MOVIX_DOC_PREPARER_H_ 0008 0009 #include "k3bjob.h" 0010 0011 namespace K3b { 0012 class MovixDoc; 0013 class FileItem; 0014 class DirItem; 0015 0016 /** 0017 * This class creates the needed eMovix structures in an eMovix doc 0018 * and removes them after creating the image. 0019 */ 0020 class MovixDocPreparer : public Job 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit MovixDocPreparer( MovixDoc* doc, JobHandler*, QObject* parent = 0 ); 0026 ~MovixDocPreparer() override; 0027 0028 MovixDoc* doc() const; 0029 0030 bool createMovixStructures(); 0031 void removeMovixStructures(); 0032 0033 public Q_SLOTS: 0034 /** 0035 * use createMovixStructures and removeMovixStructures instead. 0036 */ 0037 void start() override; 0038 0039 /** 0040 * Useless since this job works synchronously 0041 */ 0042 void cancel() override; 0043 0044 private: 0045 bool writePlaylistFile(); 0046 bool writeIsolinuxConfigFile( const QString& ); 0047 bool writeMovixRcFile(); 0048 bool addMovixFiles(); 0049 bool addMovixFilesNew(); 0050 FileItem* createItem( const QString& localPath, const QString& docPath ); 0051 DirItem* createDir( const QString& docPath ); 0052 0053 class Private; 0054 Private* d; 0055 }; 0056 } 0057 0058 #endif