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

bool K3bDevice::Device::block ( bool  b  )  const

block or unblock the drive's tray

Returns:
true on success and false on error.
See also:
eject()

Definition at line 1466 of file k3bdevice.cpp.

{
  ScsiCommand cmd( this );
  cmd[0] = MMC_PREVENT_ALLOW_MEDIUM_REMOVAL;
  if( b )
    cmd[4] = 0x01;
  int r = cmd.transport();

  if( r )
    kdDebug() << "(K3bDevice::Device) MMC ALLOW MEDIA REMOVAL failed." << endl;

  return ( r == 0 );
}


Generated by  Doxygen 1.6.0   Back to index