KDE/kdelibs
David Faure
faure at kde.org
Tue Jul 4 19:11:11 BST 2006
On Tuesday 04 July 2006 19:47, Will Stephenson wrote:
> On Tuesday 04 July 2006 14:50, David Faure wrote:
> > You need hand editing when you need to have the QDBusMessage argument at
> > the end of your dbus method/slot (e.g. to call service(), which is the
> > sender service, or to use dbus transactions like in klauncher or
> > kcookiejar, basically to delay the answer).
>
> Where can I find examples of establishing the sender and transactions? I'm
> trying to collect some notes of dbus state of the art techniques.
KLauncher is full of transactions, but a better (simpler) example might be kcookiejar.
KCookieServer::findCookies uses "msg.setDelayedReply(true)", returns an empty
string, queues the request, and later on (KCookieServer::checkCookies), it sends
the reply to that call.
This example shows the sender stuff too (see how QDBusMessage was added
to the findCookies method in both the adaptor and the kcookieserver class)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list