Skip to content

Commit

Permalink
Add play purchasing daemon interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Oct 9, 2023
1 parent 224e1f5 commit 23e27a5
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 23e27a5

Please sign in to comment.