aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datastore_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-07-18 21:38:14 +0000
committerChristian Grothoff <christian@grothoff.org>2009-07-18 21:38:14 +0000
commitb103d434085de5070880f3bcb025cda5fff6836d (patch)
tree789bf45f4ea9d5bd560bd76330f42dc0259b6b04 /src/include/gnunet_datastore_service.h
parent5ee114a710348292e44f1f7865095381df3166fc (diff)
downloadgnunet-b103d434085de5070880f3bcb025cda5fff6836d.tar.gz
gnunet-b103d434085de5070880f3bcb025cda5fff6836d.zip
work on datastore API implementation
Diffstat (limited to 'src/include/gnunet_datastore_service.h')
-rw-r--r--src/include/gnunet_datastore_service.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 2dcc153e6..2e55da24e 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -98,13 +98,15 @@ typedef void (*GNUNET_DATASTORE_ContinuationWithStatus)(void *cls,
98 * @param cont continuation to call when done; "success" will be set to 98 * @param cont continuation to call when done; "success" will be set to
99 * a positive reservation value if space could be reserved. 99 * a positive reservation value if space could be reserved.
100 * @param cont_cls closure for cont 100 * @param cont_cls closure for cont
101 * @param timeout how long to wait at most for a response
101 */ 102 */
102void 103void
103GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, 104GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h,
104 uint64_t amount, 105 uint64_t amount,
105 uint64_t entries, 106 uint64_t entries,
106 GNUNET_DATASTORE_ContinuationWithStatus cont, 107 GNUNET_DATASTORE_ContinuationWithStatus cont,
107 void *cont_cls); 108 void *cont_cls,
109 struct GNUNET_TIME_Relative timeout);
108 110
109 111
110/** 112/**
@@ -151,12 +153,14 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
151 * from the "reserve" function). 153 * from the "reserve" function).
152 * @param cont continuation to call when done 154 * @param cont continuation to call when done
153 * @param cont_cls closure for cont 155 * @param cont_cls closure for cont
156 * @param timeout how long to wait at most for a response
154 */ 157 */
155void 158void
156GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h, 159GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
157 int rid, 160 int rid,
158 GNUNET_DATASTORE_ContinuationWithStatus cont, 161 GNUNET_DATASTORE_ContinuationWithStatus cont,
159 void *cont_cls); 162 void *cont_cls,
163 struct GNUNET_TIME_Relative timeout);
160 164
161 165
162/** 166/**
@@ -168,6 +172,7 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
168 * @param expiration new expiration value should be MAX of existing and this argument 172 * @param expiration new expiration value should be MAX of existing and this argument
169 * @param cont continuation to call when done 173 * @param cont continuation to call when done
170 * @param cont_cls closure for cont 174 * @param cont_cls closure for cont
175 * @param timeout how long to wait at most for a response
171 */ 176 */
172void 177void
173GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, 178GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
@@ -175,7 +180,8 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
175 uint32_t priority, 180 uint32_t priority,
176 struct GNUNET_TIME_Absolute expiration, 181 struct GNUNET_TIME_Absolute expiration,
177 GNUNET_DATASTORE_ContinuationWithStatus cont, 182 GNUNET_DATASTORE_ContinuationWithStatus cont,
178 void *cont_cls); 183 void *cont_cls,
184 struct GNUNET_TIME_Relative timeout);
179 185
180 186
181/** 187/**
@@ -213,12 +219,14 @@ typedef void (*GNUNET_DATASTORE_Iterator) (void *cls,
213 * @param iter function to call on each matching value; 219 * @param iter function to call on each matching value;
214 * will be called once with a NULL value at the end 220 * will be called once with a NULL value at the end
215 * @param iter_cls closure for iter 221 * @param iter_cls closure for iter
222 * @param timeout how long to wait at most for a response
216 */ 223 */
217void 224void
218GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h, 225GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
219 const GNUNET_HashCode * key, 226 const GNUNET_HashCode * key,
220 uint32_t type, 227 uint32_t type,
221 GNUNET_DATASTORE_Iterator iter, void *iter_cls); 228 GNUNET_DATASTORE_Iterator iter, void *iter_cls,
229 struct GNUNET_TIME_Relative timeout);
222 230
223 231
224/** 232/**
@@ -229,10 +237,12 @@ GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
229 * will be called once with a value (if available) 237 * will be called once with a value (if available)
230 * and always once with a value of NULL. 238 * and always once with a value of NULL.
231 * @param iter_cls closure for iter 239 * @param iter_cls closure for iter
240 * @param timeout how long to wait at most for a response
232 */ 241 */
233void 242void
234GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h, 243GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
235 GNUNET_DATASTORE_Iterator iter, void *iter_cls); 244 GNUNET_DATASTORE_Iterator iter, void *iter_cls,
245 struct GNUNET_TIME_Relative timeout);
236 246
237 247
238/** 248/**
@@ -244,13 +254,15 @@ GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
244 * @param data content stored 254 * @param data content stored
245 * @param cont continuation to call when done 255 * @param cont continuation to call when done
246 * @param cont_cls closure for cont 256 * @param cont_cls closure for cont
257 * @param timeout how long to wait at most for a response
247 */ 258 */
248void 259void
249GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, 260GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
250 const GNUNET_HashCode *key, 261 const GNUNET_HashCode *key,
251 uint32_t size, const void *data, 262 uint32_t size, const void *data,
252 GNUNET_DATASTORE_ContinuationWithStatus cont, 263 GNUNET_DATASTORE_ContinuationWithStatus cont,
253 void *cont_cls); 264 void *cont_cls,
265 struct GNUNET_TIME_Relative timeout);
254 266
255 267
256#if 0 /* keep Emacsens' auto-indent happy */ 268#if 0 /* keep Emacsens' auto-indent happy */