From c4702985a502eb80c3eae37f2b5b38fdb7e385e5 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Mon, 23 Sep 2013 04:30:24 -0400 Subject: made setfriendname part of public api --- toxcore/tox.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'toxcore/tox.c') 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 return m_sendaction(m, friendnumber, action, length); } +/* Set friendnumber's nickname. + * name must be a string of maximum MAX_NAME_LENGTH length. + * length must be at least 1 byte. + * length is the length of name with the NULL terminator. + * + * return 0 if success. + * return -1 if failure. + */ +int tox_setfriendname(void *tox, int friendnumber, uint8_t *name, uint16_t length) +{ + Messenger *m = tox; + return setfriendname(m, friendnumber, name, length); +} + /* Set our nickname. * name must be a string of maximum MAX_NAME_LENGTH length. * length must be at least 1 byte. -- cgit v1.2.3