summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r--toxcore/Messenger.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h
index 833e6b2b..8a4686f1 100644
--- a/toxcore/Messenger.h
+++ b/toxcore/Messenger.h
@@ -28,6 +28,7 @@
28#include "friend_connection.h" 28#include "friend_connection.h"
29#include "friend_requests.h" 29#include "friend_requests.h"
30#include "logger.h" 30#include "logger.h"
31#include "net_crypto.h"
31 32
32#define MAX_NAME_LENGTH 128 33#define MAX_NAME_LENGTH 128
33/* TODO(irungentoo): this must depend on other variable. */ 34/* TODO(irungentoo): this must depend on other variable. */
@@ -49,30 +50,6 @@ typedef enum Message_Type {
49 MESSAGE_ACTION 50 MESSAGE_ACTION
50} Message_Type; 51} Message_Type;
51 52
52/* NOTE: Packet ids below 24 must never be used. */
53#define PACKET_ID_ONLINE 24
54#define PACKET_ID_OFFLINE 25
55#define PACKET_ID_NICKNAME 48
56#define PACKET_ID_STATUSMESSAGE 49
57#define PACKET_ID_USERSTATUS 50
58#define PACKET_ID_TYPING 51
59#define PACKET_ID_MESSAGE 64
60#define PACKET_ID_ACTION (PACKET_ID_MESSAGE + MESSAGE_ACTION) // 65
61#define PACKET_ID_MSI 69
62#define PACKET_ID_FILE_SENDREQUEST 80
63#define PACKET_ID_FILE_CONTROL 81
64#define PACKET_ID_FILE_DATA 82
65#define PACKET_ID_INVITE_CONFERENCE 96
66#define PACKET_ID_ONLINE_PACKET 97
67#define PACKET_ID_DIRECT_CONFERENCE 98
68#define PACKET_ID_MESSAGE_CONFERENCE 99
69#define PACKET_ID_LOSSY_CONFERENCE 199
70
71/* All packets starting with a byte in this range can be used for anything. */
72#define PACKET_ID_LOSSLESS_RANGE_START 160
73#define PACKET_ID_LOSSLESS_RANGE_SIZE 32
74#define PACKET_LOSSY_AV_RESERVED 8 // Number of lossy packet types at start of range reserved for A/V.
75
76typedef struct Messenger_Options { 53typedef struct Messenger_Options {
77 bool ipv6enabled; 54 bool ipv6enabled;
78 bool udp_disabled; 55 bool udp_disabled;
@@ -247,7 +224,7 @@ typedef struct Friend {
247 uint32_t num_sending_files; 224 uint32_t num_sending_files;
248 struct File_Transfers file_receiving[MAX_CONCURRENT_FILE_PIPES]; 225 struct File_Transfers file_receiving[MAX_CONCURRENT_FILE_PIPES];
249 226
250 RTP_Packet_Handler lossy_rtp_packethandlers[PACKET_LOSSY_AV_RESERVED]; 227 RTP_Packet_Handler lossy_rtp_packethandlers[PACKET_ID_RANGE_LOSSY_AV_SIZE];
251 228
252 struct Receipts *receipts_start; 229 struct Receipts *receipts_start;
253 struct Receipts *receipts_end; 230 struct Receipts *receipts_end;