forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from e29e185c03..f1df709b87
f1df709b87 feat: add ngc events 1b6c907235 refactor: Make event dispatch ordered by receive time. b7f9367f6f test: Upgrade cppcheck, fix some warnings. 766e62bc89 chore: Use `pkg_search_module` directly in cmake. 00ff078f91 cleanup: Use target_link_libraries directly in cmake. c58928cc89 chore: Add `IMPORTED_TARGET` to pkg-config packages. 895a6af122 cleanup: Remove NaCl support. 41dfb1c1c0 fix: unpack enum function names in event impl generator 447666d1a1 chore: Disable targets for cross-compilation. 572924e924 chore: Build a docker image with coverage info in it. 415cb78f5e cleanup: Some portability/warning fixes for Windows builds. 425216d9ec fix: Correct a use-after-free and fix some memory leaks. 4b1cfa3e08 refactor: Change all enum-like `#define` sequences into enums. d3c2704fa9 chore: Fix make_single_file to support core-only. 0ce46b644e refactor: Change the `TCP_PACKET_*` defines into an enum. 22cd38ad50 adopt event impl generation tool to #2392 f31ea1088a add the event impl generation tool 4e603bb613 refactor: Use `enum-from-int` rule from tokstyle. 19d8f180d6 chore: Update github actions `uses`. 6a895be0c7 test: Make esp32 build actually try to instantiate tox. 65d09c9bfb cleanup: Remove test net support. REVERT: e29e185c03 feat: add ngc events git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: f1df709b8792da4c0e946d826b11df77d565064d
This commit is contained in:
@ -43,29 +43,31 @@
|
||||
|
||||
/*** Messages. */
|
||||
|
||||
#define PACKET_ID_PADDING 0 // Denotes padding
|
||||
#define PACKET_ID_REQUEST 1 // Used to request unreceived packets
|
||||
#define PACKET_ID_KILL 2 // Used to kill connection
|
||||
typedef enum Packet_Id {
|
||||
PACKET_ID_PADDING = 0, // Denotes padding
|
||||
PACKET_ID_REQUEST = 1, // Used to request unreceived packets
|
||||
PACKET_ID_KILL = 2, // Used to kill connection
|
||||
|
||||
#define PACKET_ID_ONLINE 24
|
||||
#define PACKET_ID_OFFLINE 25
|
||||
#define PACKET_ID_NICKNAME 48
|
||||
#define PACKET_ID_STATUSMESSAGE 49
|
||||
#define PACKET_ID_USERSTATUS 50
|
||||
#define PACKET_ID_TYPING 51
|
||||
#define PACKET_ID_MESSAGE 64
|
||||
#define PACKET_ID_ACTION 65 // PACKET_ID_MESSAGE + MESSAGE_ACTION
|
||||
#define PACKET_ID_MSI 69 // Used by AV to setup calls and etc
|
||||
#define PACKET_ID_FILE_SENDREQUEST 80
|
||||
#define PACKET_ID_FILE_CONTROL 81
|
||||
#define PACKET_ID_FILE_DATA 82
|
||||
#define PACKET_ID_INVITE_GROUPCHAT 95
|
||||
#define PACKET_ID_INVITE_CONFERENCE 96
|
||||
#define PACKET_ID_ONLINE_PACKET 97
|
||||
#define PACKET_ID_DIRECT_CONFERENCE 98
|
||||
#define PACKET_ID_MESSAGE_CONFERENCE 99
|
||||
#define PACKET_ID_REJOIN_CONFERENCE 100
|
||||
#define PACKET_ID_LOSSY_CONFERENCE 199
|
||||
PACKET_ID_ONLINE = 24,
|
||||
PACKET_ID_OFFLINE = 25,
|
||||
PACKET_ID_NICKNAME = 48,
|
||||
PACKET_ID_STATUSMESSAGE = 49,
|
||||
PACKET_ID_USERSTATUS = 50,
|
||||
PACKET_ID_TYPING = 51,
|
||||
PACKET_ID_MESSAGE = 64,
|
||||
PACKET_ID_ACTION = 65, // PACKET_ID_MESSAGE + MESSAGE_ACTION
|
||||
PACKET_ID_MSI = 69, // Used by AV to setup calls and etc
|
||||
PACKET_ID_FILE_SENDREQUEST = 80,
|
||||
PACKET_ID_FILE_CONTROL = 81,
|
||||
PACKET_ID_FILE_DATA = 82,
|
||||
PACKET_ID_INVITE_GROUPCHAT = 95,
|
||||
PACKET_ID_INVITE_CONFERENCE = 96,
|
||||
PACKET_ID_ONLINE_PACKET = 97,
|
||||
PACKET_ID_DIRECT_CONFERENCE = 98,
|
||||
PACKET_ID_MESSAGE_CONFERENCE = 99,
|
||||
PACKET_ID_REJOIN_CONFERENCE = 100,
|
||||
PACKET_ID_LOSSY_CONFERENCE = 199,
|
||||
} Packet_Id;
|
||||
|
||||
/** Maximum size of receiving and sending packet buffers. */
|
||||
#define CRYPTO_PACKET_BUFFER_SIZE 32768 // Must be a power of 2
|
||||
|
Reference in New Issue
Block a user