diff options
Diffstat (limited to 'src/messageparser.h')
-rw-r--r-- | src/messageparser.h | 13 |
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); |