diff options
Diffstat (limited to 'wrappers/python')
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py | 8 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/types.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/wrappers/python/eduvpn_common/main.py b/wrappers/python/eduvpn_common/main.py index 2c5165f..798c9a4 100644 --- a/wrappers/python/eduvpn_common/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -344,23 +344,23 @@ global_object: Optional[EduVPN] = None @TokenSetter -def token_setter(server: ctypes.c_char_p, tokens: ctypes.c_char_p): +def token_setter(server_id: ctypes.c_char_p, server_type: ctypes.c_int, tokens: ctypes.c_char_p): global global_object if global_object is None: return if global_object.token_setter is None: return 0 - global_object.token_setter(server.decode(), tokens.decode()) + global_object.token_setter(server_id.decode(), server_type, tokens.decode()) @TokenGetter -def token_getter(server: ctypes.c_char_p, buf: ctypes.c_char_p, size: ctypes.c_size_t): +def token_getter(server_id: ctypes.c_char_p, server_type: ctypes.c_int, buf: ctypes.c_char_p, size: ctypes.c_size_t): global global_object if global_object is None: return if global_object.token_getter is None: return - got = global_object.token_getter(server.decode()) + got = global_object.token_getter(server_id.decode(), server_type) if got is None: return diff --git a/wrappers/python/eduvpn_common/types.py b/wrappers/python/eduvpn_common/types.py index f1be42c..e2498b3 100644 --- a/wrappers/python/eduvpn_common/types.py +++ b/wrappers/python/eduvpn_common/types.py @@ -35,8 +35,8 @@ class BoolError(Structure): # The type for a Go state change callback VPNStateChange = CFUNCTYPE(c_int, c_int, c_int, c_char_p) ReadRxBytes = CFUNCTYPE(c_ulonglong) -TokenGetter = CFUNCTYPE(c_void_p, c_char_p, POINTER(c_char), c_size_t) -TokenSetter = CFUNCTYPE(c_void_p, c_char_p, c_char_p) +TokenGetter = CFUNCTYPE(c_void_p, c_char_p, c_int, POINTER(c_char), c_size_t) +TokenSetter = CFUNCTYPE(c_void_p, c_char_p, c_int, c_char_p) def encode_args(args: List[Any], types: List[Any]) -> Iterator[Any]: |
