summaryrefslogtreecommitdiff
path: root/core/Messenger.h
diff options
context:
space:
mode:
authorAstonex <softukitu@gmail.com>2013-07-31 23:02:09 +0100
committerAstonex <softukitu@gmail.com>2013-07-31 23:02:09 +0100
commitf05aa308701f33f3bf9df022a4b376deeedef235 (patch)
treec10b8a3cca6822400853bfd3bc2c5fd1cca73f83 /core/Messenger.h
parent8dfba27242ca23fca5de852541f2101568dbf7cb (diff)
parentc558cb63f6db35bd51f2f2331e21df03105ee82a (diff)
Merge remote-tracking branch 'ProjectTox/master'
Diffstat (limited to 'core/Messenger.h')
-rw-r--r--core/Messenger.h18
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*/
54int m_addfriend(uint8_t *client_id, uint8_t *data, uint16_t length); 57int 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 */
93int setname(uint8_t *name, uint16_t length); 96int 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*/
101uint16_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.