From 6971f54feac2464b53f2b5db8466d75075e0dc9e Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 13 Sep 2016 16:39:43 +0100 Subject: Add a olm_inbound_group_session_id method --- python/olm/inbound_group_session.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python/olm/inbound_group_session.py') 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 -- cgit v1.2.3