summaryrefslogtreecommitdiff
path: root/wrappers/python/src
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/src')
-rw-r--r--wrappers/python/src/__init__.py3
-rw-r--r--wrappers/python/src/main.py18
2 files changed, 21 insertions, 0 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py
index eba497c..bf97bce 100644
--- a/wrappers/python/src/__init__.py
+++ b/wrappers/python/src/__init__.py
@@ -50,6 +50,9 @@ VPNStateChange = CFUNCTYPE(None, c_char_p, c_int, c_int, c_char_p)
# Exposed functions
# We have to use c_void_p instead of c_char_p to free it properly
# See https://stackoverflow.com/questions/13445568/python-ctypes-how-to-free-memory-getting-invalid-pointer-error
+lib.RemoveSecureInternet.argtypes, lib.RemoveSecureInternet.restype = [c_char_p], c_void_p
+lib.RemoveInstituteAccess.argtypes, lib.RemoveInstituteAccess.restype = [c_char_p, c_char_p], c_void_p
+lib.RemoveCustomServer.argtypes, lib.RemoveCustomServer.restype = [c_char_p, c_char_p], c_void_p
lib.GetConfigSecureInternet.argtypes, lib.GetConfigSecureInternet.restype = [
c_char_p,
c_char_p,
diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py
index 7ebeae6..b37842f 100644
--- a/wrappers/python/src/main.py
+++ b/wrappers/python/src/main.py
@@ -98,6 +98,24 @@ class EduVPN(object):
return organizations
+ def remove_secure_internet(self):
+ remove_err = self.go_function(lib.RemoveSecureInternet)
+
+ if remove_err:
+ raise Exception(remove_err)
+
+ def remove_institute_access(self, url: str):
+ remove_err = self.go_function(lib.RemoveInstituteAccess, url)
+
+ if remove_err:
+ raise Exception(remove_err)
+
+ def remove_custom_server(self, url: str):
+ remove_err = self.go_function(lib.RemoveCustomServer, url)
+
+ if remove_err:
+ raise Exception(remove_err)
+
def get_config(self, url: str, func: callable, force_tcp: bool = False):
# Because it could be the case that a profile callback is started, store a threading event
# In the constructor, we have defined a wait event for Ask_Profile, this waits for this event to be set