summaryrefslogtreecommitdiffhomepage
path: root/android/lib/model/src
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2024-03-14 14:59:43 +0100
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2024-03-14 14:59:43 +0100
commit3979cda6f64c509dafaf0d73bd3bfac43ad58cc3 (patch)
treea9b46514a6c3091cc890deb03ca66f9037c4f8b1 /android/lib/model/src
parent461e29d36e5e2a6841e05897e732b5d068d4dcf0 (diff)
parent1ff2611cdfb06bebc3e3047e6930cb034b452c61 (diff)
downloadmullvadvpn-3979cda6f64c509dafaf0d73bd3bfac43ad58cc3.tar.xz
mullvadvpn-3979cda6f64c509dafaf0d73bd3bfac43ad58cc3.zip
Merge branch 'create-ui-for-custom-list-droid-654'
Diffstat (limited to 'android/lib/model/src')
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CreateCustomListResult.kt10
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/CustomListsError.kt6
-rw-r--r--android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/UpdateCustomListResult.kt10
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()
+}