aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_dht_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-07-25 23:19:49 +0000
committerChristian Grothoff <christian@grothoff.org>2009-07-25 23:19:49 +0000
commit11b5bf96779e8a01b6e67e7375dd9420358d0625 (patch)
treeed948c9c75d794ad0e6fa5e127cf76af9b8c2d2d /src/include/gnunet_dht_service.h
parent5f3bd6f08ff9777a966d82d0b26f421b843760ee (diff)
downloadgnunet-11b5bf96779e8a01b6e67e7375dd9420358d0625.tar.gz
gnunet-11b5bf96779e8a01b6e67e7375dd9420358d0625.zip
docu
Diffstat (limited to 'src/include/gnunet_dht_service.h')
-rw-r--r--src/include/gnunet_dht_service.h72
1 files changed, 40 insertions, 32 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 9e164245d..8dcbc19c5 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -37,39 +37,46 @@ extern "C"
37#endif 37#endif
38#endif 38#endif
39 39
40// FIXME: document
40struct GNUNET_DHT_GetHandle; 41struct GNUNET_DHT_GetHandle;
41 42
42 /** 43
43 * Perform an asynchronous GET operation on the DHT identified. 44/**
44 * 45 * Perform an asynchronous GET operation on the DHT identified.
45 * @param type expected type of the response object 46 *
46 * @param key the key to look up 47 * @param type expected type of the response object
47 * @param callback function to call on each result 48 * @param key the key to look up
48 * @param closure extra argument to callback 49 * @param iter function to call on each result
49 * @return handle to stop the async get 50 * @param iter_cls closure for iter
50 */ 51 * @return handle to stop the async get
51 struct GNUNET_DHT_GetHandle * 52 */
52GNUNET_DHT_get_start) (struct GNUNET_DHT_Handle *h, 53struct GNUNET_DHT_GetHandle *
53 unsigned int type, 54GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *h,
54 const GNUNET_HashCode * key, 55 uint32_t type,
55 GNUNET_DHT_ResultProcessor callback, 56 const GNUNET_HashCode * key,
56 void *callback_cls); 57 GNUNET_DHT_Iterator iter,
57 58 void *iter_cls);
58 /** 59
59 * Stop async DHT-get. Frees associated resources. 60
60 */ 61/**
61 int GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle * record); 62 * Stop async DHT-get. Frees associated resources.
62 63 */
63 /** 64int GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *record);
64 * Perform a PUT operation on the DHT identified by 'table' storing 65
65 * a binding of 'key' to 'value'. The peer does not have to be part 66
66 * of the table (if so, we will attempt to locate a peer that is!) 67// FIXME: add continuation? expiration?
67 * 68/**
68 * @param key the key to store under 69 * Perform a PUT operation on the DHT identified by 'table' storing
69 */ 70 * a binding of 'key' to 'value'. The peer does not have to be part
70 int GNUNET_DHT_put (struct GNUNET_DHT_Handle *h, 71 * of the table (if so, we will attempt to locate a peer that is!)
71const GNUNET_HashCode * key, 72 *
72 unsigned int type, unsigned int size, const char *data); 73 * @param key the key to store under
74 */
75int GNUNET_DHT_put (struct GNUNET_DHT_Handle *h,
76 const GNUNET_HashCode * key,
77 uint32_t type,
78 uint32_t size,
79 const char *data);
73 80
74 81
75#if 0 /* keep Emacsens' auto-indent happy */ 82#if 0 /* keep Emacsens' auto-indent happy */
@@ -80,4 +87,5 @@ const GNUNET_HashCode * key,
80#endif 87#endif
81 88
82 89
83#endif /* DHT_SERVICE_API_H */ 90#endif
91/* gnunet_dht_service.h */