D-BUS interfaces and whatnot (Re: KDE/kdebase/konqueror/settings/performance)
Lubos Lunak
l.lunak at suse.cz
Wed Jun 7 15:57:39 BST 2006
On Tuesday 06 June 2006 15:33, Laurent Montel wrote:
> SVN commit 548739 by mlaurent:
>
> Port to new kdelibs api
>
> --- trunk/KDE/kdebase/konqueror/settings/performance/konqueror.cpp
...
> - DCOPRef ref2( "kded", "konqy_preloader" );
> - ref2.send( "reconfigure()" );
> + QDBusInterfacePtr kded("org.kde.kded", "/Konqy_preloader",
> "org.kde.kded.Konqy_proxy");
> + kded->call( "reconfigure" );
from other commit:
> - QByteArray data;
> - QDataStream arg(&data, QIODevice::WriteOnly);
> - arg << (int)confirm << (int)sdtype << (int)sdmode;
> - return
> kapp->dcopClient()->send( "ksmserver", "ksmserver", "logout(int,int,int)",
> data );
> + QDBusInterfacePtr ksmserver( "org.kde.ksmserver",
> "/Ksmserver", "org.kde.ksmserver.ksmserver" )
> + QDBusReply<void> reply = ksmserver->call( "logout", (int)confirm,
> (int)sdtype, (int)sdmode );
> + return reply.isSuccess();
Could the HOWTO be a bit more detailed guidelines (or rather, have a more
prominent place) about this D-BUS stuff like interfaces, object paths and
whatnot? Currently I can only find in the section about DCOPRef that appid ->
service name, i.e. the first thing for QDBusInterfacePtr, name passed to
DCOPObject -> object path, i.e. the second thing to QDBusInterfacePtr and the
third thing is "dcop appid name interfaces()".
According to that, both these are wrong: Konq_proxy is not anywhere else in
kdebase, org.kde.ksmserver.ksmserver probably neither, and besides it's so
awfully ugly.
One more thing: With dcop it had to be "dcop kded Konqy_preloader", because
it was in kded, and registering once more led to having all objects available
in both DCOP appid's. Is it the same with D-BUS, or is there some way no to
have that kded in there (because I don't really care where it is and it
prevents it from moving, just like having to mention kdesktop in "dcop
kdesktop KBackgroundIface" is annoying)?
PS: I'd also appreciate if somebody could point me to some doc explaining what
the three arguments to QDBusInterfacePtr actually are. I'm afraid I still
don't quite get it even after reading the FAQ entry. Especially what the
interface is actually supposed to be good for is completely beyond me.
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the kde-core-devel
mailing list