diff options
Diffstat (limited to 'wrappers/python')
| -rw-r--r-- | wrappers/python/src/__init__.py | 4 | ||||
| -rw-r--r-- | wrappers/python/src/main.py | 3 |
2 files changed, 7 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, } diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py index 784e622..a2a0d14 100644 --- a/wrappers/python/src/main.py +++ b/wrappers/python/src/main.py @@ -206,3 +206,6 @@ class EduVPN(object): if location_err: raise Exception(location_err) + + def should_renew_button(self) -> bool: + return self.go_function(lib.ShouldRenewButton) |
