blob: 9d0f5e4cbca630f8789c430b019ea2f8742f6e74 [file] [log] [blame]
Harald Welte1a36f332018-06-04 17:36:33 +02001#pragma once
2
3#include <osmocom/core/linuxlist.h>
4
5/* a single node in the tree of values */
6struct value_node {
7 /* our element in the parent list */
8 struct llist_head list;
9 /* the display name */
10 const char *name;
11 /* the value (if any) */
12 const char *value;
13 /* the children (if value == NULL) */
14 struct llist_head children;
15};
16
17struct value_node *value_node_add(void *ctx, struct value_node *parent,
18 const char *name, const char *value);
Harald Welte3a964a42018-06-04 19:40:26 +020019struct value_node *value_node_find(struct value_node *parent, const char *name);
20struct value_node *value_node_find_or_add(struct value_node *parent, const char *name);
Harald Welte1a36f332018-06-04 17:36:33 +020021void value_node_del(struct value_node *node);