summaryrefslogtreecommitdiff
path: root/src/messageparser.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-09 19:48:35 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-09 19:48:35 +0200
commitfe4231b1dbb41f9eced8005b2e46453a81f08fa9 (patch)
tree804592a963b3c8327c57167209185e4b6d0b12ca /src/messageparser.h
parent4af6faf23308d37d1258a015ec5ad5095fc96eea (diff)
Make sure to send update messages for all create messages that was originally the result of a move message.
Diffstat (limited to 'src/messageparser.h')
-rw-r--r--src/messageparser.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/messageparser.h b/src/messageparser.h
index 85ce5cf..218f3a8 100644
--- a/src/messageparser.h
+++ b/src/messageparser.h
@@ -30,14 +30,25 @@
#include "message.h"
#include <string>
+#include <vector>
MessageList parse_msg(std::string msg);
MessageList parse_msg_client(std::string msg);
//message_t create_msg(cmd::cmd_t type, node_t node);
-std::string msg_tostring(message_t msg);
+
+//! Create a (list of) string(s) from a single message.
+//! Only the create_with_attributes message type produces more than one item in
+//! the list, namely the create message and update messages for each attribute
+//! in the node.
+std::vector<std::string> msg_tostring(message_t msg);
message_t create_msg_create(node_t node, nodeid_t insertbeforeid);
+
+//! Same as create_msg_create, but with a different type.
+message_t create_msg_create_with_attributes(node_t node,
+ nodeid_t insertbeforeid);
+
message_t create_msg_update(node_t node, const std::string &attr);
message_t create_msg_remove(node_t node);
message_t create_msg_move(nodeid_t id, nodeid_t to, nodeid_t insertbeforeid);