novehrady discussions

Joe Shaw joe@assbarn.com
Sun, 07 Sep 2003 12:32:30 -0400


On Thu, 2003-08-28 at 19:06, Havoc Pennington wrote:
> II. Object introspection via XML IDL
> ===
> 
> Each object implicitly has a method called something like
> getTypeInfo(), which can be used to obtain an XML string. This XML
> string is a document in to-be-determined format that describes the
> methods, interfaces, and child "directories" at that point in the
> object tree.  The XML would be generated dynamically by introspection.
> 
> The handler registered for the root path covering the path being 
> introspected would handle the getTypeInfo(), so e.g. if 
> Qt registered /qt it would use the QObject introspection features, 
> same for Python, etc.
> 
> We would need to figure out the XML format. The idea is something 
> along the lines of:
>  
>   <object>
>    <interface name="org.freedesktop.FooBar">
>      <method name="Blah">
>       <arg type="int32"/>
>      </method>
>      <method name="Foo">
>       <arg type="string"/>
>      </method>
>    </interface>
>   </object>
>   <subtree>foo</subtree>
>   <subtree>bar</subtree>
>   <subtree>baz</subtree>

Will there be some sort of object directory, or some other way to look
up objects by interface?  I can see wanting to call a method on a bunch
of objects with the same interface.  Getting the list of buddies from
all of my instant messaging programs is one that pops into mind.  (Of
course, the trick would be getting everyone to use the same interface,
but ignore that for now... :)

A better idea might be setting up an alternative tree that just follows
along interfaces and then allows you to get to object instances that
way.  Ie, you have both /objects/gaim/getBuddyList() and
/interfaces/instant-messaging/gaim/getBuddyList() and they're
equivalent.  This is kind of similar to what the kernel people are doing
with sysfs: you have the actual device tree and then you have a device
class tree.

Joe