QXmppAtmManager Class
The QXmppAtmManager class represents a manager for XEP-0450: Automatic Trust Management (ATM). More...
| Header: | #include <QXmppAtmManager> |
| Since: | QXmpp 1.5 |
| Inherits: | QXmppTrustManager |
- List of all members, including inherited members
- QXmppAtmManager is part of Managers.
Public Functions
| QXmppAtmManager(QXmppAtmTrustStorage *trustStorage) | |
| QXmppTask<void> | makeTrustDecisions(QString encryption, QString keyOwnerJid, QList<QByteArray> keyIdsForAuthentication, QList<QByteArray> keyIdsForDistrusting = {}) |
Detailed Description
For interacting with the storage, a corresponding implementation of the storage interface must be added. That implementation has to be adapted to your storage such as a database. In case you only need memory and no peristent storage, you can use the existing implementation and add the storage with it:
QXmppAtmTrustStorage *trustStorage = new QXmppAtmTrustMemoryStorage; QXmppAtmManager *manager = new QXmppAtmManager(trustStorage); client->addExtension(manager);
It is strongly recommended to enable XEP-0280: Message Carbons with
client->addNewExtension<QXmppCarbonManagerV2>();
and XEP-0313: Message Archive Management with
QXmppMamManager *mamManager = new QXmppMamManager; client->addExtension(mamManager);
for delivering trust messages to all online and offline endpoints.
In addition, archiving via MAM must be enabled on the server.
Member Function Documentation
QXmppAtmManager::QXmppAtmManager(QXmppAtmTrustStorage *trustStorage)
Constructs an ATM manager with the given trustStorage trust storage implementation.
QXmppTask<void> QXmppAtmManager::makeTrustDecisions(QString encryption, QString keyOwnerJid, QList<QByteArray> keyIdsForAuthentication, QList<QByteArray> keyIdsForDistrusting = {})
Authenticates or distrusts keys manually (e.g., by the Trust Message URI of a scanned QR code or after entering key IDs by hand) and sends corresponding trust messages.
encryption is the encryption protocol namespace. keyOwnerJid is the JID of the key owner. keyIdsForAuthentication contains the IDs of the keys being authenticated and keyIdsForDistrusting contains the IDs of the keys being distrusted.