aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_namestore_service.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-10-19 15:10:07 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2022-10-19 15:10:07 +0900
commit1cb34e96bc939b77f1c2461c5ce85b5f138e9ae7 (patch)
tree226abe0de7c0f5f18cede3d4ab1ed7e9c30a6c28 /src/include/gnunet_namestore_service.h
parent282b9d3694d2b3052dc0c5a971dec85e7158faca (diff)
downloadgnunet-1cb34e96bc939b77f1c2461c5ce85b5f138e9ae7.tar.gz
gnunet-1cb34e96bc939b77f1c2461c5ce85b5f138e9ae7.zip
NAMESTORE: Add records_lookup2 API for filtering and update REST API with filter functionality
Diffstat (limited to 'src/include/gnunet_namestore_service.h')
-rw-r--r--src/include/gnunet_namestore_service.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 998eb19d0..f08c4746b 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -290,6 +290,33 @@ GNUNET_NAMESTORE_records_lookup (struct GNUNET_NAMESTORE_Handle *h,
290 GNUNET_NAMESTORE_RecordMonitor rm, 290 GNUNET_NAMESTORE_RecordMonitor rm,
291 void *rm_cls); 291 void *rm_cls);
292 292
293/**
294 * Lookup an item in the namestore with GNSRECORD filter.
295 *
296 * @param h handle to the namestore
297 * @param pkey private key of the zone
298 * @param label name that is being mapped
299 * @param error_cb function to call on error (i.e. disconnect)
300 * the handle is afterwards invalid
301 * @param error_cb_cls closure for @a error_cb
302 * @param rm function to call with the result (with 0 records if we don't have that label);
303 * the handle is afterwards invalid
304 * @param rm_cls closure for @a rm
305 * @param filter the record set filter to use
306 * @return handle to abort the request
307 */
308struct GNUNET_NAMESTORE_QueueEntry *
309GNUNET_NAMESTORE_records_lookup2 (struct GNUNET_NAMESTORE_Handle *h,
310 const struct
311 GNUNET_IDENTITY_PrivateKey *pkey,
312 const char *label,
313 GNUNET_SCHEDULER_TaskCallback error_cb,
314 void *error_cb_cls,
315 GNUNET_NAMESTORE_RecordMonitor rm,
316 void *rm_cls,
317 enum GNUNET_GNSRECORD_Filter filter);
318
319
293 320
294/** 321/**
295 * Look for an existing PKEY delegation record for a given public key. 322 * Look for an existing PKEY delegation record for a given public key.
@@ -393,6 +420,7 @@ GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
393 * @param finish_cb function to call on completion 420 * @param finish_cb function to call on completion
394 * the handle is afterwards invalid 421 * the handle is afterwards invalid
395 * @param finish_cb_cls closure for @a finish_cb 422 * @param finish_cb_cls closure for @a finish_cb
423 * @param filter the record set filter to use
396 * @return an iterator handle to use for iteration 424 * @return an iterator handle to use for iteration
397 */ 425 */
398struct GNUNET_NAMESTORE_ZoneIterator * 426struct GNUNET_NAMESTORE_ZoneIterator *