Warning, file /multimedia/k3b/libk3b/projects/k3bgrowisofshandler.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 #ifndef _K3B_GROWISOFS_HANDLER_H_ 0006 #define _K3B_GROWISOFS_HANDLER_H_ 0007 0008 #include "k3bdevice.h" 0009 0010 #include <QObject> 0011 0012 namespace K3b { 0013 namespace Device { 0014 class Device; 0015 class DeviceHandler; 0016 } 0017 0018 0019 /** 0020 * This class handles the output parsing for growisofs 0021 * We put it in an extra class since we have two classes 0022 * using growisofs: the writer and the imager. 0023 */ 0024 class GrowisofsHandler : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit GrowisofsHandler( QObject* parent = 0 ); 0030 ~GrowisofsHandler() override; 0031 0032 enum ErrorType { 0033 ERROR_UNKNOWN, 0034 ERROR_MEDIA, 0035 ERROR_OVERSIZE, 0036 ERROR_SPEED_SET_FAILED, 0037 ERROR_OPC, 0038 ERROR_MEMLOCK, 0039 ERROR_WRITE_FAILED 0040 }; 0041 0042 int error() const { return m_error; } 0043 0044 void setMediaType(Device::MediaType mediaType); 0045 0046 public Q_SLOTS: 0047 /** 0048 * This will basically reset the error type 0049 * @param dao was growisofs called with DAO? 0050 */ 0051 void reset( K3b::Device::Device* = 0, bool dao = false ); 0052 0053 void handleStart(); 0054 void handleLine( const QString& ); 0055 void handleExit( int exitCode ); 0056 0057 Q_SIGNALS: 0058 void infoMessage( const QString&, int ); 0059 void newSubTask( const QString& ); 0060 void buffer( int ); 0061 void deviceBuffer( int ); 0062 0063 /** 0064 * We need this to know when the writing finished to update the progress 0065 */ 0066 void flushingCache(); 0067 0068 private Q_SLOTS: 0069 void slotCheckBufferStatus(); 0070 void slotCheckBufferStatusDone( Device::DeviceHandler* ); 0071 0072 private: 0073 class Private; 0074 Private* d; 0075 0076 int m_error; 0077 bool m_dao; 0078 Device::Device* m_device; 0079 Device::MediaType m_mediaType; 0080 }; 0081 } 0082 0083 #endif