summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-05-22 17:26:11 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-05-23 09:54:26 +0000
commit1f15fe966fc73fce4bdfc58d4c6b387b7df0c79f (patch)
tree5f7f31822097e93c6a3a89a989a99aabc07255ad
parent34a6420fcf294c46994d781b1088fd4c36b8c1e9 (diff)
downloadmullvadvpn-1f15fe966fc73fce4bdfc58d4c6b387b7df0c79f.tar.xz
mullvadvpn-1f15fe966fc73fce4bdfc58d4c6b387b7df0c79f.zip
Create `LocationConstraint` class
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt
new file mode 100644
index 0000000000..4fc07a4b43
--- /dev/null
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt
@@ -0,0 +1,11 @@
+package net.mullvad.mullvadvpn.model
+
+sealed class LocationConstraint(val code: Array<String>) {
+ class Country(var countryCode: String) : LocationConstraint(arrayOf(countryCode))
+
+ class City(var countryCode: String, var cityCode: String)
+ : LocationConstraint(arrayOf(countryCode, cityCode))
+
+ class Hostname(var countryCode: String, var cityCode: String, var hostname: String)
+ : LocationConstraint(arrayOf(countryCode, cityCode, hostname))
+}