diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:15:34 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-22 17:15:34 +0200 |
| commit | 80218da58eca9c95870770f88e477891e8fdb50a (patch) | |
| tree | 66f685f2bcbbaaac0031d2e7a83f306358043a88 /wrappers/python/src | |
| parent | 0c9a300a58d9dacce7b84ff93222eed35eab5721 (diff) | |
State + FSM + Exports: Implement changing a secure internet location
Diffstat (limited to 'wrappers/python/src')
| -rw-r--r-- | wrappers/python/src/__init__.py | 1 | ||||
| -rw-r--r-- | wrappers/python/src/main.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py index ed6fcc7..1e42bb5 100644 --- a/wrappers/python/src/__init__.py +++ b/wrappers/python/src/__init__.py @@ -77,6 +77,7 @@ lib.GetDiscoServers.argtypes, lib.GetDiscoServers.restype = [c_char_p], DataErro 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.ChangeSecureLocation.argtypes, lib.ChangeSecureLocation.restype = [c_char_p], c_void_p lib.SetSecureLocation.argtypes, lib.SetSecureLocation.restype = [ c_char_p, c_char_p, diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py index 87d2b53..784e622 100644 --- a/wrappers/python/src/main.py +++ b/wrappers/python/src/main.py @@ -187,6 +187,14 @@ class EduVPN(object): if profile_err: raise Exception(profile_err) + def change_secure_location(self) -> None: + # Set the location by country code + self.location_event = threading.Event() + location_err = self.go_function(lib.ChangeSecureLocation) + + if location_err: + raise Exception(location_err) + def set_secure_location(self, country_code: str) -> None: # Set the location by country code location_err = self.go_function(lib.SetSecureLocation, country_code) |
