QXmppSendStanzaParams Class
| Header: | #include <QXmppSendStanzaParams.h> |
| Since: | QXmpp 1.5 |
Public Functions
| QXmppSendStanzaParams(const QXmppSendStanzaParams &other) | |
| QXmppSendStanzaParams(QXmppSendStanzaParams &&) | |
| std::optional<QXmpp::TrustLevels> | acceptedTrustLevels() const |
| QList<QString> | encryptionJids() const |
(since QXmpp 1.18) bool | isEncryptionRequired() const |
| void | setAcceptedTrustLevels(std::optional<QXmpp::TrustLevels> trustLevels) |
| void | setEncryptionJids(QList<QString> encryptionJids) |
(since QXmpp 1.18) void | setEncryptionRequired(bool required) |
| QXmppSendStanzaParams & | operator=(QXmppSendStanzaParams &&) |
| QXmppSendStanzaParams & | operator=(const QXmppSendStanzaParams &) |
Detailed Description
Contains additional parameters for sending stanzas.
Member Function Documentation
QXmppSendStanzaParams::QXmppSendStanzaParams(const QXmppSendStanzaParams &other)
Copy-constructor
QXmppSendStanzaParams::QXmppSendStanzaParams(QXmppSendStanzaParams &&)
Move-constructor
std::optional<QXmpp::TrustLevels> QXmppSendStanzaParams::acceptedTrustLevels() const
Returns the possible trust levels a key must have to be used for encryption (the trust levels of the keys used for encryption).
If no trust levels are set, the encryption manager uses an own default.
See also setAcceptedTrustLevels().
QList<QString> QXmppSendStanzaParams::encryptionJids() const
Returns the list of JIDs that the stanza should be encrypted for.
If this is empty, the stanza should be encrypted for the recipient. This option is useful for groupchats.
See also setEncryptionJids().
[since QXmpp 1.18] bool QXmppSendStanzaParams::isEncryptionRequired() const
Returns whether sending a message or IQ fails if it can not be end-to-end encrypted.
This function was introduced in QXmpp 1.18.
void QXmppSendStanzaParams::setAcceptedTrustLevels(std::optional<QXmpp::TrustLevels> trustLevels)
Sets the possible trustLevels a key must have to be used for encryption.
If no trust levels are set, the encryption manager uses an own default.
See also acceptedTrustLevels().
void QXmppSendStanzaParams::setEncryptionJids(QList<QString> encryptionJids)
Sets the list of JIDs that the stanza should be encrypted for.
If this is empty, the stanza should be encrypted for the recipient. This option is useful for groupchats.
encryptionJids.
See also encryptionJids().
[since QXmpp 1.18] void QXmppSendStanzaParams::setEncryptionRequired(bool required)
Sets whether sending a message or IQ fails if it can not be end-to-end encrypted.
If set, sending fails with QXmpp::SendError::EncryptionError if no encryption is selected by the QXmpp::Messages::SelectEncryption hook (or QXmpp::Iq::SelectEncryption for IQs), instead of sending the stanza unencrypted. Sensitive stanzas sent by QXmpp's managers (and via the deprecated QXmppClient::sendSensitive()) are still encrypted with the deprecated encryption extension (QXmppClient::setEncryptionExtension()) if no encryption is selected.
required.
This function was introduced in QXmpp 1.18.
See also isEncryptionRequired().
QXmppSendStanzaParams &QXmppSendStanzaParams::operator=(QXmppSendStanzaParams &&)
Move-assignment operator
QXmppSendStanzaParams &QXmppSendStanzaParams::operator=(const QXmppSendStanzaParams &)
Assignment operator