Refactoring for multi-identity support.

This commit is contained in:
Håvard Pettersson 2014-09-13 06:52:42 +02:00
parent 5a3b0cc583
commit edc5e16d8a
13 changed files with 571 additions and 433 deletions

View file

@ -5,7 +5,7 @@
#include <tox/tox.h>
#include "tox-weechat.h"
#include "tox-weechat-tox.h"
#include "tox-weechat-identities.h"
#include "tox-weechat-utils.h"
#include "tox-weechat-chats.h"
@ -65,6 +65,22 @@ tox_weechat_chat_refresh(struct t_tox_weechat_chat *chat)
free(status_message);
}
int
tox_weechat_chat_refresh_timer_callback(void *data, int remaining)
{
struct t_tox_weechat_chat *chat = data;
tox_weechat_chat_refresh(chat);
return WEECHAT_RC_OK;
}
void
tox_weechat_chat_queue_refresh(struct t_tox_weechat_chat *chat)
{
weechat_hook_timer(0, 0, 1,
tox_weechat_chat_refresh_timer_callback, chat);
}
struct t_tox_weechat_chat *
tox_weechat_friend_chat_new(struct t_tox_weechat_identity *identity,
int32_t friend_number)