diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-09 13:20:48 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-09 13:20:48 -0400 |
commit | 4d5063852859d44547497f1d3c0b5af9c676b2ba (patch) | |
tree | e467cc6828f98fe40d8bfbbe8d3c9dc537d41122 /core/Messenger.h | |
parent | db37eca44bca126c08dff4353c9d1dab824f8030 (diff) |
Basic IM messenger backend pretty much done (You can start the GUI)
And a couple of fixes to the other parts.
Diffstat (limited to 'core/Messenger.h')
-rw-r--r-- | core/Messenger.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/Messenger.h b/core/Messenger.h index 1032d8d8..7e6a0ba0 100644 --- a/core/Messenger.h +++ b/core/Messenger.h | |||
@@ -18,6 +18,12 @@ | |||
18 | int m_addfriend(uint8_t * client_id); | 18 | int m_addfriend(uint8_t * client_id); |
19 | 19 | ||
20 | 20 | ||
21 | //add a friend without sending a friendrequest. | ||
22 | //returns the friend number if success | ||
23 | //return -1 if failure. | ||
24 | int m_addfriend_norequest(uint8_t * client_id); | ||
25 | |||
26 | |||
21 | //remove a friend | 27 | //remove a friend |
22 | int m_delfriend(int friendnumber); | 28 | int m_delfriend(int friendnumber); |
23 | 29 | ||
@@ -36,12 +42,12 @@ int m_setinfo(uint8_t * data, uint16_t length); | |||
36 | 42 | ||
37 | //set the function that will be executed when a friend request is received. | 43 | //set the function that will be executed when a friend request is received. |
38 | //function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) | 44 | //function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) |
39 | int m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t)); | 45 | void m_callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t)); |
40 | 46 | ||
41 | 47 | ||
42 | //set the function that will be executed when a message from a friend is received. | 48 | //set the function that will be executed when a message from a friend is received. |
43 | //function format is: function(int friendnumber, uint8_t * message, uint32_t length) | 49 | //function format is: function(int friendnumber, uint8_t * message, uint32_t length) |
44 | int m_callback_friendmessage(void (*function)(int, uint8_t *, uint16_t)); | 50 | void m_callback_friendmessage(void (*function)(int, uint8_t *, uint16_t)); |
45 | 51 | ||
46 | 52 | ||
47 | //run this at startup | 53 | //run this at startup |