aboutsummaryrefslogtreecommitdiff
path: root/python/olm/inbound_group_session.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-09-13 16:39:43 +0100
committerMark Haines <mjark@negativecurvature.net>2016-09-13 17:02:36 +0100
commit6971f54feac2464b53f2b5db8466d75075e0dc9e (patch)
tree88d935f4dc79307cc109657a087979dcc598cc8b /python/olm/inbound_group_session.py
parente0b51971b7bc4cf3bb56b080f5f54296b58b3f0c (diff)
Add a olm_inbound_group_session_id method
Diffstat (limited to 'python/olm/inbound_group_session.py')
-rw-r--r--python/olm/inbound_group_session.py9
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