home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bmixedjob.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  3.3 KB  |  145 lines

  1. /* 
  2.  *
  3.  * $Id: k3bmixedjob.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef K3BMIXEDJOB_H
  18. #define K3BMIXEDJOB_H
  19.  
  20. #include <k3bjob.h>
  21.  
  22.  
  23. class K3bMixedDoc;
  24. class K3bIsoImager;
  25. class K3bAudioImager;
  26. class QFile;
  27. class QDataStream;
  28. class K3bAbstractWriter;
  29. class K3bWaveFileWriter;
  30. class KTempFile;
  31. class K3bCdrecordWriter;
  32. class K3bMsInfoFetcher;
  33. class K3bAudioNormalizeJob;
  34. class K3bAudioJobTempData;
  35. class K3bDevice::Device;
  36.  
  37. /**
  38.   *@author Sebastian Trueg
  39.   */
  40. class K3bMixedJob : public K3bBurnJob
  41. {
  42.   Q_OBJECT
  43.     
  44.  public:
  45.   K3bMixedJob( K3bMixedDoc*, K3bJobHandler*, QObject* parent = 0 );
  46.   ~K3bMixedJob();
  47.     
  48.   K3bDoc* doc() const;
  49.   K3bDevice::Device* writer() const;
  50.         
  51.   QString jobDescription() const;
  52.   QString jobDetails() const;
  53.         
  54.  public slots:
  55.   void cancel();
  56.   void start();
  57.  
  58.  protected slots:
  59.   // iso imager slots
  60.   void slotIsoImagerFinished( bool success );
  61.   void slotIsoImagerPercent(int);
  62.  
  63.   // ms info fetcher slots
  64.   void slotMsInfoFetched(bool);
  65.  
  66.   // audio decoder slots
  67.   void slotAudioDecoderFinished( bool );
  68.   void slotAudioDecoderNextTrack( int, int );
  69.   void slotAudioDecoderPercent(int);
  70.   void slotAudioDecoderSubPercent( int );
  71.  
  72.   // writer slots
  73.   void slotWriterFinished( bool success );
  74.   void slotWriterNextTrack(int, int);
  75.   void slotWriterJobPercent(int);
  76.  
  77.   // normalizing slots
  78.   void slotNormalizeJobFinished( bool );
  79.   void slotNormalizeProgress( int );
  80.   void slotNormalizeSubProgress( int );
  81.  
  82.   // misc slots
  83.   void slotMediaReloadedForSecondSession( bool );
  84.   void slotMaxSpeedJobFinished( bool );
  85.  
  86.  private:
  87.   bool prepareWriter();
  88.   bool writeTocFile();
  89.   bool writeInfFiles();
  90.   bool startWriting();
  91.   void startFirstCopy();
  92.   void addAudioTracks( K3bCdrecordWriter* writer );
  93.   void addDataTrack( K3bCdrecordWriter* writer );
  94.   void cleanupAfterError();
  95.   void removeBufferFiles();
  96.   void createIsoImage();
  97.   void determineWritingMode();
  98.   void normalizeFiles();
  99.   void prepareProgressInformation();
  100.   void writeNextCopy();
  101.   void determinePreliminaryDataImageSize();
  102.  
  103.   K3bMixedDoc* m_doc;
  104.   K3bIsoImager* m_isoImager;
  105.   K3bAudioImager* m_audioImager;
  106.   K3bAudioJobTempData* m_tempData;
  107.   K3bWaveFileWriter* m_waveFileWriter;
  108.   K3bAbstractWriter* m_writer;
  109.   K3bMsInfoFetcher* m_msInfoFetcher;
  110.   K3bAudioNormalizeJob* m_normalizeJob;
  111.  
  112.   QString m_isoImageFilePath;
  113.  
  114.   KTempFile* m_tocFile;
  115.  
  116.   enum Action { INITIALIZING_IMAGER,
  117.         PREPARING_DATA,
  118.         CREATING_ISO_IMAGE,
  119.         CREATING_AUDIO_IMAGE,
  120.         WRITING_ISO_IMAGE,
  121.         WRITING_AUDIO_IMAGE,
  122.         FETCHING_MSINFO };
  123.  
  124.   int m_currentAction;
  125.   double m_audioDocPartOfProcess;
  126.  
  127.   bool m_canceled;
  128.   bool m_errorOccuredAndAlreadyReported;
  129.  
  130.   int m_usedDataMode;
  131.   int m_usedDataWritingApp;
  132.   int m_usedAudioWritingApp;
  133.   int m_usedDataWritingMode;
  134.   int m_usedAudioWritingMode;
  135.  
  136.   QString m_tempFilePrefix;
  137.  
  138.   K3b::Msf m_projectSize;
  139.  
  140.   class Private;
  141.   Private* d;
  142. };
  143.  
  144. #endif
  145.