#endif
-/**
- * Function called by for each matching record.
- *
- * @param cls closure
- * @param peer peer identity
- * @param sub_system name of the GNUnet sub system responsible
- * @param value stored value
- * @param size size of stored value
- */
-typedef void (*GNUNET_PEERSTORE_RecordIterator) (void *cls,
- const char *sub_system,
- const struct GNUNET_PeerIdentity *peer,
- const char *key,
- const void *value,
- size_t size);
-
/**
* @brief struct returned by the initialization function of the plugin
*/
const char *key,
const void *value,
size_t size,
- struct GNUNET_TIME_Absolute expiry);
+ struct GNUNET_TIME_Absolute expiry,
+ enum GNUNET_PEERSTORE_StoreOption options);
/**
* Iterate over the records given an optional peer id
const char *sub_system,
const struct GNUNET_PeerIdentity *peer,
const char *key,
- GNUNET_PEERSTORE_RecordIterator iter, void *iter_cls);
+ GNUNET_PEERSTORE_Processor iter, void *iter_cls);
+
+ /**
+ * Delete expired records (expiry < now)
+ *
+ * @param cls closure (internal context for the plugin)
+ * @param now time to use as reference
+ * @return number of records deleted
+ */
+ int
+ (*expire_records) (void *cls,
+ struct GNUNET_TIME_Absolute now);
};