Feature req for GPGME
Marcus Brinkmann
Marcus.Brinkmann at ruhr-uni-bochum.de
Thu Sep 26 14:58:01 CEST 2002
On Wed, Sep 25, 2002 at 06:55:32PM -0500, Robert J. Hansen wrote:
> This led me to wonder about the feasability of adding an operation to
> GPGME, something like:
>
> GpgmeErr
> gpgme_get_key_struct(GpgmeKey key, GpgmeKeyStruct &kstruct)
>
> Any given keystruct would be populated with the data associated with the
> key--everything shy of the GpgmeKey itself.
The reason why we don't have such an interface is that it is not extensible:
If you change the structure, you break binary compatibility. It's very
simple to write a small wrapper that reads out the needed attributes and
puts them in a struct, and you can adopt that to your own needs.
> It would seem that just having a single function call to get all the
> relevant data about a key would be a useful addition to GPGME. I know
> we have get_as_xml(), but then you have to have some additional function
> overhead to turn the XML representation into a representation directly
> usable to a C programmer.
Well, yes. Or just call the get attribute functions, which gives you the
function call overhead. Neither is nice, but breaking binary compatibility
is not nice either ;)
> Otherwise, I'll just go back to lurking on the list.
It's tempting to say yes just to prevent that ;)
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus at gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/
More information about the Gnupg-devel
mailing list