From 32ccc6358ba6433e6b870b238fba20ccf1862fe2 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Sat, 18 Jun 2022 12:41:31 +0200 Subject: Move SecurityPolicy, TrustLevel intro extra headers This avoids the need to include the whole TrustStorage in files like SendStanzaParams.h. --- src/client/QXmppTrustManager.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/client/QXmppTrustManager.cpp') diff --git a/src/client/QXmppTrustManager.cpp b/src/client/QXmppTrustManager.cpp index e198255c..7b9b34ab 100644 --- a/src/client/QXmppTrustManager.cpp +++ b/src/client/QXmppTrustManager.cpp @@ -5,7 +5,9 @@ #include "QXmppTrustManager.h" #include "QXmppFutureUtils_p.h" +#include "QXmppTrustStorage.h" +using namespace QXmpp; using namespace QXmpp::Private; /// @@ -38,7 +40,7 @@ QXmppTrustManager::~QXmppTrustManager() = default; /// \param encryption encryption protocol namespace /// \param securityPolicy security policy being applied /// -QFuture QXmppTrustManager::setSecurityPolicy(const QString &encryption, QXmppTrustStorage::SecurityPolicy securityPolicy) +QFuture QXmppTrustManager::setSecurityPolicy(const QString &encryption, TrustSecurityPolicy securityPolicy) { return m_trustStorage->setSecurityPolicy(encryption, securityPolicy); } @@ -60,7 +62,7 @@ QFuture QXmppTrustManager::resetSecurityPolicy(const QString &encryption) /// /// \return the set security policy /// -QFuture QXmppTrustManager::securityPolicy(const QString &encryption) +QFuture QXmppTrustManager::securityPolicy(const QString &encryption) { return m_trustStorage->securityPolicy(encryption); } @@ -109,7 +111,7 @@ QFuture QXmppTrustManager::ownKey(const QString &encryption) /// \param keyIds IDs of the keys /// \param trustLevel trust level of the keys /// -QFuture QXmppTrustManager::addKeys(const QString &encryption, const QString &keyOwnerJid, const QList &keyIds, QXmppTrustStorage::TrustLevel trustLevel) +QFuture QXmppTrustManager::addKeys(const QString &encryption, const QString &keyOwnerJid, const QList &keyIds, TrustLevel trustLevel) { return m_trustStorage->addKeys(encryption, keyOwnerJid, keyIds, trustLevel); } @@ -157,7 +159,7 @@ QFuture QXmppTrustManager::removeKeys(const QString &encryption) /// /// \return the key owner JIDs mapped to their keys with specific trust levels /// -QFuture>> QXmppTrustManager::keys(const QString &encryption, QXmppTrustStorage::TrustLevels trustLevels) +QFuture>> QXmppTrustManager::keys(const QString &encryption, QXmpp::TrustLevels trustLevels) { return m_trustStorage->keys(encryption, trustLevels); } @@ -175,7 +177,7 @@ QFuture>> Q /// /// \return the key IDs mapped to their trust levels for specific key owners /// -QFuture>> QXmppTrustManager::keys(const QString &encryption, const QList &keyOwnerJids, QXmppTrustStorage::TrustLevels trustLevels) +QFuture>> QXmppTrustManager::keys(const QString &encryption, const QList &keyOwnerJids, QXmpp::TrustLevels trustLevels) { return m_trustStorage->keys(encryption, keyOwnerJids, trustLevels); } @@ -190,7 +192,7 @@ QFuture>> QXmppT /// /// \return whether a key of the key owner with a passed trust level is stored /// -QFuture QXmppTrustManager::hasKey(const QString &encryption, const QString &keyOwnerJid, QXmppTrustStorage::TrustLevels trustLevels) +QFuture QXmppTrustManager::hasKey(const QString &encryption, const QString &keyOwnerJid, TrustLevels trustLevels) { return m_trustStorage->hasKey(encryption, keyOwnerJid, trustLevels); } @@ -204,7 +206,7 @@ QFuture QXmppTrustManager::hasKey(const QString &encryption, const QString /// \param keyIds key owners' bare JIDs mapped to the IDs of their keys /// \param trustLevel trust level being set /// -QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const QMultiHash &keyIds, QXmppTrustStorage::TrustLevel trustLevel) +QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const QMultiHash &keyIds, TrustLevel trustLevel) { QFutureInterface interface(QFutureInterfaceBase::Started); @@ -225,7 +227,7 @@ QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const /// \param oldTrustLevel trust level being changed /// \param newTrustLevel trust level being set /// -QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const QList &keyOwnerJids, QXmppTrustStorage::TrustLevel oldTrustLevel, QXmppTrustStorage::TrustLevel newTrustLevel) +QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const QList &keyOwnerJids, TrustLevel oldTrustLevel, TrustLevel newTrustLevel) { QFutureInterface interface(QFutureInterfaceBase::Started); @@ -249,7 +251,7 @@ QFuture QXmppTrustManager::setTrustLevel(const QString &encryption, const /// /// \return the key's trust level /// -QFuture QXmppTrustManager::trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId) +QFuture QXmppTrustManager::trustLevel(const QString &encryption, const QString &keyOwnerJid, const QByteArray &keyId) { return m_trustStorage->trustLevel(encryption, keyOwnerJid, keyId); } -- cgit v1.2.3