diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-20 17:58:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-20 17:58:46 +0000 |
commit | c1ff578c693e4e45125ead915dc515bb141883ec (patch) | |
tree | e4573d2a5cc18aca5bcf3942a3fc267ef13fbc28 /src/include/gnunet_namestore_service.h | |
parent | 379bca7ce074b828fc09f592fcae2e94945da6cd (diff) | |
download | gnunet-c1ff578c693e4e45125ead915dc515bb141883ec.tar.gz gnunet-c1ff578c693e4e45125ead915dc515bb141883ec.zip |
-allow namestore to monitor ALL zones, and to optionally only monitor changes
Diffstat (limited to 'src/include/gnunet_namestore_service.h')
-rw-r--r-- | src/include/gnunet_namestore_service.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index c85330681..9aa51ca11 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -247,15 +247,20 @@ typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls); | |||
247 | 247 | ||
248 | 248 | ||
249 | /** | 249 | /** |
250 | * Begin monitoring a zone for changes. Will first call the @a monitor function | 250 | * Begin monitoring a zone for changes. Will first call the @a |
251 | * on all existing records in the selected zone(s), then calls @a sync_cb, | 251 | * monitor function on all existing records in the selected zone(s) if |
252 | * and then calls the @a monitor whenever a record changes. If the namestore | 252 | * @a iterate_first is #GNUNET_YES. In any case, we will then call @a |
253 | * disconnects, the @a monitor function is called with a disconnect event; if | 253 | * sync_cb, and then afterwards call the @a monitor whenever a record |
254 | * the connection is re-established, the process begins from the start (all | 254 | * changes. If the namestore disconnects, the @a monitor function is |
255 | * existing records, sync, then updates). | 255 | * called with a disconnect event; if the connection is |
256 | * re-established, the process begins from the start (depending on @a | ||
257 | * iterate_first, we first do all existing records, then @a sync, then | ||
258 | * updates). | ||
256 | * | 259 | * |
257 | * @param cfg configuration to use to connect to namestore | 260 | * @param cfg configuration to use to connect to namestore |
258 | * @param zone zone to monitor | 261 | * @param zone zone to monitor, NULL for all zones |
262 | * @param iterate_first #GNUNET_YES to first iterate over all existing records, | ||
263 | * #GNUNET_NO to only return changes that happen from now on | ||
259 | * @param monitor function to call on zone changes | 264 | * @param monitor function to call on zone changes |
260 | * @param sync_cb function called when we're in sync with the namestore | 265 | * @param sync_cb function called when we're in sync with the namestore |
261 | * @param cls closure for @a monitor and @a sync_cb | 266 | * @param cls closure for @a monitor and @a sync_cb |
@@ -264,6 +269,7 @@ typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls); | |||
264 | struct GNUNET_NAMESTORE_ZoneMonitor * | 269 | struct GNUNET_NAMESTORE_ZoneMonitor * |
265 | GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 270 | GNUNET_NAMESTORE_zone_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
266 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 271 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
272 | int iterate_first, | ||
267 | GNUNET_NAMESTORE_RecordMonitor monitor, | 273 | GNUNET_NAMESTORE_RecordMonitor monitor, |
268 | GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb, | 274 | GNUNET_NAMESTORE_RecordsSynchronizedCallback sync_cb, |
269 | void *cls); | 275 | void *cls); |