]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_distributed.h
frsh marshal
[frescor/frsh-include.git] / frsh_distributed.h
index 9796c8c0f91ee29101881163b8c466ee3ebfa7a5..e5dfb66fe3ecd18221c6c7da0a20ffd3a575fe2b 100644 (file)
@@ -316,9 +316,22 @@ int frsh_contract_set_protocol_info(frsh_protocol_info_t protocol_info,
  *
  * We get protocol info from the contract
  **/
-int frsh_contract_get_protocol_info(frsh_contract_t contract,
+int frsh_contract_get_protocol_info(frsh_contract_t *contract,
                                     frsh_protocol_info_t *protocol_info);
 
+/**
+ * frsh_contract_marshal
+ *
+ * Convert a contract to a sequence of bytes of minimum size so it can
+ * be sent through the network with the minimum amount of bytes.
+ *
+ **/
+
+int frsh_contract_marshal(const frsh_contract_t *contract,
+                          unsigned char         *buffer,
+                          const size_t          buffer_size,
+                          size_t                *size);
+
 /*@}*/
 
 //////////////////////////////////////////////////////////////////////