- begin work on enhanced multipart receiving
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_dht.h
index d491020bf6abb607a182c9e430b4d5ea83a78cba..179e7b4fce2d9b7058a43072245cd64719b7c268 100644 (file)
@@ -40,13 +40,25 @@ extern "C"
 #include "platform.h"
 #include "gnunet_util_lib.h"
 
+struct GMD_search_handle;
+
+
+/**
+ * Callback called on each path found over the DHT.
+ *
+ * @param cls Closure.
+ * @param path An unchecked, unoptimized path to the target node.
+ *             After callback will no longer be valid!
+ */
+typedef void (*GMD_search_callback) (void *cls,
+                                     const struct MeshPeerPath *path);
 
 /******************************************************************************/
 /********************************    API    ***********************************/
 /******************************************************************************/
 
 /**
- * Initialize DHT subsystem.
+ * Initialize the DHT subsystem.
  *
  * @param c Configuration.
  */
@@ -59,6 +71,15 @@ GMD_init (const struct GNUNET_CONFIGURATION_Handle *c);
 void
 GMD_shutdown (void);
 
+
+struct GMD_search_handle *
+GMD_search (const struct GNUNET_PeerIdentity *peer_id,
+            GMD_search_callback callback, void *cls);
+
+
+void
+GMD_search_stop (struct GMD_search_handle *h);
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif