diff options
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r-- | toxcore/Messenger.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 6943475f..26704dd1 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #define MESSENGER_H | 27 | #define MESSENGER_H |
28 | 28 | ||
29 | #include "friend_requests.h" | 29 | #include "friend_requests.h" |
30 | #include "LAN_discovery.h" | ||
31 | #include "friend_connection.h" | 30 | #include "friend_connection.h" |
32 | 31 | ||
33 | #define MAX_NAME_LENGTH 128 | 32 | #define MAX_NAME_LENGTH 128 |
@@ -71,6 +70,7 @@ typedef struct { | |||
71 | uint8_t udp_disabled; | 70 | uint8_t udp_disabled; |
72 | TCP_Proxy_Info proxy_info; | 71 | TCP_Proxy_Info proxy_info; |
73 | uint16_t port_range[2]; | 72 | uint16_t port_range[2]; |
73 | uint16_t tcp_server_port; | ||
74 | } Messenger_Options; | 74 | } Messenger_Options; |
75 | 75 | ||
76 | 76 | ||
@@ -220,6 +220,7 @@ struct Messenger { | |||
220 | 220 | ||
221 | Friend_Connections *fr_c; | 221 | Friend_Connections *fr_c; |
222 | 222 | ||
223 | TCP_Server *tcp_server; | ||
223 | Friend_Requests fr; | 224 | Friend_Requests fr; |
224 | uint8_t name[MAX_NAME_LENGTH]; | 225 | uint8_t name[MAX_NAME_LENGTH]; |
225 | uint16_t name_length; | 226 | uint16_t name_length; |
@@ -232,8 +233,6 @@ struct Messenger { | |||
232 | Friend *friendlist; | 233 | Friend *friendlist; |
233 | uint32_t numfriends; | 234 | uint32_t numfriends; |
234 | 235 | ||
235 | uint32_t numonline_friends; | ||
236 | |||
237 | #define NUM_SAVED_TCP_RELAYS 8 | 236 | #define NUM_SAVED_TCP_RELAYS 8 |
238 | uint8_t has_added_relays; // If the first connection has occurred in do_messenger | 237 | uint8_t has_added_relays; // If the first connection has occurred in do_messenger |
239 | Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config | 238 | Node_format loaded_relays[NUM_SAVED_TCP_RELAYS]; // Relays loaded from config |
@@ -730,6 +729,7 @@ int send_custom_lossless_packet(const Messenger *m, int32_t friendnumber, const | |||
730 | enum { | 729 | enum { |
731 | MESSENGER_ERROR_NONE, | 730 | MESSENGER_ERROR_NONE, |
732 | MESSENGER_ERROR_PORT, | 731 | MESSENGER_ERROR_PORT, |
732 | MESSENGER_ERROR_TCP_SERVER, | ||
733 | MESSENGER_ERROR_OTHER | 733 | MESSENGER_ERROR_OTHER |
734 | }; | 734 | }; |
735 | 735 | ||
@@ -772,9 +772,6 @@ int messenger_load(Messenger *m, const uint8_t *data, uint32_t length); | |||
772 | * for copy_friendlist. */ | 772 | * for copy_friendlist. */ |
773 | uint32_t count_friendlist(const Messenger *m); | 773 | uint32_t count_friendlist(const Messenger *m); |
774 | 774 | ||
775 | /* Return the number of online friends in the instance m. */ | ||
776 | uint32_t get_num_online_friends(const Messenger *m); | ||
777 | |||
778 | /* Copy a list of valid friend IDs into the array out_list. | 775 | /* Copy a list of valid friend IDs into the array out_list. |
779 | * If out_list is NULL, returns 0. | 776 | * If out_list is NULL, returns 0. |
780 | * Otherwise, returns the number of elements copied. | 777 | * Otherwise, returns the number of elements copied. |