summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadRustRuntime/include/mullvad_rust_runtime.h39
-rw-r--r--mullvad-ios/src/api_client/account.rs9
-rw-r--r--mullvad-ios/src/api_client/api.rs6
-rw-r--r--mullvad-ios/src/api_client/device.rs15
-rw-r--r--mullvad-ios/src/api_client/problem_report.rs3
-rw-r--r--mullvad-ios/src/api_client/storekit.rs6
6 files changed, 78 insertions, 0 deletions
diff --git a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
index e053294fb8..36790ce05c 100644
--- a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
+++ b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
@@ -247,6 +247,9 @@ struct SwiftAccessMethodSettingsWrapper init_access_method_settings_wrapper(cons
*
* `account_number` must be a pointer to a null terminated string.
*
+ * `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_get_account(struct SwiftApiContext api_context,
@@ -264,6 +267,9 @@ struct SwiftCancelHandle mullvad_ios_get_account(struct SwiftApiContext api_cont
* 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_create_account(struct SwiftApiContext api_context,
@@ -282,6 +288,9 @@ struct SwiftCancelHandle mullvad_ios_create_account(struct SwiftApiContext api_c
*
* `account_number` must be a pointer to a null terminated string.
*
+ * `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_delete_account(struct SwiftApiContext api_context,
@@ -299,6 +308,9 @@ struct SwiftCancelHandle mullvad_ios_delete_account(struct SwiftApiContext api_c
* 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_get_addresses(struct SwiftApiContext api_context,
@@ -317,6 +329,9 @@ struct SwiftCancelHandle mullvad_ios_get_addresses(struct SwiftApiContext api_co
*
* `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
+ * `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_get_relays(struct SwiftApiContext api_context,
@@ -376,6 +391,9 @@ extern void mullvad_api_completion_finish(struct SwiftMullvadApiResponse respons
* the `account_number` must be a pointer to a null terminated string.
* the `identifier` must be a pointer to a null terminated string.
*
+ * `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_get_device(struct SwiftApiContext api_context,
@@ -398,6 +416,9 @@ struct SwiftCancelHandle mullvad_ios_get_device(struct SwiftApiContext api_conte
*
* the `account_number` must be a pointer to a null terminated string.
*
+ * `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_get_devices(struct SwiftApiContext api_context,
@@ -417,6 +438,9 @@ struct SwiftCancelHandle mullvad_ios_get_devices(struct SwiftApiContext api_cont
* 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`
+ *
* the `account_number` must be a pointer to a null terminated string.
* the `identifier` must be a pointer to a null terminated string.
* the `public_key` pointer must be a valid pointer to 32 unsigned bytes.
@@ -440,6 +464,9 @@ struct SwiftCancelHandle mullvad_ios_create_device(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`
+ *
* the `account_number` must be a pointer to a null terminated string.
* the `identifier` must be a pointer to a null terminated string.
* This function is not safe to call multiple times with the same `CompletionCookie`.
@@ -462,6 +489,9 @@ struct SwiftCancelHandle mullvad_ios_delete_device(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`
+ *
* the `account_number` must be a pointer to a null terminated string.
* the `identifier` must be a pointer to a null terminated string.
* the `public_key` pointer must be a valid pointer to 32 unsigned bytes.
@@ -558,6 +588,9 @@ void mullvad_api_mock_drop(struct SwiftServerMock mock_ptr);
* 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`
+ *
* the string properties of `SwiftProblemReportRequest` must be pointers to a null terminated strings.
*
* This function is not safe to call multiple times with the same `CompletionCookie`.
@@ -650,6 +683,9 @@ struct SwiftShadowsocksLoaderWrapper init_swift_shadowsocks_loader_wrapper(const
*
* `account_number` must be a pointer to a null terminated string.
*
+ * `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_init_storekit_payment(struct SwiftApiContext api_context,
@@ -667,6 +703,9 @@ struct SwiftCancelHandle mullvad_ios_init_storekit_payment(struct SwiftApiContex
* 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`
+ *
* `account_number` must be a pointer to a null terminated string.
*
* `body` must be a pointer to a contiguous memory segment
diff --git a/mullvad-ios/src/api_client/account.rs b/mullvad-ios/src/api_client/account.rs
index 36b601ad2d..227e81ba30 100644
--- a/mullvad-ios/src/api_client/account.rs
+++ b/mullvad-ios/src/api_client/account.rs
@@ -26,6 +26,9 @@ use super::{
///
/// `account_number` must be a pointer to a null terminated string.
///
+/// `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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_get_account(
@@ -79,6 +82,9 @@ pub unsafe extern "C" fn mullvad_ios_get_account(
/// 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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_create_account(
@@ -122,6 +128,9 @@ pub unsafe extern "C" fn mullvad_ios_create_account(
///
/// `account_number` must be a pointer to a null terminated string.
///
+/// `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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_delete_account(
diff --git a/mullvad-ios/src/api_client/api.rs b/mullvad-ios/src/api_client/api.rs
index ed37695f6f..6578be1d14 100644
--- a/mullvad-ios/src/api_client/api.rs
+++ b/mullvad-ios/src/api_client/api.rs
@@ -24,6 +24,9 @@ use super::{
/// 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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_get_addresses(
@@ -67,6 +70,9 @@ pub unsafe extern "C" fn mullvad_ios_get_addresses(
///
/// `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
+/// `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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_get_relays(
diff --git a/mullvad-ios/src/api_client/device.rs b/mullvad-ios/src/api_client/device.rs
index 8ca287ebb2..6a6ee1b07e 100644
--- a/mullvad-ios/src/api_client/device.rs
+++ b/mullvad-ios/src/api_client/device.rs
@@ -30,6 +30,9 @@ use talpid_types::net::wireguard::PublicKey;
/// the `account_number` must be a pointer to a null terminated string.
/// the `identifier` must be a pointer to a null terminated string.
///
+/// `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`.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn mullvad_ios_get_device(
@@ -86,6 +89,9 @@ pub unsafe extern "C" fn mullvad_ios_get_device(
///
/// the `account_number` must be a pointer to a null terminated string.
///
+/// `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`.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn mullvad_ios_get_devices(
@@ -137,6 +143,9 @@ pub unsafe extern "C" fn mullvad_ios_get_devices(
/// 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`
+///
/// the `account_number` must be a pointer to a null terminated string.
/// the `identifier` must be a pointer to a null terminated string.
/// the `public_key` pointer must be a valid pointer to 32 unsigned bytes.
@@ -195,6 +204,9 @@ pub unsafe extern "C" fn mullvad_ios_create_device(
/// 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`
+///
/// the `account_number` must be a pointer to a null terminated string.
/// the `identifier` must be a pointer to a null terminated string.
/// This function is not safe to call multiple times with the same `CompletionCookie`.
@@ -251,6 +263,9 @@ pub unsafe extern "C" fn mullvad_ios_delete_device(
/// 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`
+///
/// the `account_number` must be a pointer to a null terminated string.
/// the `identifier` must be a pointer to a null terminated string.
/// the `public_key` pointer must be a valid pointer to 32 unsigned bytes.
diff --git a/mullvad-ios/src/api_client/problem_report.rs b/mullvad-ios/src/api_client/problem_report.rs
index 3254d7f6d2..652d27550e 100644
--- a/mullvad-ios/src/api_client/problem_report.rs
+++ b/mullvad-ios/src/api_client/problem_report.rs
@@ -29,6 +29,9 @@ use tokio::task::JoinHandle;
/// 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`
+///
/// the string properties of `SwiftProblemReportRequest` must be pointers to a null terminated strings.
///
/// This function is not safe to call multiple times with the same `CompletionCookie`.
diff --git a/mullvad-ios/src/api_client/storekit.rs b/mullvad-ios/src/api_client/storekit.rs
index c1ee0d26ca..861cf1c906 100644
--- a/mullvad-ios/src/api_client/storekit.rs
+++ b/mullvad-ios/src/api_client/storekit.rs
@@ -27,6 +27,9 @@ use super::{
///
/// `account_number` must be a pointer to a null terminated string.
///
+/// `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`.
#[no_mangle]
pub unsafe extern "C" fn mullvad_ios_init_storekit_payment(
@@ -92,6 +95,9 @@ async fn mullvad_ios_init_storekit_payment_inner(
/// 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`
+///
/// `account_number` must be a pointer to a null terminated string.
///
/// `body` must be a pointer to a contiguous memory segment