Hal spec and PropertyModifed

Matthew Johnson dbus at matthew.ath.cx
Tue Jan 3 06:38:10 PST 2006


I've been trying to write an application that runs a script whenever the
link status on a network interface changes, using Hal to signal the
change. Here are the problems I've run into:

Hal doesn't support introspection, and silently drops introspection
requests (the latter is apparently fixed in HEAD)

The Hal spec for org.freedesktop.Hal.Device is wrong:
(http://cvs.freedesktop.org/*checkout*/hal/hal/doc/spec/hal-spec.html?only_with_tag=HEAD#AEN3684)

it says:

# Notification that property have been modified
#
# @param  key                   Property
# @param  added                 True iff the property have been added
# @param  removed               True iff the property have been removed
#
void PropertyModified(string key, bool added, bool removed)

dbus-monitor --system, on the other hand, says:

signal sender=:1.0 -> dest=(null destination) interface=org.freedesktop.Hal.Device; member=PropertyModified
int32 6
[ (dbus-monitor too dumb to decipher arg type 'r')
(dbus-monitor too dumb to decipher arg type 'r')
(dbus-monitor too dumb to decipher arg type 'r')
(dbus-monitor too dumb to decipher arg type 'r')
(dbus-monitor too dumb to decipher arg type 'r')
(dbus-monitor too dumb to decipher arg type 'r')
]

Which looks like ia(...), and not sbb. Unhelpfully, I can't even guess
from the types in the struct, because dbus-monitor doesn't give them.

Finally, the spec contains:

# Notification that an event happened on the device has occured.
#
# Normally this is used to signal events that aren't or can't be
# expressed
# in properties, e.g. 'ProcessorOverheating' etc. 
#
# @param  condition             Name of condition
# @param  ...                   Dependent on the condition name
void Condition(string condition, ...)

If ... is meant to be multiple arguments and not a variant, is this
supported at all? its certainly not in the introspection format.

A *correct* specification of the signals somewhere would be nice, in any
format, but preferably in dbus introspection format.

Matt

-- 
Matthew Johnson
http://www.matthew.ath.cx/


More information about the dbus mailing list