On Thu, 2005-03-17 at 10:19 -0800, Jesse Keating wrote:
I need to plug into hal through dbus in python a bit. So I'm
looking
for some good documentation that covers dbus and hal, specifically ways
to find hal entries for kernels and devices and such.
I've 'borrowed' some code from system-config-packages, namely:
# get the devices from HAL
bus = dbus.Bus (dbus.Bus.TYPE_SYSTEM)
hal_service = bus.get_service ('org.freedesktop.Hal')
hal_manager = hal_service.get_object
('/org/freedesktop/Hal/Manager', 'org.freedesktop.Hal.Manager')
volume = hal_manager.FindDeviceStringMatch('volume.label', label)[0]
# Look for our disk label, return first one
props = hal_service.get_object(volume,
"org.freedesktop.Hal.Device").GetAllProperties() # Get all the
properties of the volume
mount = props['volume.mount_point'] # Get the mount point and return
it...
But I'm looking for alternatives to the 'FindDeviceStringMatch' and it's
friends. Can anybody help out as I pour through the sources to these
modules?
Probably best to ask this on the hal list. You just need to get the
dbus interface that hal exports which is contained in the HAL
specification on
http://www.freedesktop.org/Software/hal.
--
John (J5) Palmieri
Associate Software Engineer
Desktop Group
Red Hat, Inc.
Blog:
http://martianrock.com