On Friday, 21 June 2013 12:17:38 CEST, Pali Rohár wrote:
So if addressbook plugin using client/server model (not only akonadi!), it can check if server is installed and enabled in isValid() method.
And hence my remark about the LDAP server. The current draft of the API is sufficient for checking whether Akonadi is available, but not whether a remote LDAP server can be reached. I'm not saying that this is wrong per se, I'm just pointing out what the current interface won't accomodate. BTW, I assume that there are also other failure modes of Akonadi (like a botched MySQL setup, I guess, etc) where the plugin returns "yes, Akonadi server will be available if started", but where it will fail at runtime. Anyway, this particular use case which you call "client/server model" IMHO applies only in these special cases where both cilent and server are on the same machine and when you can check whether the server is there in a negligible amount of time (otherwise you'd need an async interface to avoid UI lockups). This *might* work for Akonadi (except that I'm not sure how would you actually detect the server -- shipping a list of packages to check the local DB? Discovery of binaries in $PATH? Both are completely evil, and I have no idea how to do that in a different way), but I'm not sure whether this is worth the effort. Surely we can expect that if the plugin is available, the client libraries are there as well, and unless the packager botched something, the server will be available as well, and in the rare case it's not, we can resort to runtime errors. Cheers, Jan -- Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
