Commit: a1bde349db6bdb483f0396d1ba79f9078a3df431
Parent: f72fd8265000bbd5e3bf4b705576cf046ca2c8a5
Author: Vlad Pruteanu <vlad.pruteanu@nxp.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-09-09 19:06:19
Tree: 686ad4e18ebb44b780547aadb4dbb1bbd4dba287

gdbus: Add g_dbus_proxy_set_property_dict This adds a new gdbus function to allow for the setting of a dictionary-type property (a{sv}). It receives the name of the property, the name of the first entry to be set from the dictionary, it's type and value, followed by the second pair of entry_name, type, value, and so on, marking the end of the entries with NULL. Additionally, if the type is an array, the type of the array and it's length must also be proviedd. These values are passed as a dict entry, to the set method associated with the property. There, it must be parsed and the appropriate entry updated. Example of usage: g_dbus_proxy_set_property_dict(proxy, "dict_property_name", cb, user_data, NULL, "entry_1", DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, value_1_len, value_1, "entry_2", DBUS_TYPE_BYTE, value_2, NULL)

Diffstat

M gdbus/client.c | 115 ++++++++++++++++++++++++++++++++++++++++
M gdbus/gdbus.h | 6 ++++++

2 files changed, 121 insertions(+), 0 deletions(-)

View Full Diff | Patch