From 83301ca7871b67beb3940134efc00ecc31061981 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 24 Jul 2020 16:31:56 +0200 Subject: lib: support gvariant maybe type Fixes #1397 --- doc/writing-modules.adoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/writing-modules.adoc b/doc/writing-modules.adoc index 41678c30d70..0f3336ff2c0 100644 --- a/doc/writing-modules.adoc +++ b/doc/writing-modules.adoc @@ -168,13 +168,20 @@ Builds a GVariant array containing the given list of elements, where each elemen - `hm.gvariant.type.uint64` - `hm.gvariant.type.double` - `hm.gvariant.type.arrayOf type` +- `hm.gvariant.type.maybeOf type` - `hm.gvariant.type.tupleOf types` -- + -where `type` and `types` are themselve a type and list of types, respectively. +where `type` and `types` are themselves a type and list of types, respectively. + `hm.gvariant.mkEmptyArray type`::: An alias of `hm.gvariant.mkArray type []`. + +`hm.gvariant.mkNothing type`::: +Builds a GVariant maybe value whose (non-existent) element is of the given type. The `type` value is constructed as described for the `mkArray` function above. ++ +`hm.gvariant.mkJust element`::: +Builds a GVariant maybe value containing the given GVariant element. ++ `hm.gvariant.mkTuple elements`::: Builds a GVariant tuple containing the given list of elements, where each element is a GVariant value. -- cgit v1.2.3