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

  1. /* 
  2.  *
  3.  * $Id: k3bdeviceglobals.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003-2007 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 _K3B_DEVICE_GLOBALS_H_
  18. #define _K3B_DEVICE_GLOBALS_H_
  19.  
  20. #include <qstring.h>
  21. #include <k3bmsf.h>
  22. #include "k3bdevice_export.h"
  23.  
  24. namespace K3bDevice 
  25. {
  26.   typedef Q_UINT8 uint8;
  27.   typedef Q_UINT16 uint16;
  28.   typedef Q_UINT32 uint32;
  29.  
  30.   class Device;
  31.  
  32.   LIBK3BDEVICE_EXPORT QString deviceTypeString( int );
  33.   LIBK3BDEVICE_EXPORT QString writingModeString( int );
  34.   /**
  35.    * @param simplyfied if true the formatting state of DVD media is left out.
  36.    */
  37.   LIBK3BDEVICE_EXPORT QString mediaTypeString( int, bool simplyfied = false );
  38.   LIBK3BDEVICE_EXPORT void debugBitfield( unsigned char* data, long len );
  39.  
  40.   LIBK3BDEVICE_EXPORT uint16 from2Byte( unsigned char* );
  41.   LIBK3BDEVICE_EXPORT uint32 from4Byte( unsigned char* );
  42.   
  43.   LIBK3BDEVICE_EXPORT char fromBcd( const char& );
  44.   LIBK3BDEVICE_EXPORT char toBcd( const char& );
  45.   LIBK3BDEVICE_EXPORT bool isValidBcd( const char& );
  46.  
  47.   /**
  48.    * @return the maximum nuber of sectors that can be read from device @p dev starting
  49.    * at sector @p firstSector.
  50.    */
  51.   int determineMaxReadingBufferSize( Device* dev, const K3b::Msf& firstSector );
  52. }
  53.  
  54. #endif
  55.