[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#740844: Move to udisks2, udisks 1 is deprecated

Hello Paul, Jos,

Paul Gevers [2014-03-21 10:50 +0100]:
> I made upstream aware, he is looking in to it. He tries to use
> libudisks2, but he is having difficulties implementing it. It isn't
> clear to him how to mount a cdrom via the library.

Depends on what you want to do.

If you e. g. have the device path (e. g. from enumeration or from the
signal) you can get an UDisksObject from it with
and then the UDisksFileSystem object with

On an UDisksFileSystem object you can then call
(or the async variant, which is probably better for a well-behaved

You can also check if it's a CD-ROM with

If you want to directly speak D-BUS, you can grab the
/org/freedesktop/UDisks2/block_devices/<devname> object, and call

It's been a few years since I had a CD drive, so the above is a bit
fuzzy, sorry. If you can describe in more detail what you need to do,
I can probably put together some example code.

Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature

Reply to: