aboutsummaryrefslogtreecommitdiff
path: root/src/action.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-11-24 15:14:05 +0100
committerFederico Angelilli <code@fedang.net>2024-11-24 15:14:05 +0100
commitab8a774df0ebc88c4b16377547366b01134b041c (patch)
tree0d34c311276c271e16fe9d8ef842fc960bda8334 /src/action.h
parentb260d5beb9fab0c39f18be677e70b35e988d3c1d (diff)
Add actions
Diffstat (limited to 'src/action.h')
-rw-r--r--src/action.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/action.h b/src/action.h
new file mode 100644
index 0000000..02ca1b8
--- /dev/null
+++ b/src/action.h
@@ -0,0 +1,31 @@
+#ifndef COMET_ACTION_H
+#define COMET_ACTION_H
+
+#include "config.h"
+
+//typedef enum {
+// ACTION_SET,
+// ACTION_RUN,
+//} action_type_t;
+
+typedef struct {
+ //action_type_t type;
+ char *key;
+ char *value;
+} action_part_t;
+
+struct action {
+ char *label;
+ action_part_t *parts;
+ size_t length;
+};
+
+typedef struct action action_t;
+
+void action_perform(action_t *action, block_t *block, config_t *config);
+
+int action_validate(action_t *action, config_t *config);
+
+void action_free(action_t *action);
+
+#endif