From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: Inclusion of dbus-proxy Date: Sun, 22 Aug 2010 16:47:09 +0200 Message-ID: References: <4045_1282428217_ZZh07312bUcyR.00_1282428214.23884.594.camel@steed.robot-madness> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282488451 2913 80.91.229.12 (22 Aug 2010 14:47:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 Aug 2010 14:47:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jan Moringen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 22 16:47:30 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OnBpY-0007q3-BZ for ged-emacs-devel@m.gmane.org; Sun, 22 Aug 2010 16:47:28 +0200 Original-Received: from localhost ([127.0.0.1]:55483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnBpX-0008GP-ID for ged-emacs-devel@m.gmane.org; Sun, 22 Aug 2010 10:47:27 -0400 Original-Received: from [140.186.70.92] (port=60060 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnBpR-0008GI-ID for emacs-devel@gnu.org; Sun, 22 Aug 2010 10:47:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnBpQ-0003RQ-7W for emacs-devel@gnu.org; Sun, 22 Aug 2010 10:47:21 -0400 Original-Received: from smtprelay-h32.telenor.se ([213.150.131.5]:59573) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnBpP-0003Ql-UQ for emacs-devel@gnu.org; Sun, 22 Aug 2010 10:47:20 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id 1BCF7E90C7 for ; Sun, 22 Aug 2010 16:47:11 +0200 (CEST) X-SENDER-IP: [83.227.138.150] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkuAELVcExT44qWPGdsb2JhbACgMgwBAQEBNS24NIU3BIl2gn0 X-IronPort-AV: E=Sophos;i="4.56,251,1280700000"; d="scan'208";a="122312556" Original-Received: from ua-83-227-138-150.cust.bredbandsbolaget.se (HELO www.verona.se) ([83.227.138.150]) by ipb1.telenor.se with ESMTP; 22 Aug 2010 16:47:11 +0200 Original-Received: from localhost.localdomain (unknown [192.168.201.6]) by www.verona.se (Postfix) with ESMTP id 79176713363; Sun, 22 Aug 2010 16:47:10 +0200 (CEST) In-Reply-To: <4045_1282428217_ZZh07312bUcyR.00_1282428214.23884.594.camel@steed.robot-madness> (Jan Moringen's message of "Sun, 22 Aug 2010 00:03:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129040 Archived-At: Jan Moringen writes: > Hi, > > I recently developed dbus-proxy, a framework that makes accessing remote > D-Bus objects from Emacs Lisp easier and more transparent than the > current `dbus-call-method' mechanism. Since I was encouraged to propose > it for inclusion in Emacs, I'm hereby doing so. Besides being attached, > the code is also available here: > http://bazaar.launchpad.net/~scymtym/+junk/dbus-proxy/files > > Let me start with a simple example of how a typical usage of dbus-proxy > looks: > > (let ((device-kit (dbus-proxy-make-remote-proxy > :system > "org.freedesktop.DeviceKit" > "/org/freedesktop/DeviceKit"))) > > ;; Retrieve the daemon-version property. > (slot-value device-kit :daemon-version) > (oref device-kit :daemon-version) > > ;; Connect to the device-event signal. > (connect device-kit 'device-event > (lambda (&rest args) > (message "Device event %s" args))) > > ;; Enumerate subsystems. > (enumerate-by-subsystem device-kit '("sound"))) > > This example creates a proxy object for the device kit D-Bus object and > uses its methods, properties and signals. > > dbus-proxy uses D-Bus introspection information to dynamically create > classes and methods that reflect the structure of the remote interface > in Emacs Lisp as naturally as possible. For example, `describe-class' > can used to inspect the methods supported by a particular D-Bus object. > > dbus-proxy consists of the following components: > > + dbus-proxy.el > + public programming interface > + interface analysis > + proxy superclasses > + code generation > + unit tests > + dbus-introspection.el > + accessors for D-Bus introspection data > (similar to those in dbus.el) > + parsing of signature strings > + unit tests > > I am aware of the following problems with respect to the inclusion in > Emacs: > + Names: > + Generated class names tend to be long and ugly and do not follow > usual Lisp conventions > + `connect' and `disconnect' may need a `dbus-proxy-' prefix? > + The generated class hierarchies only work with the :c3 method > resolution order which was added to EIEIO upstream a few months ago > but does not seem to have been merged yet > + The unit tests use ert which is also not currently included in Emacs > + The use of the cl library may or may not be acceptable > > I have signed the copyright assignment for Emacs. > > What do you think? I have used Jan:s dbus-proxy while working on Inkscape-Emacs integration. Dbus-proxy has been very useful, so I would very much like for dbus-proxy to be included. Maybe in the new official GNU ELPA repos? > Kind regards, > Jan > > > > -- Joakim Verona