More support for multiple identities.

This commit is contained in:
Håvard Pettersson 2014-09-07 03:04:42 +02:00
parent 76d07ed4f6
commit b60ac98a3e
14 changed files with 529 additions and 344 deletions

View file

@ -5,7 +5,7 @@
#include <tox/tox.h>
struct t_tox_friend_request
struct t_tox_weechat_friend_request
{
// public address of friend request
uint8_t address[TOX_CLIENT_ID_SIZE];
@ -13,18 +13,27 @@ struct t_tox_friend_request
// message sent with request
char *message;
// linked list pointers
struct t_tox_friend_request *next;
struct t_tox_friend_request *prev;
struct t_tox_weechat_identity *identity;
struct t_tox_weechat_friend_request *next_request;
struct t_tox_weechat_friend_request *prev_request;
};
struct t_tox_friend_request *tox_weechat_first_friend_request();
void
tox_weechat_friend_request_add(struct t_tox_weechat_identity *identity,
struct t_tox_weechat_friend_request *request);
void tox_weechat_accept_friend_request(struct t_tox_friend_request *request);
void tox_weechat_decline_friend_request(struct t_tox_friend_request *request);
struct t_tox_friend_request *tox_weechat_friend_request_with_num(unsigned int num);
void
tox_weechat_accept_friend_request(struct t_tox_weechat_friend_request *request);
void tox_weechat_friend_requests_init();
void tox_weechat_friend_requests_free();
void
tox_weechat_decline_friend_request(struct t_tox_weechat_friend_request *request);
struct t_tox_weechat_friend_request *
tox_weechat_friend_request_with_num(struct t_tox_weechat_identity *identity,
unsigned int num);
void
tox_weechat_friend_requests_free(struct t_tox_weechat_identity *identity);
#endif // TOX_WEECHAT_FRIEND_REQUESTS_H