Add C API
authorRauli Ikonen <rauli.ikonen@nixuopen.org>
Thu, 10 Feb 2011 06:57:43 +0000 (08:57 +0200)
committerAlberto Mardegan <alberto.mardegan@nokia.com>
Wed, 4 May 2011 05:57:25 +0000 (08:57 +0300)
commitc714ec8613f9ca051fa558a7d189e36ca0b60683
tree0b01a7577f979cb741dff6ac0983f59c2c72a8c5
parent3fd0e998558f589f5fb4d2cdc2deefb0ac583203
Add C API

Note: This commit is in the harmattan branch only, because we don't really want
to do this in libsignoncrypto-qt; it should be the other way round, with
libsignoncrypto-glib providing the encryption/decryption functionality for glib
clients, and libsignoncrypto-qt should be wrapping it.

libsignoncrypto-qt now exports C compatible functions for encrypting/decrypting
GHashTable* and gchar*. These functions internally convert the received items
to Qt format (GHashTable*->QVariantMap, gchar*->QString), perform
encryption/decryption using the normal Qt code, and then convert the results
back to Glib objects. This allows making signon-glib use serialization format
that is compatible with the Qt version so that signond does not need to care
about the type of the client application.
Tests for the Glib compatible encrypt/decrypt functions were also added.

Required for fixing https://bugs.meego.com/show_bug.cgi?id=12431
lib/SignOnCrypto/SignOnCrypto.pro
lib/SignOnCrypto/encryptor-glib.cpp [new file with mode: 0644]
lib/SignOnCrypto/encryptor-glib.h [new file with mode: 0644]
lib/tests/test.cpp
lib/tests/test.h
lib/tests/tests.pro