1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-04 06:36:46 +02:00

API update

This commit is contained in:
Jfreegman
2014-03-18 21:48:26 -04:00
parent 8bea44a44c
commit 50a37495f8
12 changed files with 86 additions and 94 deletions

View File

@ -100,7 +100,7 @@ void prompt_update_statusmessage(ToxWindow *prompt, uint8_t *statusmsg, uint16_t
}
/* Updates own status in prompt statusbar */
void prompt_update_status(ToxWindow *prompt, TOX_USERSTATUS status)
void prompt_update_status(ToxWindow *prompt, uint8_t status)
{
StatusBar *statusbar = prompt->stb;
statusbar->status = status;
@ -389,7 +389,7 @@ static void prompt_onInit(ToxWindow *self, Tox *m)
wclrtoeol(self->window);
}
static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , uint8_t status)
static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum , uint8_t status)
{
if (friendnum < 0)
return;
@ -434,7 +434,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , u
}
}
static void prompt_onFriendRequest(ToxWindow *self, uint8_t *key, uint8_t *data, uint16_t length)
static void prompt_onFriendRequest(ToxWindow *self, Tox *m, uint8_t *key, uint8_t *data, uint16_t length)
{
/* make sure message data is null-terminated */
data[length - 1] = 0;
@ -476,9 +476,9 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
uint8_t statusmsg[MAX_STR_SIZE];
pthread_mutex_lock(&Winthread.lock);
tox_get_self_name(m, nick, TOX_MAX_NAME_LENGTH);
tox_get_self_name(m, nick);
tox_get_self_status_message(m, statusmsg, MAX_STR_SIZE);
TOX_USERSTATUS status = tox_get_self_user_status(m);
uint8_t status = tox_get_self_user_status(m);
pthread_mutex_unlock(&Winthread.lock);
snprintf(statusbar->nick, sizeof(statusbar->nick), "%s", nick);