Hal+Mono

Owen Fraser-Green owen at discobabe.net
Wed May 5 00:00:02 PDT 2004


Hi,

What would normally happen, if you wrote both client and server on .NET
using dbus-sharp, the bindings would be generated at run-time. The client
would then link to the server's assembly and almost think it was using the
server directly but actually be calling the generated bindings. What I did
for HAL then was just to create the stubs of the server from which the
actual bindings get generated at run-time. Note that it would also be
possible to use HAL using dbus-sharp without these stubs by using the D-BUS
calls directly but the stubs just make it almost as simple as using a
regular library.

If and when there's an IDL for D-BUS then that will create a much better
path to follow but for now it's pretty straight forward to hand-code stubs
as you can see from the attached files. Unfortunately, it wouldn't be
possible to parse the HAL source to generate bindings à la gtk# because the
D-BUS interface only really gets determined at run time. A server could
register its service with D-BUS and, upon being offered random method calls
to the service by D-BUS, decide, also at random, whether to serve them or
not if it really wanted to.

Would it possible to get CVS access to the add these stubs to HAL? I have
freedesktop.org CVS access already with the username ow3n but not
permissions for the HAL module. Then I could also through in a couple of
examples.

Cheers,
Owen

----- Original Message ----- 
From: "Joe Shaw" <joe at ximian.com>
To: "Owen Fraser-Green" <owen at discobabe.net>
Cc: <hal at freedesktop.org>
Sent: Tuesday, May 04, 2004 5:46 PM
Subject: Re: Hal+Mono


> On Tue, 2004-05-04 at 15:35 +0200, Owen Fraser-Green wrote:
> > I've made dbus-sharp stubs for the Device and Manager interfaces of
> > HAL in C#. This makes it possible (and actually rather easy) to use
> > HAL using mono. Would you be interested in me adding this to (as an
> > optional build target of course) to HAL?
>
> I think this would be great.  Are the bindings generated automatically
> (a la gtk#) or are they bound manually?
>
> Joe
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Manager.cs
Type: application/octet-stream
Size: 968 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20040505/ae54ad6d/Manager.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Device.cs
Type: application/octet-stream
Size: 1765 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20040505/ae54ad6d/Device.obj
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list