[Kde-hardware-devel] optical drives and discs

Kevin Ottens ervin at kde.org
Mon Apr 7 06:33:11 CEST 2008


Le Monday 07 April 2008, Nathan Bradshaw a écrit :
> I'd like to list all the optical drives on a given system and indicate if
> they have a disc mounted and if so, it's type. I can cheerfully enough get
> the list of optical drive devices and their interfaces and I can get a list
> of mounted optical discs, but I can't figure out how to associate each
> OpticalDisc device interface with an OpticalDrive interface. Can some one
> point me in the right direction?

On the Solid::Device corresponding to the disc, if you call the parent() 
method you'll get the Solid::Device corresponding to the drive.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20080407/a3758f7b/attachment.pgp 


More information about the Kde-hardware-devel mailing list