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 / k3bdatajob.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.6 KB  |  112 lines

  1. /* 
  2.  *
  3.  * $Id: k3bdatajob.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 K3BDATAJOB_H
  18. #define K3BDATAJOB_H
  19.  
  20. #include <k3bjob.h>
  21. #include <k3bdatadoc.h>
  22.  
  23. #include <qfile.h>
  24.  
  25. class QString;
  26. class QDataStream;
  27. class K3bAbstractWriter;
  28. class K3bIsoImager;
  29. class KTempFile;
  30. class K3bMsInfoFetcher;
  31.  
  32. namespace K3bDevice {
  33.   class DeviceHandler;
  34.   class DiskInfo;
  35. }
  36.  
  37. /**
  38.   *@author Sebastian Trueg
  39.   */
  40. class K3bDataJob : public K3bBurnJob
  41. {
  42.   Q_OBJECT
  43.     
  44.  public:
  45.   K3bDataJob( K3bDataDoc*, K3bJobHandler*, QObject* parent = 0 );
  46.   virtual ~K3bDataJob();
  47.     
  48.   K3bDoc* doc() const;
  49.   K3bDevice::Device* writer() const;
  50.  
  51.   virtual bool hasBeenCanceled() const;
  52.  
  53.   virtual QString jobDescription() const;
  54.   virtual QString jobDetails() const;
  55.         
  56.  public slots:
  57.   void cancel();
  58.   void start();
  59.  
  60.   /**
  61.    * Used to specify a non-default writer.
  62.    * If this does notget called K3bDataJob determines
  63.    * the writer itself.
  64.    */
  65.   void setWriterJob( K3bAbstractWriter* );
  66.   void setImager( K3bIsoImager* );
  67.  
  68.  protected slots:
  69.   void slotIsoImagerFinished( bool success );
  70.   void slotIsoImagerPercent(int);
  71.   void slotWriterJobPercent( int p );
  72.   void slotWriterNextTrack( int t, int tt );
  73.   void slotWriterJobFinished( bool success );
  74.   void slotVerificationProgress( int );
  75.   void slotVerificationFinished( bool );
  76.   void slotMsInfoFetched(bool);
  77.   void slotDetermineMultiSessionMode( K3bDevice::DeviceHandler* dh );
  78.   void writeImage();
  79.   void cancelAll();
  80.  
  81.   /**
  82.    * Just a little helper method that makes subclassing easier.
  83.    * Basically used for DVD writing.
  84.    */
  85.   virtual bool waitForMedium();
  86.         
  87.  protected:
  88.   virtual void prepareData();
  89.   virtual bool prepareWriterJob();
  90.   virtual void prepareImager();
  91.   virtual void determineMultiSessionMode();
  92.   virtual K3bDataDoc::MultiSessionMode getMultiSessionMode( const K3bDevice::DiskInfo& );
  93.   virtual void cleanup();
  94.  
  95.   K3bDataDoc::MultiSessionMode usedMultiSessionMode() const;
  96.  
  97.   K3bAbstractWriter* m_writerJob;
  98.   K3bIsoImager* m_isoImager;
  99.   K3bMsInfoFetcher* m_msInfoFetcher;
  100.  
  101.  private:
  102.   bool startWriterJob();
  103.   bool startOnTheFlyWriting();
  104.   void prepareWriting();
  105.   void connectImager();
  106.  
  107.   class Private;
  108.   Private* d;
  109. };
  110.  
  111. #endif
  112.