diff --git a/TODO b/TODO index 83a183b3..329afbd0 100644 --- a/TODO +++ b/TODO @@ -19,7 +19,6 @@ give all classes non-default ctors/dtors/copy/op=, and dpointers? * finish API: - ability to set arbitrary properties in a provider (string+variant pairs?) finish qcaprovider.h * build system: @@ -30,6 +29,7 @@ create qt4 qmake .prf for auto-discovery by applications * finish code for APIs: + core: properties cert: rfc 2818 hostname validation keystore tls diff --git a/include/QtCrypto/qca_core.h b/include/QtCrypto/qca_core.h index 453ca600..83d25d07 100644 --- a/include/QtCrypto/qca_core.h +++ b/include/QtCrypto/qca_core.h @@ -313,6 +313,16 @@ namespace QCA */ QCA_EXPORT void unloadAllPlugins(); + /** + * Set a global property + */ + QCA_EXPORT void setProperty(const QString &name, const QVariant &value); + + /** + * Retrieve a global property + */ + QCA_EXPORT QVariant getProperty(const QString &name); + /** * Return the Random provider that is currently set to be the * global random number generator. diff --git a/src/qca_core.cpp b/src/qca_core.cpp index adc1f8e2..641adde1 100644 --- a/src/qca_core.cpp +++ b/src/qca_core.cpp @@ -268,6 +268,22 @@ void unloadAllPlugins() global->manager.unloadAll(); } +void setProperty(const QString &name, const QVariant &value) +{ + QMutexLocker lock(&global->manager_mutex); + + Q_UNUSED(name); + Q_UNUSED(value); +} + +QVariant getProperty(const QString &name) +{ + QMutexLocker lock(&global->manager_mutex); + + Q_UNUSED(name); + return QVariant(); +} + Random & globalRNG() { if(!global->rng)