summaryrefslogtreecommitdiff
path: root/toxcore/friend_requests.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/friend_requests.h')
-rw-r--r--toxcore/friend_requests.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/friend_requests.h b/toxcore/friend_requests.h
index 8f25d4c1..429ffbad 100644
--- a/toxcore/friend_requests.h
+++ b/toxcore/friend_requests.h
@@ -26,6 +26,8 @@
26 26
27#include "onion_client.h" 27#include "onion_client.h"
28 28
29#define MAX_FRIEND_REQUEST_DATA_SIZE (ONION_CLIENT_MAX_DATA_SIZE - (1 + sizeof(uint32_t)))
30
29typedef struct { 31typedef struct {
30 uint32_t nospam; 32 uint32_t nospam;
31 void (*handle_friendrequest)(void *, uint8_t *, uint8_t *, uint16_t, void *); 33 void (*handle_friendrequest)(void *, uint8_t *, uint8_t *, uint16_t, void *);
@@ -46,7 +48,8 @@ typedef struct {
46} Friend_Requests; 48} Friend_Requests;
47 49
48/* Try to send a friendrequest to peer with public_key. 50/* Try to send a friendrequest to peer with public_key.
49 * data is the data in the request and length is the length. 51 * data is the data in the request and length is the length.
52 * Maximum length of data is MAX_FRIEND_REQUEST_DATA_SIZE.
50 */ 53 */
51int send_friendrequest(Onion_Client *onion_c, uint8_t *public_key, uint32_t nospam_num, uint8_t *data, uint32_t length); 54int send_friendrequest(Onion_Client *onion_c, uint8_t *public_key, uint32_t nospam_num, uint8_t *data, uint32_t length);
52/* Set and get the nospam variable used to prevent one type of friend request spam. */ 55/* Set and get the nospam variable used to prevent one type of friend request spam. */