From 9ba3cc408e8d05f63c3ed0835bfa8e5f834d182e Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 23 Oct 2014 16:52:57 -0500 Subject: [PATCH] wiphy: Add __iwd_device_append_properties --- src/wiphy.c | 12 ++++++++++++ src/wiphy.h | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/wiphy.c b/src/wiphy.c index 29c0746d..07bf2216 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -79,6 +79,18 @@ static const char *device_get_path(struct netdev *netdev) return path; } +bool __iwd_device_append_properties(struct netdev *netdev, + struct l_dbus_message_builder *builder) +{ + l_dbus_message_builder_enter_array(builder, "{sv}"); + + dbus_dict_append_string(builder, "Name", netdev->name); + + l_dbus_message_builder_leave_array(builder); + + return true; +} + static void device_emit_added(struct netdev *netdev) { struct l_dbus *dbus = dbus_get_bus(); diff --git a/src/wiphy.h b/src/wiphy.h index 76e1977b..3fbf6261 100644 --- a/src/wiphy.h +++ b/src/wiphy.h @@ -23,9 +23,14 @@ #include #include +struct netdev; + bool wiphy_init(void); bool wiphy_exit(void); void wiphy_notify_dellink(uint32_t index); void wiphy_set_ssid(const char *ssid); + +bool __iwd_device_append_properties(struct netdev *netdev, + struct l_dbus_message_builder *builder);