More support for multiple identities.

This commit is contained in:
Håvard Pettersson 2014-09-13 12:22:26 +02:00
parent edc5e16d8a
commit e7ec533944
11 changed files with 516 additions and 121 deletions

View file

@ -14,19 +14,15 @@ enum t_tox_weechat_identity_option
struct t_tox_weechat_identity
{
struct Tox *tox;
char *name;
struct t_config_option *options[TOX_WEECHAT_IDENTITY_NUM_OPTIONS];
// TODO: move to option
char *data_file_path;
unsigned int max_friend_requests;
struct Tox *tox;
struct t_gui_buffer *buffer;
struct t_hook *tox_do_timer;
int is_connected;
int tox_online;
struct t_tox_weechat_chat *chats;
struct t_tox_weechat_chat *last_chat;
@ -48,6 +44,15 @@ tox_weechat_identity_new(const char *name);
void
tox_weechat_identity_connect(struct t_tox_weechat_identity *identity);
void
tox_weechat_identity_disconnect(struct t_tox_weechat_identity *identity);
void
tox_weechat_identity_autoconnect();
struct t_tox_weechat_identity *
tox_weechat_identity_name_search(const char *name);
struct t_tox_weechat_identity *
tox_weechat_identity_for_buffer(struct t_gui_buffer *buffer);