diff options
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r-- | toxcore/tox.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index fa53e693..1d7118be 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -153,6 +153,20 @@ int tox_sendaction(void *tox, int friendnumber, uint8_t *action, uint32_t length | |||
153 | return m_sendaction(m, friendnumber, action, length); | 153 | return m_sendaction(m, friendnumber, action, length); |
154 | } | 154 | } |
155 | 155 | ||
156 | /* Set friendnumber's nickname. | ||
157 | * name must be a string of maximum MAX_NAME_LENGTH length. | ||
158 | * length must be at least 1 byte. | ||
159 | * length is the length of name with the NULL terminator. | ||
160 | * | ||
161 | * return 0 if success. | ||
162 | * return -1 if failure. | ||
163 | */ | ||
164 | int tox_setfriendname(void *tox, int friendnumber, uint8_t *name, uint16_t length) | ||
165 | { | ||
166 | Messenger *m = tox; | ||
167 | return setfriendname(m, friendnumber, name, length); | ||
168 | } | ||
169 | |||
156 | /* Set our nickname. | 170 | /* Set our nickname. |
157 | * name must be a string of maximum MAX_NAME_LENGTH length. | 171 | * name must be a string of maximum MAX_NAME_LENGTH length. |
158 | * length must be at least 1 byte. | 172 | * length must be at least 1 byte. |