lib: fix handling global enable flag
[project/udebug.git] / udebug.h
index 0d7ea30508d32fc3af746049485426e01d2c4d0d..ae48837d09d172c2183008d39e335d5c60a49671 100644 (file)
--- a/udebug.h
+++ b/udebug.h
@@ -4,6 +4,13 @@
 struct udebug_ubus;
 typedef void (*udebug_config_cb)(struct udebug_ubus *ctx, struct blob_attr *data, bool enabled);
 
+struct udebug_ubus_ring {
+       struct udebug_buf *buf;
+       const struct udebug_buf_meta *meta;
+       unsigned int size, default_size;
+       unsigned int entries, default_entries;
+};
+
 struct udebug_ubus {
        struct ubus_context *ubus;
        struct uloop_timeout t;
@@ -14,4 +21,7 @@ struct udebug_ubus {
 
 void udebug_ubus_init(struct udebug_ubus *ctx, struct ubus_context *ubus,
                      const char *service, udebug_config_cb cb);
+void udebug_ubus_ring_init(struct udebug *ud, struct udebug_ubus_ring *ring);
+void udebug_ubus_apply_config(struct udebug *ud, struct udebug_ubus_ring *rings, int n,
+                             struct blob_attr *data, bool enabled);
 void udebug_ubus_free(struct udebug_ubus *ctx);