summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadRustRuntime/include
diff options
context:
space:
mode:
authorSteffen Ernst <steffen.ernst@mullvad.net>2025-04-09 10:33:39 +0200
committerSteffen Ernst <steffen.ernst@mullvad.net>2025-05-08 09:31:27 +0200
commit01660f7d4af6fc539ce938f44f26bdf55337b57a (patch)
tree4a15da846efe1f5fe9bf486d2c35727b1e2d1b31 /ios/MullvadRustRuntime/include
parenta74a0c0aa3270bb2cf7861f94ad7dc590ed50d22 (diff)
downloadmullvadvpn-01660f7d4af6fc539ce938f44f26bdf55337b57a.tar.xz
mullvadvpn-01660f7d4af6fc539ce938f44f26bdf55337b57a.zip
Add storekit 2 functions to mullvad api
Diffstat (limited to 'ios/MullvadRustRuntime/include')
-rw-r--r--ios/MullvadRustRuntime/include/mullvad_rust_runtime.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
index fa24141e42..e053294fb8 100644
--- a/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
+++ b/ios/MullvadRustRuntime/include/mullvad_rust_runtime.h
@@ -639,6 +639,50 @@ extern const void *swift_get_shadowsocks_bridges(const void *rawBridgeProvider);
struct SwiftShadowsocksLoaderWrapper init_swift_shadowsocks_loader_wrapper(const void *shadowsocks_loader);
/**
+ * # 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).
+ *
+ * `account_number` must be a pointer to a null terminated string.
+ *
+ * This function is not safe to call multiple times with the same `CompletionCookie`.
+ */
+struct SwiftCancelHandle mullvad_ios_init_storekit_payment(struct SwiftApiContext api_context,
+ void *completion_cookie,
+ struct SwiftRetryStrategy retry_strategy,
+ const char *account_number);
+
+/**
+ * # 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).
+ *
+ * `account_number` must be a pointer to a null terminated string.
+ *
+ * `body` must be a pointer to a contiguous memory segment
+ *
+ * `body_size` must be the size of the body
+ *
+ * This function is not safe to call multiple times with the same `CompletionCookie`.
+ */
+struct SwiftCancelHandle mullvad_ios_check_storekit_payment(struct SwiftApiContext api_context,
+ void *completion_cookie,
+ struct SwiftRetryStrategy retry_strategy,
+ const char *account_number,
+ const uint8_t *body,
+ uintptr_t body_size);
+
+/**
* Initializes a valid pointer to an instance of `EncryptedDnsProxyState`.
*
* # Safety