How can I handle device Added/removed signals from system bus

Matthew Johnson dbus at matthew.ath.cx
Sat Sep 17 04:59:04 PDT 2011


On Fri Sep 16 11:43, Robert Jobbagy wrote:
> I would like handle signals from dbus with own java interface.
> 
> I'm interested in VolumeAdded and VolumeRemoved signals when I put disc in
> optical drive and remove it.
> 
> I have already made conf and xml file.
> 
> I reproduce this simple code :
> 
> http://lists.freedesktop.org/archives/dbus/2009-October/011879.html
> 
> what Matthew Johson wrote.
> 
> and it doesn't works for me :(
> 
> what is missing ?

Hi Robert, 

Unless you send us your code, I cannot tell what is missing (-:

You'll need to define the VolumeAdded and Removed signals in their interface,
then write a handler in your code that handles them and use DBusConnection's
addSigHandler method to listen for them.

Matt



More information about the dbus mailing list