diff options
Diffstat (limited to 'lib/olm/session.h')
-rw-r--r-- | lib/olm/session.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/olm/session.h b/lib/olm/session.h index 89f5d822..f9221dec 100644 --- a/lib/olm/session.h +++ b/lib/olm/session.h @@ -31,12 +31,17 @@ public: //! Deserialises from encrypted Base64 that was previously obtained by pickling a `QOlmSession`. static std::variant<std::unique_ptr<QOlmSession>, OlmError> unpickle(QByteArray &pickled, const PicklingMode &mode); //! Encrypts a plaintext message using the session. - std::variant<Message, OlmError> encrypt(const QString &plaintext); + Message encrypt(const QString &plaintext); // TODO: WiP //! Get a base64-encoded identifier for this session. QByteArray sessionId() const; + //! The type of the next message that will be returned from encryption. + Message::Type encryptMessageType(); + + bool hasReceivedMessage() const; + QOlmSession(OlmSession* session); private: //! Helper function for creating new sessions and handling errors. |