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);
* @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);
*
* @param cls closure (internal context for the plugin)
* @param zone hash of the public key of the zone
- * @param name name that is being mapped (at most 255 characters long)
+ * @param name name to remove (at most 255 characters long)
* @return GNUNET_OK on success
*/
int (*remove_records) (void *cls,
- const GNUNET_HashCode *zone,
+ const struct GNUNET_CRYPTO_ShortHashCode *zone,
const char *name);
*
* @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 zone zone to delete
*/
void (*delete_zone) (void *cls,
- const GNUNET_HashCode *zone);
+ const struct GNUNET_CRYPTO_ShortHashCode *zone);
};