[gdbus-codegen] handle property set on the service-side
- Date: Mon, 05 Feb 2018 15:22:00 +0100
- From: Gabriel LUCAS <gabriel.lucas@xxxxxxxx>
- Subject: [gdbus-codegen] handle property set on the service-side
I am developing a DBus service with GDBus. To avoid the repetitive and
fastidious task of wrapping the dbus signals, properties and method call
handling, I am using gdbus-codegen to generate the wrapper from a XML
I think I might have reached some limitation with this method while
trying to handle a property set from the service side. The generated
code provides a vtable for the interface with the property_get and
property_set handlers set. When a property set is received, the GObject
property is automatically changed without having to be handled by the
My opinion is that the service should be able to refuse a property set
in some cases. For example, a property GNSSEnabled can be set true to
activate the GNSS output only if the modem is powered on. Then, I'll
need to return an error and prevent the property set if the modem is
My questions are:
1) Is there a way to do that that I haven't found (with gdbus-codegen
generated files) ?
2) Should I avoid refusing a property set and use a method call instead
to enable the output ?
3) Is it a feature to be added to gdbus-codegen ?
gtk-devel-list mailing list