3
0
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:
Rahul Rahul 2016-03-09 10:23:14 -08:00 committed by Denis Kenzior
parent 5819abdd96
commit 07f49bc02d
2 changed files with 13 additions and 0 deletions

View File

@ -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)

View File

@ -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);