summaryrefslogtreecommitdiff
path: root/wrappers/python/src
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/src')
-rw-r--r--wrappers/python/src/__init__.py1
-rw-r--r--wrappers/python/src/main.py13
2 files changed, 14 insertions, 0 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py
index bc9b3df..d260916 100644
--- a/wrappers/python/src/__init__.py
+++ b/wrappers/python/src/__init__.py
@@ -63,6 +63,7 @@ lib.SetConnected.argtypes, lib.SetConnected.restype = [c_char_p], c_void_p
lib.SetDisconnected.argtypes, lib.SetDisconnected.restype = [c_char_p], c_void_p
lib.GetIdentifier.argtypes, lib.GetIdentifier.restype = [c_char_p], DataError
lib.SetIdentifier.argtypes, lib.SetIdentifier.restype = [c_char_p, c_char_p], c_void_p
+lib.SetSearchServer.argtypes, lib.SetSearchServer.restype = [c_char_p], c_void_p
lib.FreeString.argtypes, lib.FreeString.restype = [c_void_p], None
diff --git a/wrappers/python/src/main.py b/wrappers/python/src/main.py
index 687f40f..4117a86 100644
--- a/wrappers/python/src/main.py
+++ b/wrappers/python/src/main.py
@@ -105,6 +105,13 @@ def SetDisconnected(name: str) -> str:
return err_string
+def SetSearchServer(name: str) -> str:
+ name_bytes = name.encode("utf-8")
+ ptr_err = lib.SetSearchServer(name_bytes)
+ err_string = GetPtrString(ptr_err)
+ return err_string
+
+
def SetIdentifier(name: str, identifier: str) -> str:
name_bytes = name.encode("utf-8")
identifier_bytes = identifier.encode("utf-8")
@@ -230,6 +237,12 @@ class EduVPN(object):
if identifier_err:
raise Exception(identifier_err)
+ def set_search_server(self) -> None:
+ search_err = SetSearchServer(self.name)
+
+ if search_err:
+ raise Exception(search_err)
+
@property
def event(self) -> EventHandler:
return self.event_handler