diff options
author | aunsane <aunsane@gmail.com> | 2018-08-09 21:34:33 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-08-09 21:34:33 +0300 |
commit | 7258aff5987814c6a106b1e8c4bab975e34b7012 (patch) | |
tree | 0effa93c441b72cce1ad7a91bc6ca5a97d2fc5ab /protocols/Tox/libtox/src/toxcore/group.h | |
parent | eab7305c241be4d85b86601ae97b4602935b067e (diff) |
Tox: toxcore updated to v0.2.5
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/group.h')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/group.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/group.h b/protocols/Tox/libtox/src/toxcore/group.h index 9b4541c471..970cf7fb04 100644 --- a/protocols/Tox/libtox/src/toxcore/group.h +++ b/protocols/Tox/libtox/src/toxcore/group.h @@ -39,15 +39,26 @@ typedef enum Groupchat_Type { #define MAX_LOSSY_COUNT 256 +typedef struct Message_Info { + uint32_t message_number; + uint8_t message_id; +} Message_Info; + +#define MAX_LAST_MESSAGE_INFOS 8 + typedef struct Group_Peer { uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE]; uint8_t temp_pk[CRYPTO_PUBLIC_KEY_SIZE]; uint64_t last_recv; - uint32_t last_message_number; + + Message_Info + last_message_infos[MAX_LAST_MESSAGE_INFOS]; /* received messages, strictly decreasing in message_number */ + uint8_t num_last_message_infos; uint8_t nick[MAX_NAME_LENGTH]; uint8_t nick_len; + bool nick_updated; uint16_t peer_number; @@ -70,7 +81,9 @@ typedef enum Groupchat_Close_Type { typedef struct Groupchat_Close { uint8_t type; /* GROUPCHAT_CLOSE_* */ - uint8_t closest; + bool closest; /* connected to peer because it is one of our closest peers */ + bool introducer; /* connected to peer because it introduced us to the group */ + bool introduced; /* connected to peer because we introduced it to the group */ uint32_t number; uint16_t group_number; } Groupchat_Close; @@ -91,6 +104,7 @@ typedef struct Group_c { Group_Peer *group; uint32_t numpeers; + /* TODO(zugz) rename close to something more accurate - "connected"? */ Groupchat_Close close[MAX_GROUP_CONNECTIONS]; uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE]; |