-version bumping
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index f05048e96969b2b3cf55dd6c2e4ad4284ed0727a..62c8f16380897824c0bdf0b7df2ddb0386e9d0c7 100644 (file)
@@ -74,14 +74,13 @@ struct SessionHeader
  *
  * @param cls closure
  * @param peer which peer was the session for
- * @param session which session is being destoyed
+ * @param session which session is being destroyed
  */
 typedef void
 (*GNUNET_TRANSPORT_SessionEnd) (void *cls,
                                 const struct GNUNET_PeerIdentity *peer,
                                 struct Session *session);
 
-
 /**
  * Function that will be called whenever the plugin internally
  * creates a new session and hence transport need to tell ATS.
@@ -107,7 +106,6 @@ typedef void
                                   const struct GNUNET_ATS_Information *ats,
                                   uint32_t ats_count);
 
-
 /**
  * Function called by the transport for each received message.
  * This function should also be called with "NULL" for the
@@ -491,6 +489,20 @@ typedef struct Session *
                                    const struct GNUNET_HELLO_Address *address);
 
 
+/**
+ * Function that will be called whenever the transport service wants to
+ * notify the plugin that a session is still active and in use and
+ * therefore the session timeout for this session has to be updated
+ *
+ * @param cls closure
+ * @param peer which peer was the session for
+ * @param session which session is being updated
+ */
+typedef void
+(*GNUNET_TRANSPORT_UpdateSessionTimeout) (void *cls,
+                                          const struct GNUNET_PeerIdentity *peer,
+                                          struct Session *session);
+
 /**
  * Function called for a quick conversion of the binary address to
  * a numeric address.  Note that the caller must not free the
@@ -575,6 +587,13 @@ struct GNUNET_TRANSPORT_PluginFunctions
    */
   GNUNET_TRANSPORT_DisconnectSessionFunction disconnect_session;
 
+  /**
+   * Function that will be called whenever the transport service wants to
+   * notify the plugin that a session is still active and in use and
+   * therefore the session timeout for this session has to be updated
+   */
+  GNUNET_TRANSPORT_UpdateSessionTimeout update_session_timeout;
+
   /**
    * Function that is used to query keepalive factor.
    * GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT is divided by this number to