PropertyDelegate

open class PropertyDelegate<R, T : Any>(proxy: Proxy, val interfaceName: InterfaceName, val propertyName: PropertyName, type: KSerializer<T>, module: SerializersModule, signature: SdbusSig) : ReadOnlyProperty<R, T>

Inheritors

Constructors

Link copied to clipboard
constructor(proxy: Proxy, interfaceName: InterfaceName, propertyName: PropertyName, type: KSerializer<T>, module: SerializersModule, signature: SdbusSig)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun await(): T

Waits for the property to be present and returns the first value when it is. If the property is currently valid, then it is returned immediately.

Link copied to clipboard
fun changes(): Flow<T>

Produces a flow that observes the properties changed signal of a PropertiesProxy and will emit the new values for this property when it has changed.

Link copied to clipboard
fun changesOrNull(): Flow<T?>

Like changes but also will emit null whenever the property has been invalidated.

Link copied to clipboard
fun flow(): Flow<T>

Emits all the values from changes but also emits value from get at start.

Link copied to clipboard
fun flowOrNull(): Flow<T?>

Emits all the values from changesOrNull but also emits value from getOrNull at start.

Link copied to clipboard
fun get(): T

Get the current value of the property.

Link copied to clipboard
fun getOrNull(): T?

Gets the current value of the property, however if the property doesn't currently exist, returns null rather than throwing.

Link copied to clipboard
open operator override fun getValue(thisRef: R, property: KProperty<*>): T