Suggestions for a Windows D-Bus client development environment
Schmottlach, Glenn
glenn.schmottlach at harman.com
Wed Apr 15 10:50:22 PDT 2009
I'd certainly be interested in giving your code a try. It appears you've
addressed many of my concerns about the existing NDesk-DBus
implementation. Would it be easy for you to split it into its own
package and send it as a zip/tarball (since I'm sitting behind a
firewall that blocks GIT).
Also, would you have any documentation associated with your changes or
at least sample code to look at (perhaps in versaplex)?
I know there was one thing I had to change in the NDesk-DBus library
implementation. It defaults to "EXTERNAL" authentication but in order
for me to talk to my target over TCP/IP, I had to change that to
"ANONYMOUS".
Thanks . . .
Glenn
-----Original Message-----
From: Avery Pennarun [mailto:apenwarr at gmail.com]
Sent: Wednesday, April 15, 2009 1:41 PM
To: Schmottlach, Glenn
Cc: dbus at lists.freedesktop.org
Subject: Re: Suggestions for a Windows D-Bus client development
environment
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