[PATCH] Expose all HAL objects on the bus

Kevin Ottens ervin at kde.org
Mon Aug 21 13:49:48 PDT 2006


Le lundi 21 août 2006 18:15, David Zeuthen a écrit :
> I'm not sure I completely understand where our introspection data is
> wrong and why it needs fixing? Perhaps if you could include a diff of
> the outputs of
>
>  dbus-send --system \
>            --dest=org.freedesktop.Hal \
>            --print-reply \
>            /org/freedesktop/Hal/Manager \
>            org.freedesktop.DBus.Introspectable.Introspect
>
>  (or any other object)

Ok, what I'm trying to change is not in the /org/freedesktop/Hal/Manager node. 
But on the "/", "/org", "/org/freedesktop", "/org/freedesktop/Hal" 
and "/org/freedesktop/Hal/devices" nodes. I'll take "/" as an example.

Without my patch, trying to introspect "/" gives:
---8<------8<------8<---
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
</node>
---8<------8<------8<---

With my patch it gives:
---8<------8<------8<---
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg name="data" direction="out" type="s"/>
    </method>
  </interface>
  <node name="org"/>
</node>
---8<------8<------8<---

Since it provides the same facilities for the nodes I cited earlier, that 
means that the tree of objects available in HAL is fully traversable, hence 
completing HAL introspection. AFAIK that's the expected behavior for fully 
introspectable applications.

The other services behaving this way that you probably have running on your 
system are org.freedesktop.NetworkManagerInfo and 
org.freedesktop.NetworkManager. You can completely discover the objects they 
expose and that's what my patch brings to HAL.

In case I'm still not clear you can try (for example):
dbus-send --system \
	--dest=org.freedesktop.NetworkManager \
	--print-reply \
	/ \
	org.freedesktop.DBus.Introspectable.Introspect
and:
dbus-send --system \
	--dest=org.freedesktop.NetworkManager \
	--print-reply \
	/org/freedesktop \
	org.freedesktop.DBus.Introspectable.Introspect

And see by yourself.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060821/2c490950/attachment.pgp


More information about the hal mailing list