7 #include <Quotient/e2ee/e2ee_common.h>
8 #include <Quotient/e2ee/qolmmessage.h>
21 QByteArray pickle(
const PicklingKey& key)
const;
24 static QOlmExpected<QOlmSession> unpickle(QByteArray&& pickled,
25 const PicklingKey& key);
28 QOlmMessage encrypt(
const QByteArray& plaintext)
const;
33 QOlmExpected<QByteArray> decrypt(
const QOlmMessage &message)
const;
36 QByteArray sessionId()
const;
39 bool hasReceivedMessage()
const;
42 bool matchesInboundSession(
const QOlmMessage& preKeyMessage)
const;
45 bool matchesInboundSessionFrom(QByteArray theirIdentityKey,
46 const QOlmMessage& preKeyMessage)
const;
48 friend bool operator<(
const QOlmSession& lhs,
const QOlmSession& rhs)
50 return lhs.sessionId() < rhs.sessionId();
53 OlmErrorCode lastErrorCode()
const;
54 const char* lastError()
const;
58 CStructPtr<OlmSession> olmDataHolder;
59 OlmSession* olmData = olmDataHolder.get();
61 friend class QOlmAccount;