diff options
Diffstat (limited to 'core/Messenger.h')
-rw-r--r-- | core/Messenger.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/core/Messenger.h b/core/Messenger.h index 7263901c..9ce96fb4 100644 --- a/core/Messenger.h +++ b/core/Messenger.h | |||
@@ -46,11 +46,14 @@ extern "C" { | |||
46 | to an absurdly large number later */ | 46 | to an absurdly large number later */ |
47 | 47 | ||
48 | /* add a friend | 48 | /* add a friend |
49 | set the data that will be sent along with friend request | 49 | set the data that will be sent along with friend request |
50 | client_id is the client id of the friend | 50 | client_id is the client id of the friend |
51 | data is the data and length is the length | 51 | data is the data and length is the length |
52 | returns the friend number if success | 52 | returns the friend number if success |
53 | return -1 if failure. */ | 53 | return -1 if key length is wrong. |
54 | return -2 if user's own key | ||
55 | return -3 if already a friend | ||
56 | return -4 for other*/ | ||
54 | int m_addfriend(uint8_t *client_id, uint8_t *data, uint16_t length); | 57 | int m_addfriend(uint8_t *client_id, uint8_t *data, uint16_t length); |
55 | 58 | ||
56 | 59 | ||
@@ -92,6 +95,11 @@ int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length); | |||
92 | return -1 if failure */ | 95 | return -1 if failure */ |
93 | int setname(uint8_t *name, uint16_t length); | 96 | int setname(uint8_t *name, uint16_t length); |
94 | 97 | ||
98 | /* get our nickname | ||
99 | put it in name | ||
100 | return the length of the name*/ | ||
101 | uint16_t getself_name(uint8_t *name); | ||
102 | |||
95 | /* get name of friendnumber | 103 | /* get name of friendnumber |
96 | put it in name | 104 | put it in name |
97 | name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH (128) bytes. | 105 | name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH (128) bytes. |