From 6c125a8da3e87730411e5e390258380af91f00d2 Mon Sep 17 00:00:00 2001 From: Michael Engel Date: Fri, 3 Jan 2025 14:58:47 +0100 Subject: [PATCH] Removed node name duplication in D-Bus API Fixes: https://github.com/eclipse-bluechi/bluechi/issues/916 The structures returned by the ListUnits and ListUnitFiles API on the Controller interface repeated the node name for each unit (file) entry. This can be reduced by using a dictionary with the node name as key and the unit (file) information in the array. Signed-off-by: Michael Engel --- data/org.eclipse.bluechi.Controller.xml | 10 +- .../python/list-active-services.py | 10 +- doc/docs/api/description.md | 16 +-- src/bindings/python/bluechi/api.py | 12 +- src/bindings/python/setup.py | 2 +- src/client/method-list-unit-files.c | 111 +++++++++++------- src/client/method-list-units.c | 101 ++++++++++------ src/controller/controller.c | 101 ++++++++-------- src/libbluechi/bus/utils.c | 65 ---------- src/libbluechi/bus/utils.h | 4 +- src/libbluechi/common/protocol.h | 12 +- 11 files changed, 219 insertions(+), 225 deletions(-) diff --git a/data/org.eclipse.bluechi.Controller.xml b/data/org.eclipse.bluechi.Controller.xml index f2551fd43a..7322dff8c9 100644 --- a/data/org.eclipse.bluechi.Controller.xml +++ b/data/org.eclipse.bluechi.Controller.xml @@ -16,8 +16,7 @@ - + - +