diff options
author | Jfreegman <Jfreegman@gmail.com> | 2013-09-23 04:30:24 -0400 |
---|---|---|
committer | Jfreegman <Jfreegman@gmail.com> | 2013-09-23 04:30:24 -0400 |
commit | c4702985a502eb80c3eae37f2b5b38fdb7e385e5 (patch) | |
tree | f3b8f04df19f933b379b551c02664352c51d52e9 /toxcore/tox.c | |
parent | 59170c7d014c79eab268ebef39d0b20809602903 (diff) |
made setfriendname part of public api
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. |