summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadRustRuntime
diff options
context:
space:
mode:
authorAndrew Bulhak <andrew.bulhak@mullvad.net>2025-08-07 17:07:48 +0200
committerJon Petersson <jon.petersson@mullvad.net>2025-08-12 14:49:43 +0200
commit1b7d4c9f171b5ba157f0c27fa0de3ab627c6fe14 (patch)
tree97407167d76af1ee097fdf1a3597b3f34f82cf2b /ios/MullvadRustRuntime
parenteef1fb0138edb3e6b44b84448018b4e96f520228 (diff)
downloadmullvadvpn-1b7d4c9f171b5ba157f0c27fa0de3ab627c6fe14.tar.xz
mullvadvpn-1b7d4c9f171b5ba157f0c27fa0de3ab627c6fe14.zip
Make changes from pull request
Diffstat (limited to 'ios/MullvadRustRuntime')
-rw-r--r--ios/MullvadRustRuntime/MullvadApiContext.swift1
-rw-r--r--ios/MullvadRustRuntime/include/mullvad_rust_runtime.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/ios/MullvadRustRuntime/MullvadApiContext.swift b/ios/MullvadRustRuntime/MullvadApiContext.swift
index 5c09faf7a7..d2d289b951 100644
--- a/ios/MullvadRustRuntime/MullvadApiContext.swift
+++ b/ios/MullvadRustRuntime/MullvadApiContext.swift
@@ -47,7 +47,6 @@ public class MullvadApiContext: @unchecked Sendable {
self.addressCacheWrapper = iniSwiftAddressCacheWrapper(provider: defaultAddressCache)
let selfPtr = Unmanaged.passUnretained(self).toOpaque()
- context = nil
context = switch disableTls {
case true:
mullvad_api_init_new_tls_disabled(
diff --git a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
index 36b49ea915..c8443c1fcf 100644
--- a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
+++ b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
@@ -183,6 +183,14 @@ struct SwiftApiContext mullvad_api_init_new_tls_disabled(const char *host,
* `address` must be a pointer to a null terminated string representing a socket address through which
* the Mullvad API can be reached directly.
*
+ * address_method_change_callback is a function with the C calling convention which will be called
+ * whenever the access method changes with a user-specified opaque pointer and a pointer to the bytes
+ * of the access method's UUID. Note that this callback must remain valid for the lifetime of the
+ * program.
+ *
+ * access_method_change_context is the pointer passed verbatim to the callback. It is not dereferenced
+ * by the Rust code, but remains opaque.
+ *
* If a context cannot be constructed this function will panic since the call site would not be able
* to proceed in a meaningful way anyway.
*