aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dht_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_dht_service.h')
-rw-r--r--src/include/gnunet_dht_service.h75
1 files changed, 37 insertions, 38 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index d9bbccbdf..e22d2b5df 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -74,8 +74,7 @@ struct GNUNET_DHT_FindPeerHandle;
74/** 74/**
75 * Options for routing. 75 * Options for routing.
76 */ 76 */
77enum GNUNET_DHT_RouteOption 77enum GNUNET_DHT_RouteOption {
78{
79 /** 78 /**
80 * Default. Do nothing special. 79 * Default. Do nothing special.
81 */ 80 */
@@ -119,8 +118,8 @@ enum GNUNET_DHT_RouteOption
119 * @return NULL on error 118 * @return NULL on error
120 */ 119 */
121struct GNUNET_DHT_Handle * 120struct GNUNET_DHT_Handle *
122GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 121GNUNET_DHT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg,
123 unsigned int ht_len); 122 unsigned int ht_len);
124 123
125 124
126/** 125/**
@@ -129,7 +128,7 @@ GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
129 * @param handle connection to shut down 128 * @param handle connection to shut down
130 */ 129 */
131void 130void
132GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle); 131GNUNET_DHT_disconnect(struct GNUNET_DHT_Handle *handle);
133 132
134 133
135/* *************** Standard API: get and put ******************* */ 134/* *************** Standard API: get and put ******************* */
@@ -160,16 +159,16 @@ struct GNUNET_DHT_PutHandle;
160 * (size too big) 159 * (size too big)
161 */ 160 */
162struct GNUNET_DHT_PutHandle * 161struct GNUNET_DHT_PutHandle *
163GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, 162GNUNET_DHT_put(struct GNUNET_DHT_Handle *handle,
164 const struct GNUNET_HashCode *key, 163 const struct GNUNET_HashCode *key,
165 uint32_t desired_replication_level, 164 uint32_t desired_replication_level,
166 enum GNUNET_DHT_RouteOption options, 165 enum GNUNET_DHT_RouteOption options,
167 enum GNUNET_BLOCK_Type type, 166 enum GNUNET_BLOCK_Type type,
168 size_t size, 167 size_t size,
169 const void *data, 168 const void *data,
170 struct GNUNET_TIME_Absolute exp, 169 struct GNUNET_TIME_Absolute exp,
171 GNUNET_SCHEDULER_TaskCallback cont, 170 GNUNET_SCHEDULER_TaskCallback cont,
172 void *cont_cls); 171 void *cont_cls);
173 172
174 173
175/** 174/**
@@ -184,7 +183,7 @@ GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
184 * @param ph put operation to cancel ('cont' will no longer be called) 183 * @param ph put operation to cancel ('cont' will no longer be called)
185 */ 184 */
186void 185void
187GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph); 186GNUNET_DHT_put_cancel(struct GNUNET_DHT_PutHandle *ph);
188 187
189 188
190/** 189/**
@@ -234,15 +233,15 @@ typedef void
234 * @return handle to stop the async get 233 * @return handle to stop the async get
235 */ 234 */
236struct GNUNET_DHT_GetHandle * 235struct GNUNET_DHT_GetHandle *
237GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, 236GNUNET_DHT_get_start(struct GNUNET_DHT_Handle *handle,
238 enum GNUNET_BLOCK_Type type, 237 enum GNUNET_BLOCK_Type type,
239 const struct GNUNET_HashCode *key, 238 const struct GNUNET_HashCode *key,
240 uint32_t desired_replication_level, 239 uint32_t desired_replication_level,
241 enum GNUNET_DHT_RouteOption options, 240 enum GNUNET_DHT_RouteOption options,
242 const void *xquery, 241 const void *xquery,
243 size_t xquery_size, 242 size_t xquery_size,
244 GNUNET_DHT_GetIterator iter, 243 GNUNET_DHT_GetIterator iter,
245 void *iter_cls); 244 void *iter_cls);
246 245
247 246
248/** 247/**
@@ -256,9 +255,9 @@ GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
256 * to be blocked 255 * to be blocked
257 */ 256 */
258void 257void
259GNUNET_DHT_get_filter_known_results (struct GNUNET_DHT_GetHandle *get_handle, 258GNUNET_DHT_get_filter_known_results(struct GNUNET_DHT_GetHandle *get_handle,
260 unsigned int num_results, 259 unsigned int num_results,
261 const struct GNUNET_HashCode *results); 260 const struct GNUNET_HashCode *results);
262 261
263/** 262/**
264 * Stop async DHT-get. Frees associated resources. 263 * Stop async DHT-get. Frees associated resources.
@@ -266,7 +265,7 @@ GNUNET_DHT_get_filter_known_results (struct GNUNET_DHT_GetHandle *get_handle,
266 * @param get_handle GET operation to stop. 265 * @param get_handle GET operation to stop.
267 */ 266 */
268void 267void
269GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle); 268GNUNET_DHT_get_stop(struct GNUNET_DHT_GetHandle *get_handle);
270 269
271 270
272/* *************** Extended API: monitor ******************* */ 271/* *************** Extended API: monitor ******************* */
@@ -369,13 +368,13 @@ typedef void
369 * @return Handle to stop monitoring. 368 * @return Handle to stop monitoring.
370 */ 369 */
371struct GNUNET_DHT_MonitorHandle * 370struct GNUNET_DHT_MonitorHandle *
372GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle, 371GNUNET_DHT_monitor_start(struct GNUNET_DHT_Handle *handle,
373 enum GNUNET_BLOCK_Type type, 372 enum GNUNET_BLOCK_Type type,
374 const struct GNUNET_HashCode *key, 373 const struct GNUNET_HashCode *key,
375 GNUNET_DHT_MonitorGetCB get_cb, 374 GNUNET_DHT_MonitorGetCB get_cb,
376 GNUNET_DHT_MonitorGetRespCB get_resp_cb, 375 GNUNET_DHT_MonitorGetRespCB get_resp_cb,
377 GNUNET_DHT_MonitorPutCB put_cb, 376 GNUNET_DHT_MonitorPutCB put_cb,
378 void *cb_cls); 377 void *cb_cls);
379 378
380 379
381/** 380/**
@@ -386,7 +385,7 @@ GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
386 * #GNUNET_DHT_monitor_start(). 385 * #GNUNET_DHT_monitor_start().
387 */ 386 */
388void 387void
389GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle); 388GNUNET_DHT_monitor_stop(struct GNUNET_DHT_MonitorHandle *handle);
390 389
391 390
392#if 0 /* keep Emacsens' auto-indent happy */ 391#if 0 /* keep Emacsens' auto-indent happy */