From 0c6233ab691973859b6d636e6d9fdddd2a6acd5e Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 22 Jul 2022 17:16:13 +0200 Subject: State + Exports: Implement should show renew button boolean --- wrappers/python/src/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wrappers/python/src/__init__.py') diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py index 1e42bb5..2c933ca 100644 --- a/wrappers/python/src/__init__.py +++ b/wrappers/python/src/__init__.py @@ -86,6 +86,7 @@ lib.SetConnected.argtypes, lib.SetConnected.restype = [c_char_p], c_void_p lib.SetConnecting.argtypes, lib.SetConnecting.restype = [c_char_p], c_void_p lib.SetDisconnected.argtypes, lib.SetDisconnected.restype = [c_char_p], c_void_p lib.SetSearchServer.argtypes, lib.SetSearchServer.restype = [c_char_p], c_void_p +lib.ShouldRenewButton.argtypes, lib.ShouldRenewButton.restype = [], int lib.FreeString.argtypes, lib.FreeString.restype = [c_void_p], None @@ -143,8 +144,11 @@ def get_data_error(data_error: DataError) -> Tuple[str, str]: error = get_error(data_error.error) return data, error +def get_bool(boolInt: c_int) -> bool: + return boolInt == 1 decode_map = { + c_int: get_bool, c_void_p: get_error, DataError: get_data_error, } -- cgit v1.2.3