Files
GaCyGO-Android/app/src/main/java/com/gacy/android/model/ServerModels.kt
T

32 lines
969 B
Kotlin
Raw Normal View History

package com.gacy.android.model
enum class ServerExecutionMode(val displayNameTh: String, val displayNameEn: String) {
LOCAL_EMBEDDED("รันในเครื่อง (Local Embedded)", "Local Embedded Runtime"),
REMOTE_SERVER("เชื่อมต่อเซิร์ฟเวอร์ภายนอก (Remote Server)", "Remote Server Connection")
}
enum class ServerStatus {
STOPPED,
STARTING,
RUNNING,
STOPPING,
ERROR
}
data class ServerConfig(
val executionMode: ServerExecutionMode = ServerExecutionMode.LOCAL_EMBEDDED,
val remoteHost: String = "127.0.0.1",
val dispatchPort: Int = 21000,
val gameserverPort: Int = 23301,
val serverKey: String = "",
val sendHotfix: Boolean = true
) {
val dispatchUrl: String
get() = "http://$remoteHost:$dispatchPort"
}
data class GmCommandResult(
val success: Boolean,
val message: String,
val timestamp: Long = System.currentTimeMillis()
)