Main Page DBusSharp

From NDesk

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:07, 29 January 2009 (edit)
Alp (Talk | contribs)
(Update doc)
← Previous diff
Revision as of 05:10, 29 January 2009 (edit) (undo)
Alp (Talk | contribs)
m
Next diff →
Line 93: Line 93:
Managed D-Bus exports and imports objects implementing interfaces marked with the NDesk.DBus.Interface attribute. This allows developers to either extend existing code with inter-process and network transparency or develop new code to proxy the state of the application. [http://git.ndesk.org/?p=dbus-sharp;a=blob;f=examples/TestExportInterface.cs TestExportInterface.cs] provides examples of exported and imported interfaces, methods and properties. [http://git.ndesk.org/?p=dbus-sharp-glib;a=blob;f=examples/TestUI.cs TestUI.cs] demonstrates how the additional NDesk.DBus.GLib library can be used to provide main loop integration with GLib and GTK+ applications. Main loop integration is essential for anything but the simplest uses of D-Bus. Alternatively, message processing can be driven using NDesk.DBus.Connection.Iterate () and related methods. Managed D-Bus exports and imports objects implementing interfaces marked with the NDesk.DBus.Interface attribute. This allows developers to either extend existing code with inter-process and network transparency or develop new code to proxy the state of the application. [http://git.ndesk.org/?p=dbus-sharp;a=blob;f=examples/TestExportInterface.cs TestExportInterface.cs] provides examples of exported and imported interfaces, methods and properties. [http://git.ndesk.org/?p=dbus-sharp-glib;a=blob;f=examples/TestUI.cs TestUI.cs] demonstrates how the additional NDesk.DBus.GLib library can be used to provide main loop integration with GLib and GTK+ applications. Main loop integration is essential for anything but the simplest uses of D-Bus. Alternatively, message processing can be driven using NDesk.DBus.Connection.Iterate () and related methods.
-NDesk.DBus maps all primitive CLR types as well as generic Dictionary<Key,Value>, List<T> and Array types to their equivalent D-Bus types, structs and boxed primitive 'object' parameters to D-Bus variants which and are fully interoperable with other languages and platforms implementing the D-Bus specification. Managed event members are mapped to D-Bus signals (but the event delegate type's parameters must map directly to the D-Bus signal -- EventArgs parameters are not supported).+NDesk.DBus maps all primitive CLR types as well as generic Dictionary<Key,Value>, List<T> and Array types and structs to their equivalent D-Bus types, while primitives boxed in System.Object are mapped to D-Bus variants. Managed events are mapped to D-Bus signals (keep in mind that the event delegate type's parameters must map directly to the D-Bus signal -- EventArgs parameters are not supported). All of these mappings are transparent and fully interoperable with other languages and platforms implementing the D-Bus specification.
=== Contact === === Contact ===

Revision as of 05:10, 29 January 2009

step1.png step2.png

ndesk-dbus is a C# implementation of D-Bus. It's often referred to as dbus-sharp, or "managed D-Bus" to avoid confusion with existing bindings (which wrap libdbus).

D-Bus is an inter-process communication framework that lets applications interface with the system event bus as well as allowing them to talk to one another in a peer-to-peer configuration.

Contents

Status

This software is under development but is already used by a wide range of applications for tasks as simple as maintaining a single instance of the GUI to whole instant messaging frameworks and hardware detection APIs.

It provides a tested, high-performance bridge to and from all systems that are exposed via D-Bus, regardless of programming language, UI toolkit or license. The source code is MIT X11 licensed (Free Software/Open Source), allowing integration into other projects with very few restrictions.

The code is a clean-room implementation based on the D-Bus Specification Version 0.11 and study of the wire protocol of existing tools.

It aims for compatibility with Mono and Microsoft .NET frameworks supporting the 2.0 profile. Backward compatibility with 1.0 will not be a consideration. Ongoing work to ensure CLS compliance means that managed D-Bus can be used by any language that can target the CLR.

Cross platform support

Supported platforms

A standard build of managed D-Bus will work across a wide range of platforms:

  • x86
  • 64-bit (eg. AMD64)
  • Big endian (eg. PPC)
  • ARM (eg. Nokia 770)
  • Mono 1.1.13 or newer
  • GNU/Linux
  • FreeBSD
  • Mac OS X
  • Microsoft Windows / .NET runtime (in the 0.5 development branch)

Soon to be supported

  • MIPS (untested) (eg. wifi routers) -- pending JIT fix

Users

This is a list of applications known to make use of managed D-Bus:

Documentation

Managed D-Bus exports and imports objects implementing interfaces marked with the NDesk.DBus.Interface attribute. This allows developers to either extend existing code with inter-process and network transparency or develop new code to proxy the state of the application. TestExportInterface.cs provides examples of exported and imported interfaces, methods and properties. TestUI.cs demonstrates how the additional NDesk.DBus.GLib library can be used to provide main loop integration with GLib and GTK+ applications. Main loop integration is essential for anything but the simplest uses of D-Bus. Alternatively, message processing can be driven using NDesk.DBus.Connection.Iterate () and related methods.

NDesk.DBus maps all primitive CLR types as well as generic Dictionary<Key,Value>, List<T> and Array types and structs to their equivalent D-Bus types, while primitives boxed in System.Object are mapped to D-Bus variants. Managed events are mapped to D-Bus signals (keep in mind that the event delegate type's parameters must map directly to the D-Bus signal -- EventArgs parameters are not supported). All of these mappings are transparent and fully interoperable with other languages and platforms implementing the D-Bus specification.

Contact

Support can be found on the #managed-dbus IRC channel on irc.gnome.org

Download

See the managed D-Bus release archive.

Development

See the development roadmap for a detailed list of remaining tasks.

git-clone git://git.ndesk.org/pub/scm/dbus-sharp

The dbus-sharp API is now fairly stable stable. It's best to install a released version and depend on it from your application rather than bundling the sources directly as has been done in the past.

There is also a module which provides GLib integration as an optional extra:

git-clone git://git.ndesk.org/pub/scm/dbus-sharp-glib

Exposition

Retrieved from "http://ndesk.org/DBusSharp"