diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:16:13 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:16:13 +0200 |
| commit | 0c6233ab691973859b6d636e6d9fdddd2a6acd5e (patch) | |
| tree | c11697eb3b00ff1d6a073a5f3c6de3337cf5e463 /wrappers/python/src/__init__.py | |
| parent | 80218da58eca9c95870770f88e477891e8fdb50a (diff) | |
State + Exports: Implement should show renew button boolean
Diffstat (limited to 'wrappers/python/src/__init__.py')
| -rw-r--r-- | wrappers/python/src/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
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, } |
