summaryrefslogtreecommitdiff
path: root/core/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/Messenger.h')
-rw-r--r--core/Messenger.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/core/Messenger.h b/core/Messenger.h
index ae8ace16..1032d8d8 100644
--- a/core/Messenger.h
+++ b/core/Messenger.h
@@ -23,19 +23,25 @@ int m_delfriend(int friendnumber);
23 23
24//return 1 if friend is online 24//return 1 if friend is online
25//return 0 if he is not 25//return 0 if he is not
26int m_friendonline(int friendnumber); 26int m_friendstatus(int friendnumber);
27 27
28 28
29//send a text chat message to a friend. 29//send a text chat message to a friend.
30int m_sendmessage(int friendnumber); 30int m_sendmessage(int friendnumber, uint8_t * message, uint32_t length);
31 31
32//set the data that will be sent along with friend requests
33//return -1 if failure
34//return 0 if success
35int m_setinfo(uint8_t * data, uint16_t length);
32 36
33//set the function that will be executed when a friend request is recieved. 37//set the function that will be executed when a friend request is received.
34int m_callback_friendrequest(); 38//function format is function(uint8_t * public_key, uint8_t * data, uint16_t length)
39int m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t));
35 40
36 41
37//set the function that will be executed when a message from a friend is recieved. 42//set the function that will be executed when a message from a friend is received.
38int m_callback_friendmessage(); 43//function format is: function(int friendnumber, uint8_t * message, uint32_t length)
44int m_callback_friendmessage(void (*function)(int, uint8_t *, uint16_t));
39 45
40 46
41//run this at startup 47//run this at startup