Skip to content

Instantly share code, notes, and snippets.

@Malinskiy
Created February 22, 2019 06:12
Show Gist options
  • Save Malinskiy/9699d48e92140c33581e6dcdf13cf39c to your computer and use it in GitHub Desktop.
Save Malinskiy/9699d48e92140c33581e6dcdf13cf39c to your computer and use it in GitHub Desktop.
Marathon: Device Provider
interface DeviceProvider {
sealed class DeviceEvent {
class DeviceConnected(val device: Device) : DeviceEvent()
class DeviceDisconnected(val device: Device) : DeviceEvent()
}
val deviceInitializationTimeoutMillis: Long
suspend fun initialize(vendorConfiguration: VendorConfiguration)
suspend fun terminate()
fun subscribe() : Channel<DeviceEvent>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment