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

  1. /* 
  2.  *
  3.  * $Id: k3bcuefileparser.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. #ifndef _K3B_CUEFILE_PARSER_H_
  17. #define _K3B_CUEFILE_PARSER_H_
  18.  
  19. #include "k3bimagefilereader.h"
  20.  
  21. #include <k3btoc.h>
  22. #include <k3bcdtext.h>
  23. #include "k3b_export.h"
  24. /**
  25.  * Parses a cue file.
  26.  * Datatracks have either mode1 or mode2 where the latter contains xa form1/2.
  27.  * The last track may not have a proper length!
  28.  */
  29. class LIBK3B_EXPORT K3bCueFileParser : public K3bImageFileReader
  30. {
  31.  public:
  32.   K3bCueFileParser( const QString& filename = QString::null );
  33.   ~K3bCueFileParser();
  34.  
  35.   /**
  36.    * CDRDAO does not use this image filename but replaces the extension from the cue file
  37.    * with "bin" to get the image filename.
  38.    * So in this case cdrecord won't be able to burn the cue file. That is why we need this hack.
  39.    */
  40.   bool imageFilenameInCue() const { return m_imageFilenameInCue; }
  41.  
  42.   const K3bDevice::Toc& toc() const;
  43.   const K3bDevice::CdText& cdText() const;
  44.  
  45.  private:
  46.   void readFile();
  47.   bool parseLine( QString& line );
  48.   void simplifyWhiteSpace( QString& s );
  49.   bool findImageFileName( const QString& fileEntry );
  50.  
  51.   bool m_imageFilenameInCue;
  52.  
  53.   class Private;
  54.   Private* d;
  55. };
  56.  
  57. #endif
  58.