QXmpp::E2ee::Providers Class

class QXmpp::E2ee::Providers
Header: #include <QXmppE2eeProvider.h>
Since: QXmpp 1.18

Public Functions

void add(QXmpp::E2ee::Provider provider) const
std::optional<QXmpp::E2ee::Provider> find(QStringView encryption) const

Detailed Description

Registry of the end-to-end encryption providers of a client, one per encryption.

It is a view on the hooks of the client (see QXmpp::Hooks): extensions add their providers via QXmpp::E2ee::Providers(hooks()).add(), also in their constructor. A provider is removed when its owner is destroyed or, for extensions, removed from the client.

Member Function Documentation

void Providers::add(QXmpp::E2ee::Provider provider) const

Adds provider. If another provider for the same encryption exists, the one added first is used and a warning is logged.

std::optional<QXmpp::E2ee::Provider> Providers::find(QStringView encryption) const

Returns the provider for the encryption with the namespace encryption.