[Kde-pim] kmail, dbus, KToolInvocation

Thomas McGuire thomas.mcguire at gmx.net
Thu Dec 20 20:20:29 GMT 2007


Hi!

Sorry for the late answer.

On Wednesday 03 October 2007, Dag Andersen wrote:
> Hi, I'm looking at kplato - kdepim integration, trying to send a mail from
> kplato with kmail. I used the komailclient.h/-.cpp as example but it
> doesn't work.
I don't know komailclient, it is not in KDEPIM, is it?

> AFAICS there are two problems in komailclient:
> 1) The dbus interface is called "org.kde.kmail.KMail" in the program,
> but "org.kde.kmail.kmail" (lower case) in the xml file.
org.kde.kmail.kmail is the interface. org.kde.kmail is the service when
KMail is running, and KMail registers itself as "KMail" on org.kde.kmail, and
implements the org.kde.kmail.kmail interface. I suggest using
qdbusviewer to get a clearer overview.

> 2) There is only one openComposer method defined in the xml file with 6
> input arguments, the program calls with either 7 or 15 arguments.
I've fixed this in trunk today, now there are three openComposer calls, with
6, 9 and 15 arguments. The XML file (org.kde.kmail.kmail.xml) is installed 
when KMail is installed. I think the best way to use the D-Bus interface is 
to auto-generate an interface from this XML file using CMake. See 
kdepim/kmail/dbustest for an example (openComposer is used there).

> Using KToolInvocation instead opens the composer allright, but doesn't fill
> the "to" field. If I try to start kmail from the console with:
> kmail --composer mailto:a at b
> it works, but adding a "mailto" in my program doesn't work.
>
> Anyone who can help with this?
If you have further questions, just ask. I know now enough about the D-Bus 
stuff that I might be able to give an answer.

Regards,
Thomas


_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list