Wallet API documentation different from what it actually does

Michael Leupold lemma at confuego.org
Wed Nov 12 23:43:08 GMT 2008


Hi,

I'm currently looking into a small issue with the wallet API I'm not quite 
sure how to fix. Wallet has several functions like readEntry, readPassword, 
readMap and so on. The API docs for all of them state:
"Returns 0 on success, non-zero on error" (or similar)

Now, this is wrong. The DBus (and formerly DCOP) API was never designed to 
return anything but a 0 in case the key queried isn't there. This is a known 
bug and the current suggestion is to use "hasEntry" prior to reading it.

Still I'd like to get this fixed but I'm unsure about which path to take and 
would like your opinion:
1) Easy: Adapt the API documentation and suggest to use hasEntry()
2) Medium: Insert a hasEntry() call in all of the read* client functions and 
make the methods do what the doc says.
3) Proper: Add additional readPasswordNew DBus calls and make the current API 
use those to perform what's advertised.

2) has the drawback of making the apps issue 3 DBus calls in case they already 
use the hasEntry() workaround. 3) has the drawback of cluttering the DBus 
interface with 6 extra methods.

What do you think?

Regards,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081113/ebd5e08b/attachment.sig>


More information about the kde-core-devel mailing list