From: Michael Albinus <michael.albinus@gmx.de>
To: Daiki Ueno <ueno@gnu.org>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: on-the-fly D-Bus proxy creation
Date: Tue, 24 Feb 2015 09:52:52 +0100 [thread overview]
Message-ID: <87oaojr8rf.fsf@gmx.de> (raw)
In-Reply-To: <m3pp8zivjl.fsf-ueno@gnu.org> (Daiki Ueno's message of "Tue, 24 Feb 2015 17:05:34 +0900")
Daiki Ueno <ueno@gnu.org> writes:
> Hello,
Hi,
> One can call a D-Bus method as a normal method of CaribouDaemonProxy.
> This is really handy and I wished to have similar feature in Elisp
> (though I haven't ever written any practical D-Bus code in Elisp).
>
> Thanks to cl-generic, I gave it a try. With the attached code (far from
> complete though), a client can be implemented as:
>
> (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,
>
> Daiki Ueno
Best regards, Michael.
next prev parent reply other threads:[~2015-02-24 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 8:05 on-the-fly D-Bus proxy creation Daiki Ueno
2015-02-24 8:52 ` Michael Albinus [this message]
2015-02-24 9:21 ` Daiki Ueno
2015-02-24 9:47 ` Michael Albinus
2015-02-24 11:02 ` Daiki Ueno
2015-02-24 15:13 ` joakim
2015-02-25 8:23 ` [PATCH] Support automatic D-Bus proxy generation Daiki Ueno
2015-02-25 17:18 ` joakim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oaojr8rf.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
--cc=ueno@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.