towards PEERSTORE file plugin
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index 187d5d508a5c844e3117432897282a49d437db88..308a3700d775c7379623a7c1e725ce60e34d4de7 100644 (file)
@@ -78,7 +78,7 @@ struct SessionHeader
  */
 typedef void
 (*GNUNET_TRANSPORT_SessionEnd) (void *cls,
-                                const struct GNUNET_PeerIdentity *peer,
+                                const struct GNUNET_HELLO_Address *address,
                                 struct Session *session);
 
 /**
@@ -194,6 +194,15 @@ typedef struct GNUNET_TIME_Relative
                                    const struct GNUNET_PeerIdentity *peer,
                                    size_t amount_recved);
 
+typedef void
+(*GNUNET_TRANSPORT_RegisterQuotaNotification) (void *cls,
+                                           const struct GNUNET_PeerIdentity *peer,
+                                           const char *plugin,
+                                           struct Session *session);
+
+typedef void
+(*GNUNET_TRANSPORT_UnregisterQuotaNotification) (void *cls,
+    const struct GNUNET_PeerIdentity *peer, const char *plugin, struct Session *session);
 
 /**
  * Function that returns a HELLO message.
@@ -275,6 +284,9 @@ struct GNUNET_TRANSPORT_PluginEnvironment
    */
   GNUNET_TRANSPORT_UpdateAddressMetrics update_address_metrics;
 
+  GNUNET_TRANSPORT_RegisterQuotaNotification register_quota_notification;
+
+  GNUNET_TRANSPORT_UnregisterQuotaNotification unregister_quota_notification;
 
   /**
    * What is the maximum number of connections that this transport
@@ -484,6 +496,14 @@ typedef void
                                           const struct GNUNET_PeerIdentity *peer,
                                           struct Session *session);
 
+
+
+typedef void
+(*GNUNET_TRANSPORT_UpdateInboundDelay) (void *cls,
+                                          const struct GNUNET_PeerIdentity *peer,
+                                          struct Session *session,
+                                          struct GNUNET_TIME_Relative delay);
+
 /**
  * Function called for a quick conversion of the binary address to
  * a numeric address.  Note that the caller must not free the
@@ -575,6 +595,8 @@ struct GNUNET_TRANSPORT_PluginFunctions
    */
   GNUNET_TRANSPORT_UpdateSessionTimeout update_session_timeout;
 
+  GNUNET_TRANSPORT_UpdateInboundDelay update_inbound_delay;
+
   /**
    * Function that will be called whenever the transport service wants to
    * notify the plugin that the inbound quota changed and that the plugin
@@ -632,4 +654,6 @@ struct GNUNET_TRANSPORT_PluginFunctions
 };
 
 
+/*#ifndef PLUGIN_TRANSPORT_H*/
 #endif
+/* end of gnunet_transport_plugin.h */