]> git.ipfire.org Git - collecty.git/commitdiff
graphs: Add a struct with further rendering options
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Oct 2025 19:24:20 +0000 (19:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Oct 2025 19:24:20 +0000 (19:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graph-bus.c
src/daemon/graph.c
src/daemon/graph.h

index f610fe3b1f2a25fb6a0d7b24f9d99b750e3f212c..c5f51b36fc10a4a80427df1756d815d5b78af4eb 100644 (file)
@@ -96,6 +96,7 @@ ERROR:
 }
 
 static int collecty_graph_bus_render(sd_bus_message* m, void* data, sd_bus_error* error) {
+       collecty_graph_render_options options = {};
        collecty_graph* graph = data;
        sd_bus_message* reply = NULL;
        const char* object = NULL;
@@ -113,7 +114,7 @@ static int collecty_graph_bus_render(sd_bus_message* m, void* data, sd_bus_error
                object = NULL;
 
        // Render the graph
-       r = collecty_graph_render(graph, object, &buffer, &length);
+       r = collecty_graph_render(graph, object, &options, &buffer, &length);
        if (r < 0)
                goto ERROR;
 
index d227d1e8188a4beb3c9896acb15bbdb79c645e8b..5da89e23729a212c44d0fe8756570ebad04154c2 100644 (file)
@@ -167,8 +167,8 @@ ERROR:
        return r;
 }
 
-int collecty_graph_render(collecty_graph* self,
-               const char* object, char** buffer, size_t* length) {
+int collecty_graph_render(collecty_graph* self, const char* object,
+               const collecty_graph_render_options* options, char** buffer, size_t* length) {
        collecty_args* args = NULL;
        char** data = NULL;
        FILE* f = NULL;
index 37a7f49a8522f7913cd5f2940fa25238652e756c..968e48c9ab21da0bd92bc941bcbadd94463f36c2 100644 (file)
@@ -51,7 +51,11 @@ char* collecty_graph_get_bus_path(collecty_graph* self);
 int collecty_graph_require_module(collecty_graph* self,
        collecty_args* args, const char* name, const char* object);
 
-int collecty_graph_render(collecty_graph* self,
-       const char* object, char** buffer, size_t* length);
+typedef struct collecty_graph_render_options {
+       // XXX TODO
+} collecty_graph_render_options;
+
+int collecty_graph_render(collecty_graph* self, const char* object,
+       const collecty_graph_render_options* options, char** buffer, size_t* length);
 
 #endif /* COLLECTY_GRAPH_H */