1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 19:36:45 +02:00
This commit is contained in:
Jfreegman
2014-03-17 19:58:08 -04:00
9 changed files with 533 additions and 133 deletions

View File

@ -443,16 +443,26 @@ void chat_onEnd (ToxWindow *self, ToxAv *av)
wprintw(ctx->history, "Call ended! \n");
}
void chat_onTimeout (ToxWindow *self, ToxAv *av)
void chat_onRequestTimeout (ToxWindow *self, ToxAv *av)
{
if (self->num != toxav_get_peer_id(av, 0))
return;
ChatContext *ctx = self->chatwin;
wprintw(ctx->history, "No answer! \n");
}
void chat_onPeerTimeout (ToxWindow *self, ToxAv *av)
{
if (self->num != toxav_get_peer_id(av, 0))
return;
ChatContext *ctx = self->chatwin;
wprintw(ctx->history, "Peer disconnected; call ended! \n");
}
#endif /* _SUPPORT_AUDIO */
static void send_action(ToxWindow *self, ChatContext *ctx, Tox *m, uint8_t *action) {
@ -856,7 +866,8 @@ ToxWindow new_chat(Tox *m, int friendnum)
ret.onCancel = &chat_onCancel;
ret.onReject = &chat_onReject;
ret.onEnd = &chat_onEnd;
ret.onTimeout = &chat_onTimeout;
ret.onRequestTimeout = &chat_onRequestTimeout;
ret.onPeerTimeout = &chat_onPeerTimeout;
#endif /* _SUPPORT_AUDIO */
uint8_t name[TOX_MAX_NAME_LENGTH] = {'\0'};