diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-07 16:18:03 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-07 16:18:03 +0200 |
| commit | c67b8f64438d439d52a9e4955ff1bdf30363dbb1 (patch) | |
| tree | d54cc9b11bc5cfd9cfef375f4742987193050658 /exports | |
| parent | 7d67ce7f6a15970677b7d0b8f4912fe379862515 (diff) | |
Secure Internet: Implement the Ask Location transition callback
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/exports.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/exports/exports.go b/exports/exports.go index 6b33da6..2f5c357 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -176,6 +176,17 @@ func SetProfileID(name *C.char, data *C.char) *C.char { return C.CString(ErrorToString(profileErr)) } +//export SetSecureLocation +func SetSecureLocation(name *C.char, data *C.char) *C.char { + nameStr := C.GoString(name) + state, stateErr := GetVPNState(nameStr) + if stateErr != nil { + return C.CString(ErrorToString(stateErr)) + } + locationErr := state.SetSecureLocation(C.GoString(data)) + return C.CString(ErrorToString(locationErr)) +} + //export GetIdentifier func GetIdentifier(name *C.char) (*C.char, *C.char) { nameStr := C.GoString(name) |
