summaryrefslogtreecommitdiff
path: root/toxcore/group.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/group.h')
-rw-r--r--toxcore/group.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/toxcore/group.h b/toxcore/group.h
index aa888b33..1a51f83b 100644
--- a/toxcore/group.h
+++ b/toxcore/group.h
@@ -117,8 +117,7 @@ typedef struct {
117 void *group_namelistchange_userdata; 117 void *group_namelistchange_userdata;
118 118
119 struct { 119 struct {
120 int (*function)(Messenger *m, int, int, const uint8_t *, uint16_t, void *); 120 int (*function)(void *, int, int, void *, const uint8_t *, uint16_t);
121 void *userdata;
122 } lossy_packethandlers[256]; 121 } lossy_packethandlers[256];
123} Group_Chats; 122} Group_Chats;
124 123
@@ -231,9 +230,11 @@ int group_names(const Group_Chats *g_c, int groupnumber, uint8_t names[][MAX_NAM
231/* Set handlers for custom lossy packets. 230/* Set handlers for custom lossy packets.
232 * 231 *
233 * NOTE: Handler must return 0 if packet is to be relayed, -1 if the packet should not be relayed. 232 * NOTE: Handler must return 0 if packet is to be relayed, -1 if the packet should not be relayed.
233 *
234 * Function(void *group object (set with group_set_object), int groupnumber, int friendgroupnumber, void *group peer object (set with group_peer_set_object), const uint8_t *packet, uint16_t length)
234 */ 235 */
235void group_lossy_packet_registerhandler(Group_Chats *g_c, uint8_t byte, int (*function)(Messenger *m, int, int, 236void group_lossy_packet_registerhandler(Group_Chats *g_c, uint8_t byte, int (*function)(void *, int, int, void *,
236 const uint8_t *, uint16_t, void *), void *userdata); 237 const uint8_t *, uint16_t));
237 238
238/* High level function to send custom lossy packets. 239/* High level function to send custom lossy packets.
239 * 240 *