Suggestions for a Windows D-Bus client development environment

Avery Pennarun apenwarr at gmail.com
Wed Apr 15 10:41:05 PDT 2009


On Wed, Apr 15, 2009 at 9:31 AM, Schmottlach, Glenn
<glenn.schmottlach at harman.com> wrote:
> I next tried building the NDesk-DBus .NET binding for Windows. Again, it
> appears this was originally intended to be built under Linux using Mono but
> I managed to hack the build environment to build it under Windows. The end
> result was a .NET assembly under Windows. I next installed IronPython and
> GTK# (the .NET port of GTK) and actually got an application up and running
> under Windows. Unfortunately, I cannot figure out how to receive signals
> using NDesk-DBus/IronPython and it only appears to support synchronous
> messaging and only a single return parameter. Also, it requires me to define
> D-Bus proxy interfaces using C# (and compile them into assemblies/DLLs) that
> mirror the D-Bus services I’d like to call. Finally, it doesn’t appear this
> project is being maintained or updated since ~2006. So, without examples
> (none which I could find for a NDesk/IronPython combination), this approach
> appeared to be a dead-end.

In the versaplex project, we had some similar concerns about
dbus-sharp and heavily modified it for our needs:

http://github.com/apenwarr/versaplex/tree/master/wvdbus-sharp

The new version is different in the following ways:

- simple support for async messaging (in fact, there are no automatic
method call wrappers at all)

- cleaner, more pluggable socket interface

- lots and lots of bug fixes in message encoding/decoding/alignment

- no more wrapper objects/interfaces (but you have to append things to
message objects by hand, kind of like in libdbus)

- support for any kind of return values you want

- support for returning signals

- much shorter/simpler code

- suite of unit tests

- works fine in Windows (used in production systems on Windows, so
it's not allowed to break there)

I haven't tried using it with IronPython, but I don't see why that
wouldn't work.  We don't use any magic C# or reflection tricks in this
version.

Note that wvdbus-sharp isn't really distributed separately right now;
it's part of the versaplex project.  That's because we didn't know if
anybody else would like to use it, and we didn't want to compete with
dbus-sharp.  But the code itself is a standalone module that doesn't
depend on versaplex at all.  If you're interested, we can split just
the wvdbus-sharp code into its own package quite easily.

Let me know if you have any questions/comments, and I'd be happy to assist.

Have fun,

Avery


More information about the dbus mailing list