Akonadi DBus Interface Contacts
Klaas Freitag
freitag at kde.org
Fri Mar 18 20:36:25 GMT 2022
Hi,
in Kraft [1], I have a nice connector to Akonadi to read contacts, that
works basically like this (example):
--
Akonadi::ContactSearchJob *csjob = new Akonadi::ContactSearchJob(
this );
csjob->setLimit( 1 );
csjob->setQuery(ContactSearchJob::ContactUid , uid,
ContactSearchJob::ExactMatch);
csjob->setProperty("UID", uid);
connect( csjob, SIGNAL( result( KJob* ) ), this, SLOT(
searchResult( KJob* ) ) );
csjob->start();
...
--
That works nicely and users (and myself) are happy.
But with an AppImage of Kraft, this connection does not work any more
because of the bin dependency into the host system. AppImage builds have
a hard time to connect to the host Akonadi. That is an unfortunate downside.
To solve that, I was wondering if a connection via DBus would help. If
Kraft could
1. query single contacts by the Uid, and
2. get a list of all contacts (with limited set of attributes) of a
resource to build a model for a selection widget
from Akonadi Contacts via DBus, that would solve the problem in the
AppImage.
Is that assumption right? Is Akonadi offering such a DBus interface?
If so, is there any example code somewhere?
Thanks for enlighten me,
Klaas
[1] https://volle-kraft-voraus.de
More information about the kde-pim
mailing list