mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
dbus: add dbus_dict_append_string
This commit is contained in:
parent
28f33d210d
commit
c550fb01f9
11
src/dbus.c
11
src/dbus.c
@ -37,6 +37,17 @@ static void do_debug(const char *str, void *user_data)
|
||||
l_info("%s%s", prefix, str);
|
||||
}
|
||||
|
||||
void dbus_dict_append_string(struct l_dbus_message_builder *builder,
|
||||
const char *key, const char *strval)
|
||||
{
|
||||
l_dbus_message_builder_enter_dict(builder, "sv");
|
||||
l_dbus_message_builder_append_basic(builder, 's', key);
|
||||
l_dbus_message_builder_enter_variant(builder, "s");
|
||||
l_dbus_message_builder_append_basic(builder, 's', strval);
|
||||
l_dbus_message_builder_leave_variant(builder);
|
||||
l_dbus_message_builder_leave_dict(builder);
|
||||
}
|
||||
|
||||
static void request_name_callback(struct l_dbus_message *message,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -31,5 +31,8 @@ struct l_dbus;
|
||||
|
||||
struct l_dbus *dbus_get_bus(void);
|
||||
|
||||
void dbus_dict_append_string(struct l_dbus_message_builder *builder,
|
||||
const char *key, const char *strval);
|
||||
|
||||
bool dbus_init(void);
|
||||
bool dbus_exit(void);
|
||||
|
Loading…
Reference in New Issue
Block a user