adding single location for no_forcestart configuration list
[oweals/gnunet.git] / src / fs / gnunet-service-fs_cp.h
index fae07b4cfe685c3485eda689d4a8bf9932d8763c..6b5fb4b0cb3611db267215bd30a27a5e4eb6d46e 100644 (file)
@@ -189,6 +189,16 @@ typedef void (*GSF_PeerReserveCallback) (void *cls,
                                          int success);
 
 
+/**
+ * Function called after the creation of a connected peer record is complete.
+ *
+ * @param cls closure
+ * @param cp handle to the newly created connected peer record
+ */
+typedef void (*GSF_ConnectedPeerCreationCallback) (void *cls,
+                                                   struct GSF_ConnectedPeer *cp);
+
+
 /**
  * Handle to cancel a transmission request.
  */
@@ -200,14 +210,13 @@ struct GSF_PeerTransmitHandle;
  * records.
  *
  * @param peer identity of peer that connected
- * @param atsi performance data for the connection
- * @param atsi_count number of records in 'atsi'
- * @return handle to connected peer entry
+ * @param creation_cb callback function when the record is created.
+ * @param creation_cb_cls closure for @creation_cb
  */
-struct GSF_ConnectedPeer *
+void
 GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
-                           const struct GNUNET_ATS_Information *atsi,
-                           unsigned int atsi_count);
+                           GSF_ConnectedPeerCreationCallback creation_cb,
+                           void *creation_cb_cls);
 
 
 /**
@@ -220,6 +229,17 @@ struct GSF_ConnectedPeer *
 GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer);
 
 
+/**
+ * Update the latency information kept for the given peer.
+ *
+ * @param id peer record to update
+ * @param latency current latency value
+ */
+void
+GSF_update_peer_latency_ (const struct GNUNET_PeerIdentity *id,
+                         struct GNUNET_TIME_Relative latency);
+
+
 /**
  * Transmit a message to the given peer as soon as possible.
  * If the peer disconnects before the transmission can happen,
@@ -294,8 +314,6 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
  * @param other the other peer involved (sender or receiver, NULL
  *        for loopback messages where we are both sender and receiver)
  * @param message the actual message
- * @param atsi performance information
- * @param atsi_count number of records in 'atsi'
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */