summaryrefslogtreecommitdiff
path: root/toxcore/group_chats.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/group_chats.h')
-rw-r--r--toxcore/group_chats.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/toxcore/group_chats.h b/toxcore/group_chats.h
index 78a5488c..e45f2af2 100644
--- a/toxcore/group_chats.h
+++ b/toxcore/group_chats.h
@@ -31,6 +31,8 @@
31extern "C" { 31extern "C" {
32#endif 32#endif
33 33
34#define MAX_NICK_BYTES 128
35
34typedef struct { 36typedef struct {
35 uint8_t client_id[crypto_box_PUBLICKEYBYTES]; 37 uint8_t client_id[crypto_box_PUBLICKEYBYTES];
36 uint64_t pingid; 38 uint64_t pingid;
@@ -39,6 +41,9 @@ typedef struct {
39 uint64_t last_recv; 41 uint64_t last_recv;
40 uint64_t last_recv_msgping; 42 uint64_t last_recv_msgping;
41 uint32_t last_message_number; 43 uint32_t last_message_number;
44
45 uint8_t nick[MAX_NICK_BYTES];
46 uint16_t nick_len;
42} Group_Peer; 47} Group_Peer;
43 48
44typedef struct { 49typedef struct {
@@ -65,6 +70,14 @@ typedef struct Group_Chat {
65 70
66} Group_Chat; 71} Group_Chat;
67 72
73/* Copy the name of peernum to name.
74 * name must be at least MAX_NICK_BYTES long.
75 *
76 * return length of name if success
77 * return -1 if failure
78 */
79int group_peername(Group_Chat *chat, int peernum, uint8_t *name);
80
68/* 81/*
69 * Set callback function for chat messages. 82 * Set callback function for chat messages.
70 * 83 *