--- /dev/null
+/*#############################################################################
+# #
+# collecty - A system statistics collection daemon for IPFire #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include <systemd/sd-bus.h>
+
+#include "graph-bus.h"
+
+static int collecty_graph_node_enumerator(sd_bus* bus,
+ const char* path, void* data, char*** nodes, sd_bus_error* error) {
+ //collecty_daemon* daemon = data;
+
+ // XXX TODO
+
+ return 0;
+}
+
+static int collecty_graph_object_find(sd_bus* bus, const char* path,
+ const char* interface, void* data, void** found, sd_bus_error* error) {
+#if 0
+ collecty_daemon* daemon = data;
+ collecty_graph* graph = NULL;
+ char* name = NULL;
+ int r;
+
+ // Decode the path of the requested object
+ r = sd_bus_path_decode(path, "/org/ipfire/collecty1/graph", &name);
+ if (r <= 0)
+ return 0;
+
+ // Find the graph
+ graph = collecty_daemon_get_graph_by_name(daemon, name);
+ if (!graph)
+ return 0;
+
+ // Match!
+ *found = collecy_graph_unref(graph);
+#endif
+
+ return 1;
+}
+
+static const sd_bus_vtable collecty_graph_vtable[] = {
+ SD_BUS_VTABLE_START(0),
+
+ // Operations
+ //XXX TODO
+
+ SD_BUS_VTABLE_END
+};
+
+const collecty_bus_implementation collecty_graph_bus_impl = {
+ "/org/ipfire/collecty1/graph",
+ "org.ipfire.collecty1.Graph",
+ .fallback_vtables = BUS_FALLBACK_VTABLES({collecty_graph_vtable, collecty_graph_object_find}),
+ .node_enumerator = collecty_graph_node_enumerator,
+};
--- /dev/null
+/*#############################################################################
+# #
+# collecty - A system statistics collection daemon for IPFire #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef COLLECTY_GRAPH_BUS_H
+#define COLLECTY_GRAPH_BUS_H
+
+#include "bus.h"
+
+extern const collecty_bus_implementation collecty_graph_bus_impl;
+
+#endif /* COLLECTY_GRAPH_BUS_H */