diff options
Diffstat (limited to 'include/olm')
-rw-r--r-- | include/olm/olm.h | 6 | ||||
-rw-r--r-- | include/olm/session.hh | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/olm/olm.h b/include/olm/olm.h index 61ea07b..6a2b3fb 100644 --- a/include/olm/olm.h +++ b/include/olm/olm.h @@ -318,6 +318,12 @@ int olm_session_has_received_message( OlmSession *session ); +/** + * Write a null-terminated string describing the internal state of an olm + * session to the buffer provided for debugging and logging purposes. + */ +void olm_session_describe(OlmSession * session, char *buf, size_t buflen); + /** Checks if the PRE_KEY message is for this in-bound session. This can happen * if multiple messages are sent to this account before this account sends a * message in reply. The one_time_key_message buffer is destroyed. Returns 1 if diff --git a/include/olm/session.hh b/include/olm/session.hh index 9d44816..ce05fc8 100644 --- a/include/olm/session.hh +++ b/include/olm/session.hh @@ -131,6 +131,14 @@ struct Session { std::uint8_t const * message, std::size_t message_length, std::uint8_t * plaintext, std::size_t max_plaintext_length ); + + /** + * Write a string describing this session and its state (not including the + * private key) into the buffer provided. + * + * Takes a buffer to write to and the length of that buffer + */ + void describe(char *buf, size_t buflen); }; |