diff options
Diffstat (limited to 'src/dht/gnunet-service-wdht_neighbours.h')
-rw-r--r-- | src/dht/gnunet-service-wdht_neighbours.h | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/dht/gnunet-service-wdht_neighbours.h b/src/dht/gnunet-service-wdht_neighbours.h deleted file mode 100644 index 8461d16e8..000000000 --- a/src/dht/gnunet-service-wdht_neighbours.h +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2009, 2010, 2011, 2015 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file dht/gnunet-service-wdht_neighbours.h | ||
23 | * @brief GNUnet DHT routing code | ||
24 | * @author Supriti Singh | ||
25 | */ | ||
26 | |||
27 | #ifndef GNUNET_SERVICE_WDHT_NEIGHBOURS_H | ||
28 | #define GNUNET_SERVICE_WDHT_NEIGHBOURS_H | ||
29 | |||
30 | #include "gnunet_util_lib.h" | ||
31 | #include "gnunet_block_lib.h" | ||
32 | #include "gnunet_dht_service.h" | ||
33 | |||
34 | |||
35 | /** | ||
36 | * Handle the put request from the client. | ||
37 | * | ||
38 | * @param key Key for the content | ||
39 | * @param block_type Type of the block | ||
40 | * @param options Routing options | ||
41 | * @param desired_replication_level Desired replication count | ||
42 | * @param expiration_time When does the content expire | ||
43 | * @param data Content to store | ||
44 | * @param data_size Size of content @a data in bytes | ||
45 | */ | ||
46 | void | ||
47 | GDS_NEIGHBOURS_handle_put (const struct GNUNET_HashCode *key, | ||
48 | enum GNUNET_BLOCK_Type block_type, | ||
49 | enum GNUNET_DHT_RouteOption options, | ||
50 | uint32_t desired_replication_level, | ||
51 | struct GNUNET_TIME_Absolute expiration_time, | ||
52 | const void *data, size_t data_size); | ||
53 | |||
54 | /** | ||
55 | * Handle the get request from the client file. If I am destination do | ||
56 | * datacache put and return. Else find the target friend and forward message | ||
57 | * to it. | ||
58 | * | ||
59 | * @param key Key for the content | ||
60 | * @param block_type Type of the block | ||
61 | * @param options Routing options | ||
62 | * @param desired_replication_level Desired replication count | ||
63 | */ | ||
64 | void | ||
65 | GDS_NEIGHBOURS_handle_get (const struct GNUNET_HashCode *key, | ||
66 | enum GNUNET_BLOCK_Type block_type, | ||
67 | enum GNUNET_DHT_RouteOption options, | ||
68 | uint32_t desired_replication_level); | ||
69 | |||
70 | |||
71 | /** | ||
72 | * Send the get result to requesting client. | ||
73 | * | ||
74 | * @param cls a `const struct GNUNET_HashCode *` trail identifying where to send the result to, NULL for us | ||
75 | * @param options routing options (from GET request) | ||
76 | * @param key key of the requested data. | ||
77 | * @param type block type | ||
78 | * @param put_path_length number of peers in @a put_path | ||
79 | * @param put_path path taken to put the data at its stored location. | ||
80 | * @param expiration when will this result expire? | ||
81 | * @param data payload to store | ||
82 | * @param data_size size of the @a data | ||
83 | */ | ||
84 | void | ||
85 | GDS_NEIGHBOURS_send_get_result (void *cls, | ||
86 | enum GNUNET_DHT_RouteOption options, | ||
87 | const struct GNUNET_HashCode *key, | ||
88 | enum GNUNET_BLOCK_Type type, | ||
89 | unsigned int put_path_length, | ||
90 | const struct GNUNET_PeerIdentity *put_path, | ||
91 | struct GNUNET_TIME_Absolute expiration, | ||
92 | const void *data, | ||
93 | size_t data_size); | ||
94 | |||
95 | |||
96 | /** | ||
97 | * Initialize neighbours subsystem. | ||
98 | * | ||
99 | * @return #GNUNET_OK on success, | ||
100 | * #GNUNET_SYSERR on error | ||
101 | */ | ||
102 | int | ||
103 | GDS_NEIGHBOURS_init (void); | ||
104 | |||
105 | |||
106 | /** | ||
107 | * Shutdown neighbours subsystem. | ||
108 | */ | ||
109 | void | ||
110 | GDS_NEIGHBOURS_done (void); | ||
111 | |||
112 | |||
113 | /** | ||
114 | * Get my identity | ||
115 | * | ||
116 | * @return my identity | ||
117 | */ | ||
118 | struct GNUNET_PeerIdentity | ||
119 | GDS_NEIGHBOURS_get_my_id (void); | ||
120 | |||
121 | #endif | ||