More support for multiple identities.

This commit is contained in:
Håvard Pettersson 2014-09-07 03:04:42 +02:00
parent 76d07ed4f6
commit b60ac98a3e
14 changed files with 529 additions and 344 deletions

View file

@ -4,36 +4,24 @@
#include <stdlib.h>
#include <stdint.h>
/**
* Convert a hex string to a binary address. Return value must be freed.
*/
uint8_t *tox_weechat_hex2bin(const char *hex);
#include <tox/tox.h>
/**
* Convert a binary address to a null-terminated hex string. Must be freed.
*/
char *tox_weechat_bin2hex(const uint8_t *bin, size_t size);
void
tox_weechat_hex2bin(const char *hex, char *out);
/**
* Return a new string that is a null-terminated version of the argument. Must
* be freed.
*/
char *tox_weechat_null_terminate(const uint8_t *str, size_t length);
void
tox_weechat_bin2hex(const uint8_t *bin, size_t size, char *out);
/**
* Get the name of a friend as a null-terminated string. Must be freed.
*/
char *tox_weechat_get_name_nt(int32_t friend_number);
char *
tox_weechat_null_terminate(const uint8_t *str, size_t length);
/**
* Get the status message of a friend as a null-terminated string. Must be
* freed.
*/
char *tox_weechat_get_status_message_nt(int32_t friend_number);
char *
tox_weechat_get_name_nt(Tox *tox, int32_t friend_number);
/**
* Get the name of the user as a null-terminated string. Must be freed.
*/
char *tox_weechat_get_self_name_nt();
char *
tox_weechat_get_status_message_nt(Tox *tox, int32_t friend_number);
char *
tox_weechat_get_self_name_nt(Tox *tox);
#endif // TOX_WEECHAT_UTILS_H