PeersChanged() signal is declared but not implemented thus will
currently never be fired up at this point.
---
 src/manager.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/manager.c b/src/manager.c
index 803f6ce..b31ab4c 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -195,6 +195,25 @@ static DBusMessage *get_services(DBusConnection *conn,
        return reply;
 }
 
+static void append_peer_structs(DBusMessageIter *iter, void *user_data)
+{
+       __connman_peer_list_struct(iter);
+}
+
+static DBusMessage *get_peers(DBusConnection *conn,
+                                       DBusMessage *msg, void *data)
+{
+       DBusMessage *reply;
+
+       reply = dbus_message_new_method_return(msg);
+       if (!reply)
+               return NULL;
+
+       __connman_dbus_append_objpath_dict_array(reply,
+                                       append_peer_structs, NULL);
+       return reply;
+}
+
 static DBusMessage *connect_provider(DBusConnection *conn,
                                        DBusMessage *msg, void *data)
 {
@@ -377,6 +396,9 @@ static const GDBusMethodTable manager_methods[] = {
        { GDBUS_METHOD("GetServices",
                        NULL, GDBUS_ARGS({ "services", "a(oa{sv})" }),
                        get_services) },
+       { GDBUS_METHOD("GetPeers",
+                       NULL, GDBUS_ARGS({ "peers", "a(oa{sv})" }),
+                       get_peers) },
        { GDBUS_DEPRECATED_ASYNC_METHOD("ConnectProvider",
                              GDBUS_ARGS({ "provider", "a{sv}" }),
                              GDBUS_ARGS({ "path", "o" }),
@@ -424,6 +446,9 @@ static const GDBusSignalTable manager_signals[] = {
        { GDBUS_SIGNAL("ServicesChanged",
                        GDBUS_ARGS({ "changed", "a(oa{sv})" },
                                        { "removed", "ao" })) },
+       { GDBUS_SIGNAL("PeersChanged",
+                       GDBUS_ARGS({ "changed", "a(oa{sv})" },
+                                       { "removed", "ao" })) },
        { },
 };
 
-- 
1.8.3.2

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to