tox-weechat/src/tox-weechat-identities.h

61 lines
1.4 KiB
C
Raw Normal View History

#ifndef TOX_WEECHAT_IDENTITIES_H
#define TOX_WEECHAT_IDENTITIES_H
2014-09-02 13:59:07 +02:00
2014-09-07 03:04:42 +02:00
#include <stdint.h>
2014-09-02 13:59:07 +02:00
enum t_tox_weechat_identity_option
{
TOX_WEECHAT_IDENTITY_OPTION_SAVEFILE = 0,
TOX_WEECHAT_IDENTITY_OPTION_AUTOCONNECT,
TOX_WEECHAT_IDENTITY_OPTION_MAX_FRIEND_REQUESTS,
TOX_WEECHAT_IDENTITY_NUM_OPTIONS,
};
struct t_tox_weechat_identity
{
2014-09-07 03:04:42 +02:00
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 t_gui_buffer *buffer;
int is_connected;
2014-09-07 03:04:42 +02:00
struct t_tox_weechat_chat *chats;
struct t_tox_weechat_chat *last_chat;
struct t_tox_weechat_friend_request *friend_requests;
struct t_tox_weechat_friend_request *last_friend_request;
unsigned int friend_request_count;
struct t_tox_weechat_identity *next_identity;
struct t_tox_weechat_identity *prev_identity;
};
extern struct t_tox_weechat_identity *tox_weechat_identities;
2014-09-07 03:04:42 +02:00
extern struct t_tox_weechat_identity *tox_weechat_last_identity;
struct t_tox_weechat_identity *
tox_weechat_identity_new(const char *name);
2014-09-02 13:59:07 +02:00
void
tox_weechat_identity_connect(struct t_tox_weechat_identity *identity);
2014-09-07 03:04:42 +02:00
2014-09-08 03:01:29 +02:00
struct t_tox_weechat_identity *
tox_weechat_identity_for_buffer(struct t_gui_buffer *buffer);
void
tox_weechat_identity_free(struct t_tox_weechat_identity *identity);
void
tox_weechat_identity_free_all();
2014-09-02 13:59:07 +02:00
#endif // TOX_WEECHAT_IDENTITIES_H