messages for inter-controller overlay connect
[oweals/gnunet.git] / src / include / gnunet_namestore_plugin.h
index bf43805e4cdfecd67f9b9fc2ac7b80d12870a76f..1168e0d13baeeafe78eca56550b99f9be72976fc 100644 (file)
@@ -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);
 
 
@@ -120,14 +120,33 @@ struct GNUNET_NAMESTORE_PluginFunctions
    * @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
+   *       'iter' will have been called unless the return value is 'GNUNET_SYSERR'
    */
   int (*iterate_records) (void *cls, 
-                         const GNUNET_HashCode *zone,
+                         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
+   *       'iter' will have been called unless the return value is 'GNUNET_SYSERR'
+   */
+  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.
    *
@@ -135,7 +154,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
    * @param zone zone to delete
    */
   void (*delete_zone) (void *cls,
-                      const GNUNET_HashCode *zone);
+                      const struct GNUNET_CRYPTO_ShortHashCode *zone);
 
 
 };