aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/msg.h')
-rw-r--r--include/salticidae/msg.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/salticidae/msg.h b/include/salticidae/msg.h
index 128e287..6964ab2 100644
--- a/include/salticidae/msg.h
+++ b/include/salticidae/msg.h
@@ -267,14 +267,27 @@ const size_t MsgBase<OpcodeType>::header_size =
0;
}
+#ifdef SALTICIDAE_CBINDINGS
using msg_t = salticidae::MsgBase<_opcode_t>;
+#endif
+
#else
+
+#ifdef SALTICIDAE_CBINDINGS
typedef struct msg_t msg_t;
#endif
+#endif
+
+#ifdef SALTICIDAE_CBINDINGS
extern "C" {
-void msg_new();
+msg_t *msg_new(_opcode_t opcode, bytearray_t *_moved_payload);
+datastream_t *msg_get_payload(msg_t *msg);
+const _opcode_t &msg_get_opcode(const msg_t *msg);
+void msg_free(msg_t *msg);
+
}
+#endif
#endif