IotDeviceController

interface IotDeviceController : SupportIotDeviceController

Types

Status
Link copied to clipboard
sealed class Status

Base class for the possible statuses of the IotDeviceController

Functions

execute
Link copied to clipboard
abstract suspend fun execute(stateChangeRequest: StateChangeRequest): Result<Unit>

Executes the given StateChangeRequest.

abstract fun execute(stateChangeRequest: StateChangeRequest, callback: (Result<Unit>) -> Unit): Cancelable
abstract fun execute(stateChangeRequest: StateChangeRequest, lifecycleOwner: LifecycleOwner, callback: (Result<Unit>) -> Unit): Cancelable

Support function to executes the given StateChangeRequest.

getIotDevices
Link copied to clipboard
abstract fun getIotDevices(iotDeviceFilter: IotDeviceFilter? = null, propertyFilter: PropertyFilter? = null, updateIntervalMillis: Long = -1): Flow<Result<List<IotDevice>>>
abstract fun getIotDevices(sorting: Sorting, iotDeviceFilter: IotDeviceFilter? = null, propertyFilter: PropertyFilter? = null, updateIntervalMillis: Long = -1): Flow<Result<List<IotDevice>>>

Get a Flow with Result containing a list of IotDevice.

abstract fun getIotDevices(iotDeviceFilter: IotDeviceFilter? = null, propertyFilter: PropertyFilter? = null, updateIntervalMillis: Long = -1, callback: (Result<List<IotDevice>>) -> Unit): Cancelable
abstract fun getIotDevices(iotDeviceFilter: IotDeviceFilter? = null, propertyFilter: PropertyFilter? = null, updateIntervalMillis: Long = -1, lifecycleOwner: LifecycleOwner, callback: (Result<List<IotDevice>>) -> Unit): Cancelable
abstract fun getIotDevices(sorting: Sorting, iotDeviceFilter: IotDeviceFilter? = null, propertyFilter: PropertyFilter? = null, updateIntervalMillis: Long = -1, callback: (Result<List<IotDevice>>) -> Unit): Cancelable

Support function to get list of IotDevice.

getStatus
Link copied to clipboard
abstract fun getStatus(): Flow<IotDeviceController.Status>

Get a Flow with the Status of this controller.

abstract fun getStatus(callback: (IotDeviceController.Status) -> Unit): Cancelable
abstract fun getStatus(lifecycleOwner: LifecycleOwner, callback: (IotDeviceController.Status) -> Unit): Cancelable

Support function to get the Status of this controller.