Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
if (!self->impl->render)
return -ENOTSUP;
+ // Check if this can be rendered
+ if (self->impl->can_render) {
+ r = self->impl->can_render(self->ctx, self, options, object);
+ if (r < 0)
+ goto ERROR;
+ }
+
// Store the start time
t_start = clock();
if (t_start < 0) {
// Available
int (*available)(td_ctx* ctx, td_daemon* daemon);
+ // Can Render?
+ int (*can_render)(td_ctx* ctx, td_graph* graph,
+ const td_graph_render_options* options, const char* object);
+
// Render!
int (*render)(td_ctx* ctx, td_graph* graph, const td_graph_render_options* options,
td_args* args, const char* object);