error msg
[oweals/gnunet.git] / src / transport / gnunet-service-transport_plugins.h
index 3cca3ce10e96b3ad767e320ed5400b14506ca561..97e8f4c6f8fb36d8dae49eb7f2061b3ce5e4ee65 100644 (file)
  * @param recv_cb function to call when data is received
  * @param address_cb function to call when our public addresses changed
  * @param session_end_cb function to call when a session was terminated
+ * @param address_type_cb function to call when a address type is requested
  */
 void
 GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
                   GNUNET_TRANSPORT_AddressNotification address_cb,
-                  GNUNET_TRANSPORT_SessionEnd session_end_cb);
-
+                  GNUNET_TRANSPORT_SessionEnd session_end_cb,
+                  GNUNET_TRANSPORT_AddressToType address_type_cb);
 
 /**
  * Unload all plugins
@@ -65,6 +66,19 @@ GST_plugins_unload (void);
 struct GNUNET_TRANSPORT_PluginFunctions *
 GST_plugins_find (const char *name);
 
+/**
+ * Obtain the plugin API based on a the stripped plugin name after the underscore.
+ *
+ * Example: GST_plugins_printer_find (http_client) will return all plugins
+ * starting with the prefix "http":
+ * http_client or server if loaded
+ *
+ * @param name name of the plugin
+ * @return the plugin's API, NULL if the plugin is not loaded
+ */
+struct GNUNET_TRANSPORT_PluginFunctions *
+GST_plugins_printer_find (const char *name);
+
 
 /**
  * Convert a given address to a human-readable format.  Note that the