summaryrefslogtreecommitdiff
path: root/src/include/gnunet_namestore_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_namestore_service.h')
-rw-r--r--src/include/gnunet_namestore_service.h113
1 files changed, 60 insertions, 53 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 36221f195..a7b7c57b1 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -74,7 +74,7 @@ struct GNUNET_NAMESTORE_ZoneIterator;
74 * @return handle to use to access the service 74 * @return handle to use to access the service
75 */ 75 */
76struct GNUNET_NAMESTORE_Handle * 76struct GNUNET_NAMESTORE_Handle *
77GNUNET_NAMESTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg); 77GNUNET_NAMESTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
78 78
79 79
80/** 80/**
@@ -85,7 +85,7 @@ GNUNET_NAMESTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
85 * @param h handle to the namestore 85 * @param h handle to the namestore
86 */ 86 */
87void 87void
88GNUNET_NAMESTORE_disconnect(struct GNUNET_NAMESTORE_Handle *h); 88GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h);
89 89
90 90
91/** 91/**
@@ -125,13 +125,14 @@ typedef void
125 * @return handle to abort the request 125 * @return handle to abort the request
126 */ 126 */
127struct GNUNET_NAMESTORE_QueueEntry * 127struct GNUNET_NAMESTORE_QueueEntry *
128GNUNET_NAMESTORE_records_store(struct GNUNET_NAMESTORE_Handle *h, 128GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
129 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, 129 const struct
130 const char *label, 130 GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
131 unsigned int rd_count, 131 const char *label,
132 const struct GNUNET_GNSRECORD_Data *rd, 132 unsigned int rd_count,
133 GNUNET_NAMESTORE_ContinuationWithStatus cont, 133 const struct GNUNET_GNSRECORD_Data *rd,
134 void *cont_cls); 134 GNUNET_NAMESTORE_ContinuationWithStatus cont,
135 void *cont_cls);
135 136
136 137
137/** 138/**
@@ -145,7 +146,8 @@ GNUNET_NAMESTORE_records_store(struct GNUNET_NAMESTORE_Handle *h,
145 */ 146 */
146typedef void 147typedef void
147(*GNUNET_NAMESTORE_RecordMonitor) (void *cls, 148(*GNUNET_NAMESTORE_RecordMonitor) (void *cls,
148 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 149 const struct
150 GNUNET_CRYPTO_EcdsaPrivateKey *zone,
149 const char *label, 151 const char *label,
150 unsigned int rd_count, 152 unsigned int rd_count,
151 const struct GNUNET_GNSRECORD_Data *rd); 153 const struct GNUNET_GNSRECORD_Data *rd);
@@ -162,11 +164,11 @@ typedef void
162 * @return handle to abort the request 164 * @return handle to abort the request
163 */ 165 */
164struct GNUNET_NAMESTORE_QueueEntry * 166struct GNUNET_NAMESTORE_QueueEntry *
165GNUNET_NAMESTORE_set_nick(struct GNUNET_NAMESTORE_Handle *h, 167GNUNET_NAMESTORE_set_nick (struct GNUNET_NAMESTORE_Handle *h,
166 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, 168 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
167 const char *nick, 169 const char *nick,
168 GNUNET_NAMESTORE_ContinuationWithStatus cont, 170 GNUNET_NAMESTORE_ContinuationWithStatus cont,
169 void *cont_cls); 171 void *cont_cls);
170 172
171 173
172/** 174/**
@@ -184,13 +186,14 @@ GNUNET_NAMESTORE_set_nick(struct GNUNET_NAMESTORE_Handle *h,
184 * @return handle to abort the request 186 * @return handle to abort the request
185 */ 187 */
186struct GNUNET_NAMESTORE_QueueEntry * 188struct GNUNET_NAMESTORE_QueueEntry *
187GNUNET_NAMESTORE_records_lookup(struct GNUNET_NAMESTORE_Handle *h, 189GNUNET_NAMESTORE_records_lookup (struct GNUNET_NAMESTORE_Handle *h,
188 const struct GNUNET_CRYPTO_EcdsaPrivateKey *pkey, 190 const struct
189 const char *label, 191 GNUNET_CRYPTO_EcdsaPrivateKey *pkey,
190 GNUNET_SCHEDULER_TaskCallback error_cb, 192 const char *label,
191 void *error_cb_cls, 193 GNUNET_SCHEDULER_TaskCallback error_cb,
192 GNUNET_NAMESTORE_RecordMonitor rm, 194 void *error_cb_cls,
193 void *rm_cls); 195 GNUNET_NAMESTORE_RecordMonitor rm,
196 void *rm_cls);
194 197
195 198
196/** 199/**
@@ -211,13 +214,14 @@ GNUNET_NAMESTORE_records_lookup(struct GNUNET_NAMESTORE_Handle *h,
211 * cancel 214 * cancel
212 */ 215 */
213struct GNUNET_NAMESTORE_QueueEntry * 216struct GNUNET_NAMESTORE_QueueEntry *
214GNUNET_NAMESTORE_zone_to_name(struct GNUNET_NAMESTORE_Handle *h, 217GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h,
215 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 218 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
216 const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone, 219 const struct
217 GNUNET_SCHEDULER_TaskCallback error_cb, 220 GNUNET_CRYPTO_EcdsaPublicKey *value_zone,
218 void *error_cb_cls, 221 GNUNET_SCHEDULER_TaskCallback error_cb,
219 GNUNET_NAMESTORE_RecordMonitor proc, 222 void *error_cb_cls,
220 void *proc_cls); 223 GNUNET_NAMESTORE_RecordMonitor proc,
224 void *proc_cls);
221 225
222 226
223/** 227/**
@@ -229,7 +233,7 @@ GNUNET_NAMESTORE_zone_to_name(struct GNUNET_NAMESTORE_Handle *h,
229 * @param qe operation to cancel 233 * @param qe operation to cancel
230 */ 234 */
231void 235void
232GNUNET_NAMESTORE_cancel(struct GNUNET_NAMESTORE_QueueEntry *qe); 236GNUNET_NAMESTORE_cancel (struct GNUNET_NAMESTORE_QueueEntry *qe);
233 237
234 238
235/** 239/**
@@ -258,14 +262,15 @@ GNUNET_NAMESTORE_cancel(struct GNUNET_NAMESTORE_QueueEntry *qe);
258 * @return an iterator handle to use for iteration 262 * @return an iterator handle to use for iteration
259 */ 263 */
260struct GNUNET_NAMESTORE_ZoneIterator * 264struct GNUNET_NAMESTORE_ZoneIterator *
261GNUNET_NAMESTORE_zone_iteration_start(struct GNUNET_NAMESTORE_Handle *h, 265GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
262 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 266 const struct
263 GNUNET_SCHEDULER_TaskCallback error_cb, 267 GNUNET_CRYPTO_EcdsaPrivateKey *zone,
264 void *error_cb_cls, 268 GNUNET_SCHEDULER_TaskCallback error_cb,
265 GNUNET_NAMESTORE_RecordMonitor proc, 269 void *error_cb_cls,
266 void *proc_cls, 270 GNUNET_NAMESTORE_RecordMonitor proc,
267 GNUNET_SCHEDULER_TaskCallback finish_cb, 271 void *proc_cls,
268 void *finish_cb_cls); 272 GNUNET_SCHEDULER_TaskCallback finish_cb,
273 void *finish_cb_cls);
269 274
270 275
271/** 276/**
@@ -277,8 +282,8 @@ GNUNET_NAMESTORE_zone_iteration_start(struct GNUNET_NAMESTORE_Handle *h,
277 * (before #GNUNET_NAMESTORE_zone_iterator_next is to be called again) 282 * (before #GNUNET_NAMESTORE_zone_iterator_next is to be called again)
278 */ 283 */
279void 284void
280GNUNET_NAMESTORE_zone_iterator_next(struct GNUNET_NAMESTORE_ZoneIterator *it, 285GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it,
281 uint64_t limit); 286 uint64_t limit);
282 287
283 288
284/** 289/**
@@ -289,7 +294,7 @@ GNUNET_NAMESTORE_zone_iterator_next(struct GNUNET_NAMESTORE_ZoneIterator *it,
289 * @param it the iterator 294 * @param it the iterator
290 */ 295 */
291void 296void
292GNUNET_NAMESTORE_zone_iteration_stop(struct GNUNET_NAMESTORE_ZoneIterator *it); 297GNUNET_NAMESTORE_zone_iteration_stop (struct GNUNET_NAMESTORE_ZoneIterator *it);
293 298
294 299
295/** 300/**
@@ -326,15 +331,17 @@ struct GNUNET_NAMESTORE_ZoneMonitor;
326 * @return handle to stop monitoring 331 * @return handle to stop monitoring
327 */ 332 */
328struct GNUNET_NAMESTORE_ZoneMonitor * 333struct GNUNET_NAMESTORE_ZoneMonitor *
329GNUNET_NAMESTORE_zone_monitor_start(const struct GNUNET_CONFIGURATION_Handle *cfg, 334GNUNET_NAMESTORE_zone_monitor_start (const struct
330 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 335 GNUNET_CONFIGURATION_Handle *cfg,
331 int iterate_first, 336 const struct
332 GNUNET_SCHEDULER_TaskCallback error_cb, 337 GNUNET_CRYPTO_EcdsaPrivateKey *zone,
333 void *error_cb_cls, 338 int iterate_first,
334 GNUNET_NAMESTORE_RecordMonitor monitor, 339 GNUNET_SCHEDULER_TaskCallback error_cb,
335 void *monitor_cls, 340 void *error_cb_cls,
336 GNUNET_SCHEDULER_TaskCallback sync_cb, 341 GNUNET_NAMESTORE_RecordMonitor monitor,
337 void *sync_cb_cls); 342 void *monitor_cls,
343 GNUNET_SCHEDULER_TaskCallback sync_cb,
344 void *sync_cb_cls);
338 345
339 346
340/** 347/**
@@ -359,8 +366,8 @@ GNUNET_NAMESTORE_zone_monitor_start(const struct GNUNET_CONFIGURATION_Handle *cf
359 * (before #GNUNET_NAMESTORE_zone_monitor_next is to be called again) 366 * (before #GNUNET_NAMESTORE_zone_monitor_next is to be called again)
360 */ 367 */
361void 368void
362GNUNET_NAMESTORE_zone_monitor_next(struct GNUNET_NAMESTORE_ZoneMonitor *zm, 369GNUNET_NAMESTORE_zone_monitor_next (struct GNUNET_NAMESTORE_ZoneMonitor *zm,
363 uint64_t limit); 370 uint64_t limit);
364 371
365 372
366/** 373/**
@@ -369,7 +376,7 @@ GNUNET_NAMESTORE_zone_monitor_next(struct GNUNET_NAMESTORE_ZoneMonitor *zm,
369 * @param zm handle to the monitor activity to stop 376 * @param zm handle to the monitor activity to stop
370 */ 377 */
371void 378void
372GNUNET_NAMESTORE_zone_monitor_stop(struct GNUNET_NAMESTORE_ZoneMonitor *zm); 379GNUNET_NAMESTORE_zone_monitor_stop (struct GNUNET_NAMESTORE_ZoneMonitor *zm);
373 380
374 381
375#if 0 /* keep Emacsens' auto-indent happy */ 382#if 0 /* keep Emacsens' auto-indent happy */