diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | src/include/gnunet_dht_service.h | 72 |
2 files changed, 42 insertions, 34 deletions
@@ -60,7 +60,7 @@ that would cause them to be executed and check that they are working: | |||
60 | 60 | ||
61 | 61 | ||
62 | Module features to implement: | 62 | Module features to implement: |
63 | * datacache (needed for DHT) | 63 | * DATACACHE (needed for DHT) |
64 | - implement testcases for dstore API | 64 | - implement testcases for dstore API |
65 | - implement testcases for dstore plugin | 65 | - implement testcases for dstore plugin |
66 | - implement performance tests | 66 | - implement performance tests |
@@ -83,7 +83,7 @@ Module features to implement: | |||
83 | - implement performance tests | 83 | - implement performance tests |
84 | * DHT (needed for FS) | 84 | * DHT (needed for FS) |
85 | - review DHT API | 85 | - review DHT API |
86 | - implement DHT service (needs DV, DSTORE) | 86 | - implement DHT service (needs DV, DATACACHE) |
87 | - implement DHT library | 87 | - implement DHT library |
88 | - implement testcases | 88 | - implement testcases |
89 | - implement performance tests | 89 | - implement performance tests |
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 | ||
40 | struct GNUNET_DHT_GetHandle; | 41 | struct 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 | */ |
52 | GNUNET_DHT_get_start) (struct GNUNET_DHT_Handle *h, | 53 | struct GNUNET_DHT_GetHandle * |
53 | unsigned int type, | 54 | GNUNET_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 | /** | 64 | int 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!) |
71 | const GNUNET_HashCode * key, | 72 | * |
72 | unsigned int type, unsigned int size, const char *data); | 73 | * @param key the key to store under |
74 | */ | ||
75 | int 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 */ | ||