emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: on-the-fly D-Bus proxy creation


From: Daiki Ueno
Subject: Re: on-the-fly D-Bus proxy creation
Date: Tue, 24 Feb 2015 18:21:57 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Michael Albinus <address@hidden> writes:

(First of all, I am very sorry for making a mistake in the Cc list.)

>>   (dbus-define-proxy search-provider "\
>>   <node>
>>     <interface name=\"org.gnome.Shell.SearchProvider2\">
>>       <method name=\"GetInitialResultSet\">
>>         <arg type=\"as\" name=\"terms\" direction=\"in\" />
>>         <arg type=\"as\" name=\"results\" direction=\"out\" />
>>       </method>
>>       <!-- actually, there are more methods in this interface -->
>>     </interface>
>>   </node>")
>>
>> Then you can create a client and call D-Bus methods:
>>
>>   (setq search-provider
>>         (search-provider-make :session
>>                               "org.gnome.Weather.BackgroundService"
>>                               "/org/gnome/Weather/BackgroundService"))
>>   (search-provider-call-GetInitialResultSet search-provider '("tokyo"))
>>
>> If this seems to be useful, I can finish it off as a patch.
>
> There was some related work, see
> <http://thread.gmane.org/gmane.emacs.devel/128998>.
> I don't know the status, 'tho.

Thanks for the information.  I'll try to contact the author (Cc'ed
anyway).

The main differences of mine from that one are:

- 'dbus-define-proxy' is a macro instead of a function.  So, XML parsing
  and code generation happen at byte-compile time.

- it doesn't rely on introspection, but takes an interface definition in
  XML.  I think that's what other languages do these days.

Regards,
--
Daiki Ueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]