From 0ae3eb11735b7dd446fdc6a6a84063e1ef632d62 Mon Sep 17 00:00:00 2001 From: Albin Date: Tue, 3 Oct 2023 15:10:48 +0200 Subject: [PATCH] Add play purchasing daemon interaction --- .../mullvadvpn/service/MullvadDaemon.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadDaemon.kt b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadDaemon.kt index 6fa03978f774..ceb95a48b751 100644 --- a/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadDaemon.kt +++ b/android/service/src/main/kotlin/net/mullvad/mullvadvpn/service/MullvadDaemon.kt @@ -14,6 +14,9 @@ import net.mullvad.mullvadvpn.model.GeoIpLocation import net.mullvad.mullvadvpn.model.GetAccountDataResult import net.mullvad.mullvadvpn.model.LoginResult import net.mullvad.mullvadvpn.model.ObfuscationSettings +import net.mullvad.mullvadvpn.model.PlayPurchase +import net.mullvad.mullvadvpn.model.PlayPurchaseInitResult +import net.mullvad.mullvadvpn.model.PlayPurchaseVerifyResult import net.mullvad.mullvadvpn.model.QuantumResistantState import net.mullvad.mullvadvpn.model.RelayList import net.mullvad.mullvadvpn.model.RelaySettingsUpdate @@ -171,6 +174,14 @@ class MullvadDaemon( return submitVoucher(daemonInterfaceAddress, voucher) } + fun initPlayPurchase(): PlayPurchaseInitResult { + return initPlayPurchase(daemonInterfaceAddress) + } + + fun verifyPlayPurchase(playPurchase: PlayPurchase): PlayPurchaseVerifyResult { + return verifyPlayPurchase(daemonInterfaceAddress, playPurchase) + } + fun updateRelaySettings(update: RelaySettingsUpdate) { updateRelaySettings(daemonInterfaceAddress, update) } @@ -271,6 +282,13 @@ class MullvadDaemon( voucher: String ): VoucherSubmissionResult + private external fun initPlayPurchase(daemonInterfaceAddress: Long): PlayPurchaseInitResult + + private external fun verifyPlayPurchase( + daemonInterfaceAddress: Long, + playPurchase: PlayPurchase, + ): PlayPurchaseVerifyResult + private external fun updateRelaySettings( daemonInterfaceAddress: Long, update: RelaySettingsUpdate