next test
[oweals/gnunet.git] / src / ats / gnunet-service-ats_addresses.h
index fa9a2663f0a69427896f6896f3b7abce8fa49261..4f17fd9123aa0b7dd644f6750966d8e9ea4969d5 100644 (file)
  *    it as a value_number. If no configuration value is found it will assign
  *    GNUNET_ATS_DefaultBandwidth. The most important step is to load the
  *    configured solver using configuration "[ats]:MODE". Current solvers are
- *    MODE_SIMPLISTIC, MODE_MLP. Interaction is done using a solver API
+ *    MODE_PROPORTIONAL, MODE_MLP. Interaction is done using a solver API
  *
  *     1.4 Solver API
  *
@@ -448,6 +448,25 @@ typedef void
                                                                                                                                                                 enum GNUNET_ATS_PreferenceKind kind,
                                                                                                                                                                 double pref_rel);
 
+
+/**
+ * Give feedback about the current assignment
+ *
+ * @param handle the solver handle
+ * @param application the application sending this request
+ * @param peer the peer id
+ * @param scope the time interval for this feedback: [now - scope .. now]
+ * @param kind the preference kind for this feedback
+ * @param score the feedback score
+ */
+typedef void
+(*GAS_solver_address_feedback_preference) (void *solver,
+                                                                                                                                                                void *application,
+                                                                                                                                                                const struct GNUNET_PeerIdentity *peer,
+                                                                                                                                                                const struct GNUNET_TIME_Relative scope,
+                                                                                                                                                                enum GNUNET_ATS_PreferenceKind kind,
+                                                                                                                                                                double score);
+
 /**
  * Notify the solver about a bulk operation changing possibly a lot of values
  * Solver will not resolve until all bulk operations are marked as done
@@ -536,13 +555,11 @@ typedef void
  *
  * @param solver solver handle
  * @param address the address
- * @param cur_session the current session
- * @param new_session the new session
+ * @param in_use usage state
  */
 typedef void
 (*GAS_solver_address_inuse_changed) (void *solver,
                                                                                                                                           struct ATS_Address *address,
-                                                                                                                                          uint32_t session,
                                                                                                                                           int in_use);
 
 /**
@@ -777,6 +794,25 @@ GAS_addresses_change_preference (struct GAS_Addresses_Handle *handle,
                                  float score_abs);
 
 
+/**
+ * Change the preference for a peer
+ *
+ * @param handle the address handle
+ * @param application the client sending this request
+ * @param peer the peer id
+ * @param scope the time interval this valid for: [now - scope .. now]
+ * @param kind the preference kind to change
+ * @param score_abs the new preference score
+ */
+void
+GAS_addresses_preference_feedback (struct GAS_Addresses_Handle *handle,
+                                                                                                                                               void *application,
+                                                                                                                                               const struct GNUNET_PeerIdentity *peer,
+                                                                                                                                               const struct GNUNET_TIME_Relative scope,
+                                                                                                                                               enum GNUNET_ATS_PreferenceKind kind,
+                                                                                                                                               float score_abs);
+
+
 /**
  * Iterator for GAS_addresses_iterate_peers
  *