package com.joe.camera.webcam.model

import android.net.Uri

enum class CameraState(val wireCode: Byte) {
    FREE(0), WORKING(1), RECORDING(1), ERROR(0);
    companion object { fun fromWire(value: Byte) = if (value.toInt() == 1) WORKING else FREE }
}

enum class RemoteCommand(val code: Byte) {
    VOLUME_UP(0), VOLUME_DOWN(1), RECORD_VIDEO(2), OPEN_SETTING(3);
    companion object { fun fromCode(code: Byte) = entries.firstOrNull { it.code == code } }
}

enum class MediaKind { IMAGE, VIDEO }

data class MediaItem(
    val id: Long,
    val uri: Uri,
    val displayName: String,
    val kind: MediaKind,
    val modifiedSeconds: Long,
)

enum class ScreenControlMode { SHIZUKU, ROOT, OVERLAY }
