init


Description:

[ CCode ( cname = "tp_dbus_properties_mixin_class_init" ) ]
public static void init (ObjectClass cls, size_t offset)

Initialize the class cls to use the D-Bus Properties mixin.

The given struct member, of size sizeof(TpDBusPropertiesMixinClass), will be used to store property implementation information.

Each property and each interface must have been declared as a member of a GInterface implemented by cls, using svc_interface_set_dbus_properties_info.

Before calling this function, the array interfaces must have been placed in the DBusPropertiesMixinClass structure; if it would be empty, it may instead be null.

This function should be called from the class_init callback in such a way that it will only be called once, even if the class is subclassed.

Changed in 0.7.9: TpDBusPropertiesMixinClass::interfaces may now be null, which means that only interfaces whose properties are set up using tp_dbus_properties_mixin_implement_interface will be used.

Changed in 0.7.15: offset may now be 0, in which case the DBusPropertiesMixinClass can be omitted from cls. It is treated as if it were present, but with all fields (including TpDBusPropertiesMixinClass::interfaces) being null, so only interfaces whose properties are set using tp_dbus_properties_mixin_implement_interface will be used.

Parameters:

cls

a subclass of ObjectClass

offset

the offset within cls of a TpDBusPropertiesMixinClass structure




2022 vala-language.org