Companion

object Companion : RecordCompanion<Variant, <Error class: unknown class>>

Functions

Link copied to clipboard

Determines if a given string is a valid D-Bus object path. You should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path().

Link copied to clipboard
fun isSignature(string: String): Boolean

Determines if a given string is a valid D-Bus type signature. You should ensure that a string is a valid D-Bus type signature before passing it to g_variant_new_signature().

Link copied to clipboard

Creates a new boolean #GVariant instance -- either true or false.

Link copied to clipboard
fun newBytestringArray(strv: List<String>, length: Long): Variant

Constructs an array of bytestring #GVariant from the given array of strings.

Link copied to clipboard
fun newDictEntry(key: Variant, value: Variant): Variant

Creates a new dictionary entry #GVariant. @key and @value must be non-null. @key must be a value of a basic type (ie: not a container).

Link copied to clipboard
fun newDouble(value: Double): Variant

Creates a new double #GVariant instance.

Link copied to clipboard
fun newFromBytes(type: VariantType, bytes: Bytes, trusted: Boolean): Variant

Constructs a new serialized-mode #GVariant instance. This is the inner interface for creation of new serialized values that gets called from various functions in gvariant.c.

Link copied to clipboard
fun newHandle(value: Int): Variant

Creates a new handle #GVariant instance.

Link copied to clipboard
fun newInt16(value: Short): Variant

Creates a new int16 #GVariant instance.

Link copied to clipboard
fun newInt32(value: Int): Variant

Creates a new int32 #GVariant instance.

Link copied to clipboard
fun newInt64(value: Long): Variant

Creates a new int64 #GVariant instance.

Link copied to clipboard
fun newMaybe(childType: VariantType? = null, child: Variant? = null): Variant

Depending on if @child is null, either wraps @child inside of a maybe container or creates a Nothing instance for the given @type.

Link copied to clipboard
fun newObjectPath(objectPath: String): Variant

Creates a D-Bus object path #GVariant with the contents of @string.

Link copied to clipboard
fun newObjv(strv: List<String>, length: Long): Variant

Constructs an array of object paths #GVariant from the given array of strings.

Link copied to clipboard
fun newSignature(signature: String): Variant

Creates a D-Bus type signature #GVariant with the contents of

Link copied to clipboard
fun newString(string: String): Variant

Creates a string #GVariant with the contents of @string.

Link copied to clipboard
fun newStrv(strv: List<String>, length: Long): Variant

Constructs an array of strings #GVariant from the given array of strings.

Link copied to clipboard
fun newUint16(value: <Error class: unknown class>): Variant

Creates a new uint16 #GVariant instance.

Link copied to clipboard
fun newUint32(value: <Error class: unknown class>): Variant

Creates a new uint32 #GVariant instance.

Link copied to clipboard
fun newUint64(value: <Error class: unknown class>): Variant

Creates a new uint64 #GVariant instance.

Link copied to clipboard

Boxes @value. The result is a #GVariant instance representing a variant containing the original value.

Link copied to clipboard
fun parseErrorPrintContext(error: Error, sourceStr: String): String

Pretty-prints a message showing the context of a #GVariant parse error within the string for which parsing was attempted.

Link copied to clipboard
fun parseErrorQuark(): <Error class: unknown class>
Link copied to clipboard
fun parserGetErrorQuark(): <Error class: unknown class>

Same as g_variant_error_quark().

Link copied to clipboard
open override fun wrapRecordPointer(pointer: <Error class: unknown class><out <Error class: unknown class>>): Variant

Wrap a CPointer pointing to a record of this type into its wrapper class.