Logo Search packages:      
Sourcecode: k9copy version File versions  Download package

int K3bDevice::Device::cdMediaType (  )  const

Does only make sense for cd media.

Returns:
-1 on error K3bDevice::MediaType otherwise

Definition at line 2091 of file k3bdevice.cpp.

References readTocPmaAtip().

{
  int m = MEDIA_UNKNOWN;

  unsigned char* data = 0;
  int dataLen = 0;
  if( readTocPmaAtip( &data, dataLen, 4, false, 0 ) ) {
    if( (data[6]>>6)&1 )
      m = MEDIA_CD_RW;
    else
      m = MEDIA_CD_R;

    delete [] data;
  }
  else
    m = MEDIA_CD_ROM;

  return m;
}


Generated by  Doxygen 1.6.0   Back to index