diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-04-04 12:51:32 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-05-18 21:47:11 +0200 |
| commit | 9073ea57506e4081881355a508a29ea5325b9e8b (patch) | |
| tree | eb62c5ec7bdec36e80581883db8472ab86050d4f /src/client/QXmppClientExtension.h | |
| parent | 402bb6f33610f7aba9d8295d8c08be2e64324a5d (diff) | |
| download | qxmpp-9073ea57506e4081881355a508a29ea5325b9e8b.tar.gz | |
ClientExtension: Add handleStanza() overload with e2ee metdata
For handling end-to-end-encrypted stanzas it is important to know
whether and which encryption was used. This is especially important for
replying to IQ stanzas (with the correct encryption).
Currently the e2eeMetadata parameter is unused (always nullopt). This is
going to change in the following commits.
Diffstat (limited to 'src/client/QXmppClientExtension.h')
| -rw-r--r-- | src/client/QXmppClientExtension.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/QXmppClientExtension.h b/src/client/QXmppClientExtension.h index 355f12b3..0cf81fc3 100644 --- a/src/client/QXmppClientExtension.h +++ b/src/client/QXmppClientExtension.h @@ -14,6 +14,7 @@ class QXmppClient; class QXmppClientExtensionPrivate; class QXmppStream; +/// /// \brief The QXmppClientExtension class is the base class for QXmppClient /// extensions. /// @@ -23,7 +24,7 @@ class QXmppStream; /// client instance using QXmppClient::addExtension(). /// /// \ingroup Core - +/// class QXMPP_EXPORT QXmppClientExtension : public QXmppLoggable { Q_OBJECT @@ -35,13 +36,8 @@ public: virtual QStringList discoveryFeatures() const; virtual QList<QXmppDiscoveryIq::Identity> discoveryIdentities() const; - /// \brief You need to implement this method to process incoming XMPP - /// stanzas. - /// - /// You should return true if the stanza was handled and no further - /// processing should occur, or false to let other extensions process - /// the stanza. - virtual bool handleStanza(const QDomElement &stanza) = 0; + virtual bool handleStanza(const QDomElement &stanza); + virtual bool handleStanza(const QDomElement &stanza, const std::optional<QXmppE2eeMetadata> &e2eeMetadata); protected: QXmppClient *client(); |
