summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-03-14 02:22:39 +0000
committeriphydf <iphydf@users.noreply.github.com>2020-03-14 13:28:42 +0000
commitcb22b3df5f0b7509a37e091360ecbb4d8a9f2873 (patch)
treedd12e81f5f61e6ec268bd03d2e6951a7abee9506 /toxcore/Messenger.c
parent11ad5471b91dc1b36552ba4e5a3ea434c8a30f5f (diff)
Fix up comments a bit to start being more uniform.
Tokstyle (check-cimple) will start enforcing comment formats at some point. It will not support arbitrary stuff in comments, and will parse them. The result can then be semantically analysed.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index e08758e7..ddd04518 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -125,7 +125,7 @@ static uint16_t address_checksum(const uint8_t *address, uint32_t len)
125 return check; 125 return check;
126} 126}
127 127
128/* Format: [real_pk (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] 128/* Format: `[real_pk (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)]`
129 * 129 *
130 * return FRIEND_ADDRESS_SIZE byte address to give to others. 130 * return FRIEND_ADDRESS_SIZE byte address to give to others.
131 */ 131 */
@@ -971,12 +971,10 @@ static int write_cryptpacket_id(const Messenger *m, int32_t friendnumber, uint8_
971 m->friendlist[friendnumber].friendcon_id), packet, length + 1, congestion_control) != -1; 971 m->friendlist[friendnumber].friendcon_id), packet, length + 1, congestion_control) != -1;
972} 972}
973 973
974/**********CONFERENCES************/ 974/** CONFERENCES */
975 975
976 976
977/* Set the callback for conference invites. 977/* Set the callback for conference invites.
978 *
979 * Function(Messenger *m, uint32_t friendnumber, uint8_t *data, uint16_t length, void *userdata)
980 */ 978 */
981void m_callback_conference_invite(Messenger *m, m_conference_invite_cb *function) 979void m_callback_conference_invite(Messenger *m, m_conference_invite_cb *function)
982{ 980{
@@ -994,12 +992,10 @@ int send_conference_invite_packet(const Messenger *m, int32_t friendnumber, cons
994 return write_cryptpacket_id(m, friendnumber, PACKET_ID_INVITE_CONFERENCE, data, length, 0); 992 return write_cryptpacket_id(m, friendnumber, PACKET_ID_INVITE_CONFERENCE, data, length, 0);
995} 993}
996 994
997/****************FILE SENDING*****************/ 995/** FILE SENDING */
998 996
999 997
1000/* Set the callback for file send requests. 998/* Set the callback for file send requests.
1001 *
1002 * Function(Tox *tox, uint32_t friendnumber, uint32_t filenumber, uint32_t filetype, uint64_t filesize, uint8_t *filename, size_t filename_length, void *userdata)
1003 */ 999 */
1004void callback_file_sendrequest(Messenger *m, m_file_recv_cb *function) 1000void callback_file_sendrequest(Messenger *m, m_file_recv_cb *function)
1005{ 1001{
@@ -1007,9 +1003,6 @@ void callback_file_sendrequest(Messenger *m, m_file_recv_cb *function)
1007} 1003}
1008 1004
1009/* Set the callback for file control requests. 1005/* Set the callback for file control requests.
1010 *
1011 * Function(Tox *tox, uint32_t friendnumber, uint32_t filenumber, unsigned int control_type, void *userdata)
1012 *
1013 */ 1006 */
1014void callback_file_control(Messenger *m, m_file_recv_control_cb *function) 1007void callback_file_control(Messenger *m, m_file_recv_control_cb *function)
1015{ 1008{
@@ -1017,9 +1010,6 @@ void callback_file_control(Messenger *m, m_file_recv_control_cb *function)
1017} 1010}
1018 1011
1019/* Set the callback for file data. 1012/* Set the callback for file data.
1020 *
1021 * Function(Tox *tox, uint32_t friendnumber, uint32_t filenumber, uint64_t position, uint8_t *data, size_t length, void *userdata)
1022 *
1023 */ 1013 */
1024void callback_file_data(Messenger *m, m_file_recv_chunk_cb *function) 1014void callback_file_data(Messenger *m, m_file_recv_chunk_cb *function)
1025{ 1015{
@@ -1027,9 +1017,6 @@ void callback_file_data(Messenger *m, m_file_recv_chunk_cb *function)
1027} 1017}
1028 1018
1029/* Set the callback for file request chunk. 1019/* Set the callback for file request chunk.
1030 *
1031 * Function(Tox *tox, uint32_t friendnumber, uint32_t filenumber, uint64_t position, size_t length, void *userdata)
1032 *
1033 */ 1020 */
1034void callback_file_reqchunk(Messenger *m, m_file_chunk_request_cb *function) 1021void callback_file_reqchunk(Messenger *m, m_file_chunk_request_cb *function)
1035{ 1022{
@@ -1766,11 +1753,7 @@ static int handle_filecontrol(Messenger *m, int32_t friendnumber, uint8_t receiv
1766 } 1753 }
1767} 1754}
1768 1755
1769/**************************************/
1770
1771/* Set the callback for msi packets. 1756/* Set the callback for msi packets.
1772 *
1773 * Function(Messenger *m, int friendnumber, uint8_t *data, uint16_t length, void *userdata)
1774 */ 1757 */
1775void m_callback_msi_packet(Messenger *m, m_msi_packet_cb *function, void *userdata) 1758void m_callback_msi_packet(Messenger *m, m_msi_packet_cb *function, void *userdata)
1776{ 1759{