Skip to content

Instantly share code, notes, and snippets.

@LethalMaus
Created January 15, 2026 22:07
Show Gist options
  • Select an option

  • Save LethalMaus/2b3a4acb0883dbb66ca6bcec73611288 to your computer and use it in GitHub Desktop.

Select an option

Save LethalMaus/2b3a4acb0883dbb66ca6bcec73611288 to your computer and use it in GitHub Desktop.
ControlStatus.kt
enum class DeviceType {
PHONE,
WATCH,
UNKNOWN;
companion object {
fun fromName(name: String?): DeviceType = values().firstOrNull {
it.name.equals(name, ignoreCase = true)
} ?: UNKNOWN
}
}
data class ControlStatus(
val holder: DeviceType,
val emergency: Boolean,
val timestamp: Long,
)
data class ConnectionStatus(
val connected: Boolean,
val lastCheckedAt: Long,
val nodeCount: Int,
)
data class UserProfile(
val username: String,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment