Unmounting and 'eject' press

David Zeuthen david at fubar.dk
Mon May 31 08:46:27 PDT 2004


On Mon, 2004-05-31 at 17:18, Ikke wrote:
> > If eject is pressed, while a disc is mounted HAL will emit an
> > 'EjectPressed' condition on the HalDevice representing the optical disc.
> > In hal-device-manager it looks like this
> >
> >  Condition EjectPressed,
> >   device=/org/freedesktop/Hal/devices/block_22_0-disc
> >   message =  ['EjectPressed', '/udev/hdc']
> 
> How do I catch that? In code? I'm very new to this :-$
> 

You simply implement the device_condition callback in libhal and check
if the parameter condition_name is a string with the contents
'EjectPressed'.

Cheers,
David


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list