summaryrefslogtreecommitdiffstats
path: root/src/json.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.h')
-rw-r--r--src/json.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/json.h b/src/json.h
index 08a78d0..0e98a6e 100644
--- a/src/json.h
+++ b/src/json.h
@@ -98,4 +98,31 @@ struct og_cmd_json {
uint32_t flags;
};
+enum og_procedure_step_type {
+ OG_STEP_COMMAND = 0,
+ OG_STEP_PROCEDURE,
+};
+
+#define OG_PROCEDURE_STEPS_MAX 256
+
+struct og_procedure_step {
+ enum og_procedure_step_type type;
+ uint32_t position;
+
+ union {
+ struct og_cmd_json cmd;
+ struct {
+ uint64_t id;
+ } procedure;
+ };
+};
+
+struct og_procedure {
+ uint64_t id;
+ struct og_procedure_step steps[OG_PROCEDURE_STEPS_MAX];
+ uint32_t num_steps;
+};
+
+int og_json_parse_procedure(json_t *element, struct og_procedure *proc);
+
#endif