From ffbc91079b6c425976fcefbb528f0c180f7971e2 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 12 Jul 2022 14:59:50 +0200 Subject: Python + Exports: Implement Go back --- wrappers/python/src/__init__.py | 1 + wrappers/python/src/main.py | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'wrappers/python') diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py index 0451f61..a1f8b40 100644 --- a/wrappers/python/src/__init__.py +++ b/wrappers/python/src/__init__.py @@ -74,6 +74,7 @@ lib.GetDiscoOrganizations.argtypes, lib.GetDiscoOrganizations.restype = [ c_char_p ], DataError lib.GetDiscoServers.argtypes, lib.GetDiscoServers.restype = [c_char_p], DataError +lib.GoBack.argtypes, lib.GoBack.restype = [c_char_p], None lib.CancelOAuth.argtypes, lib.CancelOAuth.restype = [c_char_p], c_void_p lib.SetProfileID.argtypes, lib.SetProfileID.restype = [c_char_p, c_char_p], c_void_p lib.SetSecureLocation.argtypes, lib.SetSecureLocation.restype = [ diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py index 4868fca..84be0ab 100644 --- a/wrappers/python/src/main.py +++ b/wrappers/python/src/main.py @@ -134,6 +134,10 @@ class EduVPN(object): self.location_event = threading.Event() return self.get_config(url, lib.GetConfigSecureInternet, force_tcp) + def go_back(self) -> None: + # Ignore the error + self.go_function(lib.GoBack) + def set_connected(self) -> None: connect_err = self.go_function(lib.SetConnected) -- cgit v1.2.3