project_files/frontlib/net/netprotocol.h
changeset 7271 5608ac657362
parent 7269 5b0aeef8ba2a
child 7275 15f722e0b96f
--- a/project_files/frontlib/net/netprotocol.h	Thu Jun 21 21:32:12 2012 +0200
+++ b/project_files/frontlib/net/netprotocol.h	Mon Jun 25 00:42:07 2012 +0200
@@ -2,11 +2,35 @@
 #define NETPROTOCOL_H_
 
 #include "../model/team.h"
+#include "../model/cfg.h"
+#include "../model/map.h"
+
+#include <stddef.h>
 
 /**
  * Create a new team from this 23-part net message
  */
 flib_team *flib_team_from_netmsg(char **parts);
 
+/**
+ * Create a new scheme from this net message, which must have
+ * meta->modCount+meta->settingCount+1 parts.
+ */
+flib_cfg *flib_netmsg_to_cfg(flib_cfg_meta *meta, char **parts);
+
+/**
+ * Create a new map from this five-part netmsg
+ */
+flib_map *flib_netmsg_to_map(char **parts);
+
+/**
+ * Decode the drawn map data from this netmessage line.
+ *
+ * The data is first base64 decoded and then quncompress()ed.
+ * The return value is a newly allocated byte buffer, the length
+ * is written to the variable pointed to by outlen.
+ * Returns NULL on error.
+ */
+uint8_t *flib_netmsg_to_drawnmapdata(size_t *outlen, char *netmsg);
 
 #endif /* NETPROTOCOL_H_ */