Proxy

interface Proxy : Resource

Properties

Link copied to clipboard
abstract val connection: Connection

Provides D-Bus connection used by the proxy

Link copied to clipboard

Provides access to the currently processed D-Bus message

Link copied to clipboard
abstract val objectPath: ObjectPath

Returns object path of the underlying DBus object

Functions

Link copied to clipboard
abstract fun callMethod(message: MethodCall): MethodReply
abstract fun callMethod(message: MethodCall, timeout: ULong): MethodReply

Calls method on the remote D-Bus object

Link copied to clipboard
inline fun Proxy.callMethod(message: MethodCall, timeout: Duration): MethodReply

inline fun <R : Any> Proxy.callMethod(interfaceName: InterfaceName, methodName: MethodName, builder: MethodInvoker.() -> Unit): R

Calls method on the D-Bus object

Link copied to clipboard
abstract suspend fun callMethodAsync(message: MethodCall): MethodReply
abstract fun callMethodAsync(message: MethodCall, asyncReplyCallback: AsyncReplyHandler): PendingAsyncCall

Calls method on the D-Bus object asynchronously

abstract suspend fun callMethodAsync(message: MethodCall, timeout: ULong): MethodReply
abstract fun callMethodAsync(message: MethodCall, asyncReplyCallback: AsyncReplyHandler, timeout: ULong): PendingAsyncCall

Calls method on the D-Bus object asynchronously, with custom timeout

Link copied to clipboard
inline suspend fun Proxy.callMethodAsync(message: MethodCall, timeout: Duration): MethodReply
inline fun Proxy.callMethodAsync(message: MethodCall, noinline asyncReplyCallback: AsyncReplyHandler, timeout: Duration): PendingAsyncCall

inline suspend fun <R : Any> Proxy.callMethodAsync(interfaceName: InterfaceName, methodName: MethodName, builder: MethodInvoker.() -> Unit): R

Calls method on the D-Bus object asynchronously

Link copied to clipboard
abstract fun createMethodCall(interfaceName: InterfaceName, methodName: MethodName): MethodCall

Creates a method call message

Link copied to clipboard

Gets values of all properties of the D-Bus object

Link copied to clipboard

Gets values of all properties of the D-Bus object asynchronously

Link copied to clipboard
inline fun <T : Any> Proxy.getProperty(interfaceName: InterfaceName, propertyName: PropertyName): T

Gets value of a property of the D-Bus object

Link copied to clipboard

Gets value of a property of the D-Bus object asynchronously

Link copied to clipboard
inline fun <R, T : Any> Proxy.mutableDelegate(interfaceName: InterfaceName, propertyName: PropertyName): MutablePropertyDelegate<R, T>
Link copied to clipboard
inline fun Proxy.onSignal(interfaceName: InterfaceName, signalName: SignalName, builder: SignalSubscriber.() -> Unit): Resource

Registers signal handler for a given signal of the D-Bus object

Link copied to clipboard
inline fun <R, T : Any> Proxy.prop(interfaceName: InterfaceName, propertyName: PropertyName): ReadWriteProperty<R, T>
Link copied to clipboard
inline fun <R, T : Any> Proxy.propDelegate(interfaceName: InterfaceName, propertyName: PropertyName): PropertyDelegate<R, T>
Link copied to clipboard
abstract fun registerSignalHandler(interfaceName: InterfaceName, signalName: SignalName, signalHandler: SignalHandler): Resource

Registers a handler for the desired signal emitted by the D-Bus object

Link copied to clipboard
abstract fun release()

Releases this resource and any child resources it may have.

Link copied to clipboard
inline fun <T : Any> Proxy.setProperty(interfaceName: InterfaceName, propertyName: PropertyName, value: T, dontExpectReply: Boolean = false)
Link copied to clipboard

Sets value of a property of the D-Bus object asynchronously

Link copied to clipboard
inline fun <T> Proxy.signalFlow(interfaceName: InterfaceName, signalName: SignalName, builder: SignalSubscriber.() -> Unit): Flow<T>