summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadRustRuntime/include
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2025-06-04 11:39:14 +0200
committerBug Magnet <marco.nikic@mullvad.net>2025-06-04 11:39:14 +0200
commit1e42ad237f5fbb68027f0c3aefcf3b35c5b87500 (patch)
treecc871d6c0e360d910ebda7c6f05b1d71ad5d1216 /ios/MullvadRustRuntime/include
parent64862490c2781e4be3b8e77d5c297198fcb63d54 (diff)
parente3ccff9b8313e5a13ce526c5b9cb531bd82f623c (diff)
downloadmullvadvpn-1e42ad237f5fbb68027f0c3aefcf3b35c5b87500.tar.xz
mullvadvpn-1e42ad237f5fbb68027f0c3aefcf3b35c5b87500.zip
Merge branch 'move-api-access-method-test-call-to-mullvad-api-ios-1195'
Diffstat (limited to 'ios/MullvadRustRuntime/include')
-rw-r--r--ios/MullvadRustRuntime/include/mullvad_rust_runtime.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
index 08bb177116..d4c0bf334f 100644
--- a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
+++ b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
@@ -89,10 +89,10 @@ typedef struct LateStringDeallocator {
typedef struct SwiftMullvadApiResponse {
uint8_t *body;
uintptr_t body_size;
- uint8_t *etag;
+ char *etag;
uint16_t status_code;
- uint8_t *error_description;
- uint8_t *server_response_code;
+ char *error_description;
+ char *server_response_code;
bool success;
} SwiftMullvadApiResponse;
@@ -366,6 +366,26 @@ struct SwiftCancelHandle mullvad_ios_get_addresses(struct SwiftApiContext api_co
* object `MullvadApiCompletion`. The pointer will be freed by calling `mullvad_api_completion_finish`
* when completion finishes (in completion.finish).
*
+ * `retry_strategy` must have been created by a call to either of the following functions
+ * `mullvad_api_retry_strategy_never`, `mullvad_api_retry_strategy_constant` or `mullvad_api_retry_strategy_exponential`
+ *
+ * This function is not safe to call multiple times with the same `CompletionCookie`.
+ */
+struct SwiftCancelHandle mullvad_ios_api_addrs_available(struct SwiftApiContext api_context,
+ void *completion_cookie,
+ struct SwiftRetryStrategy retry_strategy,
+ const void *access_method_setting);
+
+/**
+ * # Safety
+ *
+ * `api_context` must be pointing to a valid instance of `SwiftApiContext`. A `SwiftApiContext` is created
+ * by calling `mullvad_api_init_new`.
+ *
+ * This function takes ownership of `completion_cookie`, which must be pointing to a valid instance of Swift
+ * object `MullvadApiCompletion`. The pointer will be freed by calling `mullvad_api_completion_finish`
+ * when completion finishes (in completion.finish).
+ *
* `etag` must be a pointer to a null terminated string.
*
* `retry_strategy` must have been created by a call to either of the following functions