Companion

object Companion

Functions

Link copied to clipboard
fun encodeGerror(error: <Error class: unknown class>): String

Creates a D-Bus error name to use for @error. If @error matches a registered error (cf. g_dbus_error_register_error()), the corresponding D-Bus error name will be returned.

Link copied to clipboard
fun fromErrorOrNull(error: <Error class: unknown class>): DBusError?
Link copied to clipboard
fun fromNativeValue(nativeValue: <Error class: unknown class>): DBusError
Link copied to clipboard
fun getRemoteError(error: <Error class: unknown class>): String

Gets the D-Bus error name used for @error, if any.

Link copied to clipboard
fun isRemoteError(error: <Error class: unknown class>): Boolean

Checks if @error represents an error received via D-Bus from a remote peer. If so, use g_dbus_error_get_remote_error() to get the name of the error.

Link copied to clipboard
fun newForDbusError(dbusErrorName: String, dbusErrorMessage: String): <Error class: unknown class>

Creates a #GError based on the contents of @dbus_error_name and

Link copied to clipboard
fun quark(): <Error class: unknown class>
Link copied to clipboard
fun registerError(errorDomain: <Error class: unknown class>, errorCode: Int, dbusErrorName: String): Boolean

Creates an association to map between @dbus_error_name and #GErrors specified by @error_domain and @error_code.

Link copied to clipboard
fun stripRemoteError(error: <Error class: unknown class>): Boolean

Looks for extra information in the error message used to recover the D-Bus error name and strips it if found. If stripped, the message field in @error will correspond exactly to what was received on the wire.

Link copied to clipboard
fun unregisterError(errorDomain: <Error class: unknown class>, errorCode: Int, dbusErrorName: String): Boolean

Destroys an association previously set up with g_dbus_error_register_error().