Update of /cvsroot/pclasses/pclasses2/src/System
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1487/src/System
Modified Files:
CdRomDevice.linux.cpp
Log Message:
added close tray method to CdRomDevice
Index: CdRomDevice.linux.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/System/CdRomDevice.linux.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CdRomDevice.linux.cpp 14 Feb 2005 16:33:35 -0000 1.3
+++ CdRomDevice.linux.cpp 14 Feb 2005 16:38:46 -0000 1.4
@@ -169,6 +169,12 @@
throw IO::IOError(errno, "ioctl error on device", P_SOURCEINFO);
}
+void CdRomDevice::closeTray() throw (IO::IOError) {
+ int ret = ::ioctl((int)handle(), CDROMEJECT);
+ if(ret == -1)
+ throw IO::IOError(errno, "ioctl CDROMCLOSETRAY failed.", P_SOURCEINFO);
+}
+
void CdRomDevice::pause() throw(IO::IOError)
{
int ret = ::ioctl((int)handle(), CDROMPAUSE);
|