callout on property change
Joe Shaw
joe at ximian.com
Tue Apr 20 10:11:10 PDT 2004
On Tue, 2004-04-20 at 12:56 -0400, Robert Love wrote:
> Hello, guys.
>
> I added callout-on-property-change, because we need it to do lots of
> things, such as a replacement for ifplugd (take action on link change).
> See attached patch.
Looks good to me.
> Couple of design decisions:
These all seem fine to me. I don't think property add/remove is too
interesting either. Presumably if someone needs to act on it, they
could do it when the device or a capability is added.
> - However, VALUE is currently hardcoded to foo until I write
> hal_property_to_string().
This should be fixed before checking it in, though. ;) There's already
hal_property_get_as_string() (although _to_string() is a better name,
for sure). So you can just use that if you're dealing with
HalPropertys. Otherwise, you can just write
hal_device_property_to_string() (or whatever) which just gets the
HalProperty and calls hal_property_to_string() on it. The other
hal_device_property functions do that, so you can just use one of those
as a template.
> I know there were some concerns about properties changing too often for
> a callout to remain sane. In my testing, however, there were
> surprisingly few property-modified callouts occurring - perhaps since I
> only report when a property changes (as opposed to add/remove)? During
> my testing, the only property change callouts I saw were me pulling out
> my ethernet cable to test. So who knows.
I think they were mostly my natural worry reflex kicking in. I'm glad
to see it's not really an issue either way.
Joe
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list