aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/protocol.h
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 22:27:21 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 22:27:21 +0200
commit933ea998820c9697ea0d43370366edd24e443b65 (patch)
treedb480f3d69eed2ef6bce0ad8921cc0f2f30ab5f6 /src/protocol.h
parentstorage_sqlite: refactoring (diff)
downloadcimple-933ea998820c9697ea0d43370366edd24e443b65.tar.gz
cimple-933ea998820c9697ea0d43370366edd24e443b65.zip
move custom message parsing to a separate module
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/protocol.h b/src/protocol.h
new file mode 100644
index 0000000..77d800b
--- /dev/null
+++ b/src/protocol.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2023 Egor Tensin <Egor.Tensin@gmail.com>
+ * This file is part of the "cimple" project.
+ * For details, see https://github.com/egor-tensin/cimple.
+ * Distributed under the MIT License.
+ */
+
+#ifndef __PROTOCOL_H__
+#define __PROTOCOL_H__
+
+#include "process.h"
+#include "run_queue.h"
+
+int msg_run_parse(const struct msg *, struct run **);
+
+int msg_new_worker_create(struct msg **);
+
+int msg_start_create(struct msg **, const struct run *);
+int msg_start_parse(const struct msg *, struct run **);
+
+int msg_finished_create(struct msg **, int run_id, const struct proc_output *);
+int msg_finished_parse(const struct msg *, int *run_id, struct proc_output *);
+
+#endif