diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-03-13 12:44:49 +0100 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2024-03-14 14:53:44 +0100 |
| commit | fe6586647799a21c16f9c005a78bb14ce75dea09 (patch) | |
| tree | 37183fb94bc747ab279d52bb00c0b93f3647f4ca /android/lib/model/src | |
| parent | 461e29d36e5e2a6841e05897e732b5d068d4dcf0 (diff) | |
| download | mullvadvpn-fe6586647799a21c16f9c005a78bb14ce75dea09.tar.xz mullvadvpn-fe6586647799a21c16f9c005a78bb14ce75dea09.zip | |
Return success or error when creating and updating a custom list
Diffstat (limited to 'android/lib/model/src')
3 files changed, 26 insertions, 0 deletions
diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CreateCustomListResult.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CreateCustomListResult.kt new file mode 100644 index 0000000000..73eaa209c8 --- /dev/null +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CreateCustomListResult.kt @@ -0,0 +1,10 @@ +package net.mullvad.mullvadvpn.model + +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +sealed class CreateCustomListResult : Parcelable { + @Parcelize data class Ok(val id: String) : CreateCustomListResult() + + @Parcelize data class Error(val error: CustomListsError) : CreateCustomListResult() +} diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CustomListsError.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CustomListsError.kt new file mode 100644 index 0000000000..83806af4f7 --- /dev/null +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CustomListsError.kt @@ -0,0 +1,6 @@ +package net.mullvad.mullvadvpn.model + +enum class CustomListsError { + CustomListExists, + OtherError +} diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/UpdateCustomListResult.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/UpdateCustomListResult.kt new file mode 100644 index 0000000000..ebfe9e8cd6 --- /dev/null +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/UpdateCustomListResult.kt @@ -0,0 +1,10 @@ +package net.mullvad.mullvadvpn.model + +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +sealed class UpdateCustomListResult : Parcelable { + @Parcelize data object Ok : UpdateCustomListResult() + + @Parcelize data class Error(val error: CustomListsError) : UpdateCustomListResult() +} |
