summaryrefslogtreecommitdiff
path: root/core/friend_requests.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/friend_requests.h')
-rw-r--r--core/friend_requests.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/core/friend_requests.h b/core/friend_requests.h
index de116b33..29bc2b88 100644
--- a/core/friend_requests.h
+++ b/core/friend_requests.h
@@ -2,13 +2,28 @@
2 * 2 *
3 * Handle friend requests. 3 * Handle friend requests.
4 * 4 *
5 * Copyright (C) 2013 Tox project All Rights Reserved.
6 *
7 * This file is part of Tox.
8 *
9 * Tox is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * Tox is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with Tox. If not, see <http://www.gnu.org/licenses/>.
21 *
5 */ 22 */
6 23
7
8#ifndef FRIEND_REQUESTS_H 24#ifndef FRIEND_REQUESTS_H
9#define FRIEND_REQUESTS_H 25#define FRIEND_REQUESTS_H
10 26
11
12#include "DHT.h" 27#include "DHT.h"
13#include "net_crypto.h" 28#include "net_crypto.h"
14 29
@@ -20,7 +35,6 @@ extern "C" {
20 data is the data in the request and length is the length. */ 35 data is the data in the request and length is the length. */
21int send_friendrequest(uint8_t * public_key, uint8_t * data, uint32_t length); 36int send_friendrequest(uint8_t * public_key, uint8_t * data, uint32_t length);
22 37
23
24/* set the function that will be executed when a friend request for us is received. 38/* set the function that will be executed when a friend request for us is received.
25 function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) */ 39 function format is function(uint8_t * public_key, uint8_t * data, uint16_t length) */
26void callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t)); 40void callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t));
@@ -30,8 +44,6 @@ void callback_friendrequest(void (*function)(uint8_t *, uint8_t *, uint16_t));
30 return 1 if it didn't handle the packet or if the packet was shit. */ 44 return 1 if it didn't handle the packet or if the packet was shit. */
31int friendreq_handlepacket(uint8_t * packet, uint32_t length, IP_Port source); 45int friendreq_handlepacket(uint8_t * packet, uint32_t length, IP_Port source);
32 46
33
34
35#ifdef __cplusplus 47#ifdef __cplusplus
36} 48}
37#endif 49#endif