diff options
author | irungentoo <irungentoo@gmail.com> | 2014-10-04 16:49:17 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-10-04 16:49:17 -0400 |
commit | 5555f01e279a1e514584a62e709c4ef1b8d57ecd (patch) | |
tree | 4f682b902ce248e8652db372e4a5b8001aef4954 /toxcore/friend_requests.h | |
parent | cafbdd5d9443aa61094af99e609f369671466447 (diff) |
Send friend request with connection if for some reason (groupchats) we
are already connected to the friend but they have not added us yet.
Diffstat (limited to 'toxcore/friend_requests.h')
-rw-r--r-- | toxcore/friend_requests.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/toxcore/friend_requests.h b/toxcore/friend_requests.h index c3e31f36..b7e07af4 100644 --- a/toxcore/friend_requests.h +++ b/toxcore/friend_requests.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #ifndef FRIEND_REQUESTS_H | 24 | #ifndef FRIEND_REQUESTS_H |
25 | #define FRIEND_REQUESTS_H | 25 | #define FRIEND_REQUESTS_H |
26 | 26 | ||
27 | #include "onion_client.h" | 27 | #include "friend_connection.h" |
28 | 28 | ||
29 | #define MAX_FRIEND_REQUEST_DATA_SIZE (ONION_CLIENT_MAX_DATA_SIZE - (1 + sizeof(uint32_t))) | 29 | #define MAX_FRIEND_REQUEST_DATA_SIZE (ONION_CLIENT_MAX_DATA_SIZE - (1 + sizeof(uint32_t))) |
30 | 30 | ||
@@ -47,12 +47,6 @@ typedef struct { | |||
47 | uint16_t received_requests_index; | 47 | uint16_t received_requests_index; |
48 | } Friend_Requests; | 48 | } Friend_Requests; |
49 | 49 | ||
50 | /* Try to send a friendrequest to peer with public_key. | ||
51 | * data is the data in the request and length is the length. | ||
52 | * Maximum length of data is MAX_FRIEND_REQUEST_DATA_SIZE. | ||
53 | */ | ||
54 | int send_friendrequest(const Onion_Client *onion_c, const uint8_t *public_key, uint32_t nospam_num, const uint8_t *data, | ||
55 | uint32_t length); | ||
56 | /* Set and get the nospam variable used to prevent one type of friend request spam. */ | 50 | /* Set and get the nospam variable used to prevent one type of friend request spam. */ |
57 | void set_nospam(Friend_Requests *fr, uint32_t num); | 51 | void set_nospam(Friend_Requests *fr, uint32_t num); |
58 | uint32_t get_nospam(const Friend_Requests *fr); | 52 | uint32_t get_nospam(const Friend_Requests *fr); |
@@ -77,7 +71,7 @@ void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, const | |||
77 | void set_filter_function(Friend_Requests *fr, int (*function)(const uint8_t *, void *), void *userdata); | 71 | void set_filter_function(Friend_Requests *fr, int (*function)(const uint8_t *, void *), void *userdata); |
78 | 72 | ||
79 | /* Sets up friendreq packet handlers. */ | 73 | /* Sets up friendreq packet handlers. */ |
80 | void friendreq_init(Friend_Requests *fr, Onion_Client *onion_c); | 74 | void friendreq_init(Friend_Requests *fr, Friend_Connections *fr_c); |
81 | 75 | ||
82 | 76 | ||
83 | #endif | 77 | #endif |