diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-05-08 16:20:00 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | b7f86c83fffc221e654048e6e55c3f130c9fd308 (patch) | |
| tree | 89c629982651bff51e50b8bd26fda1580dd2b87d /wrappers/python/eduvpn_common/loader.py | |
| parent | bf2cef5150b630b2964b9025d3a63c34803a4db1 (diff) | |
Client: Use a mutex for state transitions
Diffstat (limited to 'wrappers/python/eduvpn_common/loader.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/loader.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/wrappers/python/eduvpn_common/loader.py b/wrappers/python/eduvpn_common/loader.py index afad569..75a6a0a 100644 --- a/wrappers/python/eduvpn_common/loader.py +++ b/wrappers/python/eduvpn_common/loader.py @@ -4,7 +4,14 @@ from collections import defaultdict from ctypes import CDLL, c_char_p, c_int, c_void_p, cdll from eduvpn_common import __version__ -from eduvpn_common.types import BoolError, DataError, ReadRxBytes, TokenGetter, TokenSetter, VPNStateChange +from eduvpn_common.types import ( + BoolError, + DataError, + ReadRxBytes, + TokenGetter, + TokenSetter, + VPNStateChange, +) def load_lib() -> CDLL: @@ -88,7 +95,10 @@ def initialize_functions(lib: CDLL) -> None: c_int, ], c_void_p lib.RenewSession.argtypes, lib.RenewSession.restype = [c_int], c_void_p - lib.SetTokenHandler.argtypes, lib.SetTokenHandler.restype = [TokenGetter, TokenSetter], c_void_p + lib.SetTokenHandler.argtypes, lib.SetTokenHandler.restype = [ + TokenGetter, + TokenSetter, + ], c_void_p lib.Cleanup.argtypes, lib.Cleanup.restype = [c_int], c_void_p lib.SetProfileID.argtypes, lib.SetProfileID.restype = [c_char_p], c_void_p lib.CookieNew.argtypes, lib.CookieNew.restype = [], c_int @@ -105,6 +115,9 @@ def initialize_functions(lib: CDLL) -> None: lib.SetState.argtypes, lib.SetState.restype = [ c_int, ], c_void_p + lib.InState.argtypes, lib.InState.restype = [ + c_int, + ], BoolError lib.StartFailover.argtypes, lib.StartFailover.restype = [ c_int, c_char_p, |
