mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-17 09:29:22 +01:00
dbus: Add API for adding object path value to a dict
This commit is contained in:
parent
5819abdd96
commit
07f49bc02d
11
src/dbus.c
11
src/dbus.c
@ -59,6 +59,17 @@ void dbus_dict_append_bool(struct l_dbus_message_builder *builder,
|
||||
l_dbus_message_builder_leave_dict(builder);
|
||||
}
|
||||
|
||||
void dbus_dict_append_object(struct l_dbus_message_builder *builder,
|
||||
const char *key, const char *object_path)
|
||||
{
|
||||
l_dbus_message_builder_enter_dict(builder, "sv");
|
||||
l_dbus_message_builder_append_basic(builder, 's', key);
|
||||
l_dbus_message_builder_enter_variant(builder, "o");
|
||||
l_dbus_message_builder_append_basic(builder, 'o', object_path);
|
||||
l_dbus_message_builder_leave_variant(builder);
|
||||
l_dbus_message_builder_leave_dict(builder);
|
||||
}
|
||||
|
||||
void dbus_dict_append_bytearray(struct l_dbus_message_builder *builder,
|
||||
const char *key, const uint8_t *arrayval,
|
||||
const int len)
|
||||
|
@ -43,6 +43,8 @@ void dbus_dict_append_string(struct l_dbus_message_builder *builder,
|
||||
const char *key, const char *strval);
|
||||
void dbus_dict_append_bool(struct l_dbus_message_builder *builder,
|
||||
const char *key, bool boolval);
|
||||
void dbus_dict_append_object(struct l_dbus_message_builder *builder,
|
||||
const char *key, const char *object_path);
|
||||
void dbus_dict_append_bytearray(struct l_dbus_message_builder *builder,
|
||||
const char *key, const uint8_t *arrayval,
|
||||
const int len);
|
||||
|
Loading…
Reference in New Issue
Block a user