From f5136eb1b1a24c5b307ce8123dfc4cc0c85facaf Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 29 Aug 2013 15:34:53 +0000 Subject: implemented feedback API, but not yet calling solver --- src/ats/gnunet-service-ats_addresses.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/ats/gnunet-service-ats_addresses.h') diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h index 3c2e040f2..a50234361 100644 --- a/src/ats/gnunet-service-ats_addresses.h +++ b/src/ats/gnunet-service-ats_addresses.h @@ -448,6 +448,23 @@ 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 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, + 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 @@ -775,6 +792,23 @@ GAS_addresses_change_preference (struct GAS_Addresses_Handle *handle, float score_abs); +/** + * Change the preference for a peer + * + * @param handle the address handle + * @param client the client sending this request + * @param peer the peer id + * @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 *client, + const struct GNUNET_PeerIdentity *peer, + enum GNUNET_ATS_PreferenceKind kind, + float score_abs); + + /** * Iterator for GAS_addresses_iterate_peers * -- cgit v1.2.3