The client should be able to do post-processing on outgoing packets. It is currently not possible with encrypted packets from E2eeExtensions because they return QByteArray.
This is because the type in QFutures must be copy-constructible and so we can't use a std::unique_ptr<QXmppStanza> to cover all classes inherited from QXmppStanza.
Solution:
Use an extra stanza holder class (using some kind of smart pointer internally)
or: wait for #502, it should allow move-only types (and so either QXmpStanza && or std::unique_ptr<QXmppStanza>)
[x] returns encrypted stanzas via unique_ptr<Message/Iq> instead of QByteArray
The client should be able to do post-processing on outgoing packets. It is currently not possible with encrypted packets from E2eeExtensions because they return QByteArray. This is because the type in QFutures must be copy-constructible and so we can't use a
std::unique_ptr<QXmppStanza>
to cover all classes inherited from QXmppStanza.Solution:
QXmpStanza &&
orstd::unique_ptr<QXmppStanza>
)use unique_ptr as parameter (not possible)