aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_namestore_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_namestore_plugin.h')
-rw-r--r--src/include/gnunet_namestore_plugin.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h
index 5468513..b27867f 100644
--- a/src/include/gnunet_namestore_plugin.h
+++ b/src/include/gnunet_namestore_plugin.h
@@ -56,7 +56,7 @@ typedef void (*GNUNET_NAMESTORE_RecordIterator) (void *cls,
const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key,
struct GNUNET_TIME_Absolute expire,
const char *name,
- unsigned int rd_count,
+ unsigned int rd_len,
const struct GNUNET_NAMESTORE_RecordData *rd,
const struct GNUNET_CRYPTO_RsaSignature *signature);
@@ -85,13 +85,13 @@ struct GNUNET_NAMESTORE_PluginFunctions
* @param rd array of records with data to store
* @param signature signature of the record block, NULL if signature is unavailable (i.e.
* because the user queried for a particular record type only)
- * @return GNUNET_OK on success
+ * @return GNUNET_OK on success, else GNUNET_SYSERR
*/
int (*put_records) (void *cls,
const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key,
struct GNUNET_TIME_Absolute expire,
const char *name,
- unsigned int rd_count,
+ unsigned int rd_len,
const struct GNUNET_NAMESTORE_RecordData *rd,
const struct GNUNET_CRYPTO_RsaSignature *signature);
@@ -105,7 +105,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
* @return GNUNET_OK on success
*/
int (*remove_records) (void *cls,
- const GNUNET_HashCode *zone,
+ const struct GNUNET_CRYPTO_ShortHashCode *zone,
const char *name);
@@ -115,27 +115,44 @@ struct GNUNET_NAMESTORE_PluginFunctions
*
* @param cls closure (internal context for the plugin)
* @param zone hash of public key of the zone, NULL to iterate over all zones
- * @param name_hash hash of name, NULL to iterate over all records of the zone
+ * @param name name as '\0' terminated string, NULL to iterate over all records of the zone
* @param offset offset in the list of all matching records
* @param iter function to call with the result
* @param iter_cls closure for iter
* @return GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error
*/
int (*iterate_records) (void *cls,
- const GNUNET_HashCode *zone,
- const GNUNET_HashCode *name_hash,
+ const struct GNUNET_CRYPTO_ShortHashCode *zone,
+ const char *name,
uint64_t offset,
GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls);
/**
+ * Look for an existing PKEY delegation record for a given public key.
+ * Returns at most one result to the iterator.
+ *
+ * @param cls closure (internal context for the plugin)
+ * @param zone hash of public key of the zone to look up in, never NULL
+ * @param value_zone hash of the public key of the target zone (value), never NULL
+ * @param iter function to call with the result
+ * @param iter_cls closure for iter
+ * @return GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error
+ */
+ int (*zone_to_name) (void *cls,
+ const struct GNUNET_CRYPTO_ShortHashCode *zone,
+ const struct GNUNET_CRYPTO_ShortHashCode *value_zone,
+ GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls);
+
+
+ /**
* Delete an entire zone (all records). Not used in normal operation.
*
* @param cls closure (internal context for the plugin)
* @param zone zone to delete
*/
void (*delete_zone) (void *cls,
- const GNUNET_HashCode *zone);
+ const struct GNUNET_CRYPTO_ShortHashCode *zone);
};