diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-09-13 16:39:43 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-09-13 17:02:36 +0100 |
commit | 6971f54feac2464b53f2b5db8466d75075e0dc9e (patch) | |
tree | 88d935f4dc79307cc109657a087979dcc598cc8b /python | |
parent | e0b51971b7bc4cf3bb56b080f5f54296b58b3f0c (diff) |
Add a olm_inbound_group_session_id method
Diffstat (limited to 'python')
-rw-r--r-- | python/olm/inbound_group_session.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/olm/inbound_group_session.py b/python/olm/inbound_group_session.py index 6c01095..310620f 100644 --- a/python/olm/inbound_group_session.py +++ b/python/olm/inbound_group_session.py @@ -45,6 +45,9 @@ inbound_group_session_function( c_void_p, c_size_t, # plaintext ) +inbound_group_session_function(lib.olm_inbound_group_session_id_length) +inbound_group_session_function(lib.olm_inbound_group_session_id, c_void_p, c_size_t) + class InboundGroupSession(object): def __init__(self): self.buf = create_string_buffer(lib.olm_inbound_group_session_size()) @@ -84,3 +87,9 @@ class InboundGroupSession(object): plaintext_buffer, max_plaintext_length ) return plaintext_buffer.raw[:plaintext_length] + + def session_id(self): + id_length = lib.olm_inbound_group_session_id_length(self.ptr) + id_buffer = create_string_buffer(id_length) + lib.olm_inbound_group_session_id(self.ptr, id_buffer, id_length); + return id_buffer.raw |