Summary: | KWallet's readMap is not friendly to non-C++ applications | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Darin McBride <Tanktalus> |
Component: | kwallet | Assignee: | Michael Leupold <lemma> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | cberzan, zeke |
Priority: | NOR | ||
Version: | 4.5 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Darin McBride
2010-11-05 16:18:58 UTC
Isn't it the responsibility of your "bindings" to convert the data? Even qdbusviewer is not able to convert the data because it is being returned as an array of bytes. Checking the introspection in qdbusviewer, I get (part of the result): <method name="readMap"> <arg direction="out" type="ay"/> Looking in dbus-protocol.h, I see "a" is for array, and "y" is for "byte". It's not returning a "QMap<QString,QString>", thus the general DBus binding cannot know how to convert the data back into normal data structures. Looking at dbus-protocol.h a bit further, I see a "dict" type - perhaps that's closer to the meaning of KWallet's map, and maybe that should be the return of readMap over DBus, instead of new APIs? (Though I don't know if the Perl bindings support dict yet.) Just to add to this, I noticed that there is a dict type used for readMapList, which, again, has an odd return type: instead of being a dict of a dict, it, again, just seems to store the QMap<QString,QString> object as a QByteArray, which means again that I would need a binding that was particular to KWallet instead of generic to DBus in order to handle this. Basically, the output in qdbusviewer also does not show the actual mapping, it merely shows the numeric representation of each byte (e.g., "{0, 0, 0, 3, 0, 0, 0, 8, ..."). Yep, it would be really nice if readMap would return a DBus dict rather than a binary array. |