Re: DBus flags of exposed methods/properties/signals

Simon McVittie <smcv-ZGY8ohtN/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
On Fri, 17 May 2019 at 16:49:14 +0200, Germano Massullo wrote:
> Hello. I am practicing with DBus, by using GDBus API. To achieve that
> I studied NetworkManager GDBus examples [1].
> I have a question. By reading methods/properties/signals exposed by
> systemd-logind on DBus [2], I have read things like
> readonly t IdleSinceHint = 0;
> 
> What does 't' stand for? There are also many other "flags", like 'b', 'as', etc.

It's an abbreviated way to describe the D-Bus type system. 't' is a
64-bit unsigned integer, 'b' is a Boolean value, and 'as' is an array
(a) of strings (s).

These type signatures are defined in the D-Bus Specification:
<https://dbus.freedesktop.org/doc/dbus-specification.html#type-system>

Since you're using GLib, you might find the GVariant documentation in the
GLib Reference Manual useful. The GVariant type system is a superset of the
D-Bus type system: every D-Bus type is a valid GVariant type, but not every
GVariant type is a valid D-Bus type.
<https://developer.gnome.org/glib/stable/glib-GVariantType.html#glib-GVariantType.description>

(Specifically, the GVariant types that are not valid on D-Bus are: anything
that mentions 'm', '()', 'r', '?', '*', or any occurrence of '{' except
immediately after 'a'.)

    smcv
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.