Re: GDBus API Questions; was: GDBus/GVariant plans for next GLib release



2009/10/15 David Zeuthen <david fubar dk>:
> Hey Mikkel,
>
> On Thu, 2009-10-15 at 08:24 +0200, Mikkel Kamstrup Erlandsen wrote:
>>  * Can I register a GDBusInterfaceVTable without registering an
>> object? The use case I have in mind is something akin to dynamically
>> spawning objects on the server side when messages are send to objects
>> under a given path[1]. Fx. when messages are send to
>> /org/example/item/* I create the item matching * dynamically. Ideally
>> one would register the vtable for objects matching a regexp. This
>> would facilitate RESTful message passing on the bus.
>
> Yeah, there's a TODO in gdbusconnection.h to say we need something like
> that - it would be similar dbus_connection_register_fallback() [1]. We
> probably want a separate GDBusHierarchyVTable with functions to a) list
> objects in the "directory"; and b) get introspection data for objects in
> the "directory".

I just looked over the newly introduced
g_dbus_connection_register_subtree() and related data structures, and
I think it will fit very nicely with what I am going to need. All in
all it looks really sweet, good work.

One thing though is that as I read it objects in a subtree must be
known before method calls are accepted to them? For my use case in
Zeitgeist I was hoping that I could completely get rid of a "Manager"
type of interface, and just implicitly create objects in the tree
whenever calls where made to them. This does not look possible as it
stands?

Maybe allowing '*' as a wildcard node name in the subtree enumeration function?

-- 
Cheers,
Mikkel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]