Listing devices using udisks2

David Zeuthen zeuthen at
Mon May 14 14:01:19 PDT 2012


On Mon, May 14, 2012 at 4:54 PM, Anant Kamath <kamathanant at> wrote:
> Hi,
> I'm using udisks 1.97
> Since the EnumarateDevices DBus method is not available in udisks2, is the
> org.freedesktop.DBus.ObjectManager.GetManagedObjects method the best way to
> list drives using udisks2 ?

The best way is to use libudisks2 (LGPLv2), see

which is accessible from C/C++ and any language supporting
GObjectIntrospection. If that is not an option, the next best choice
is to use GDBusObjectManagerClient, see

or any other D-Bus ObjectManager implementation. If you don't have a
D-Bus ObjectManager implementation available, you can (relatively)
easily write one yourself, see

Also, you probably want to check out the udisks(8) man page, see

which has sections on API/ABI stability and whether you should be
using udisks at all.


More information about the devkit-devel mailing list