diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-29 15:34:53 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-08-29 15:34:53 +0000 |
commit | f5136eb1b1a24c5b307ce8123dfc4cc0c85facaf (patch) | |
tree | 357763a82d29edd1bf8f533cd294818ff3ce5a9d /src/ats/gnunet-service-ats_addresses.h | |
parent | 81eaa5a9d5ebe1e61790069a2777178abd1b6a2c (diff) | |
download | gnunet-f5136eb1b1a24c5b307ce8123dfc4cc0c85facaf.tar.gz gnunet-f5136eb1b1a24c5b307ce8123dfc4cc0c85facaf.zip |
implemented feedback API, but not yet calling solver
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.h')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.h | 34 |
1 files changed, 34 insertions, 0 deletions
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 | |||
448 | enum GNUNET_ATS_PreferenceKind kind, | 448 | enum GNUNET_ATS_PreferenceKind kind, |
449 | double pref_rel); | 449 | double pref_rel); |
450 | 450 | ||
451 | |||
452 | /** | ||
453 | * Give feedback about the current assignment | ||
454 | * | ||
455 | * @param handle the solver handle | ||
456 | * @param application the application sending this request | ||
457 | * @param peer the peer id | ||
458 | * @param kind the preference kind for this feedback | ||
459 | * @param score the feedback score | ||
460 | */ | ||
461 | typedef void | ||
462 | (*GAS_solver_address_feedback_preference) (void *solver, | ||
463 | void *application, | ||
464 | const struct GNUNET_PeerIdentity *peer, | ||
465 | enum GNUNET_ATS_PreferenceKind kind, | ||
466 | double score); | ||
467 | |||
451 | /** | 468 | /** |
452 | * Notify the solver about a bulk operation changing possibly a lot of values | 469 | * Notify the solver about a bulk operation changing possibly a lot of values |
453 | * Solver will not resolve until all bulk operations are marked as done | 470 | * Solver will not resolve until all bulk operations are marked as done |
@@ -776,6 +793,23 @@ GAS_addresses_change_preference (struct GAS_Addresses_Handle *handle, | |||
776 | 793 | ||
777 | 794 | ||
778 | /** | 795 | /** |
796 | * Change the preference for a peer | ||
797 | * | ||
798 | * @param handle the address handle | ||
799 | * @param client the client sending this request | ||
800 | * @param peer the peer id | ||
801 | * @param kind the preference kind to change | ||
802 | * @param score_abs the new preference score | ||
803 | */ | ||
804 | void | ||
805 | GAS_addresses_preference_feedback (struct GAS_Addresses_Handle *handle, | ||
806 | void *client, | ||
807 | const struct GNUNET_PeerIdentity *peer, | ||
808 | enum GNUNET_ATS_PreferenceKind kind, | ||
809 | float score_abs); | ||
810 | |||
811 | |||
812 | /** | ||
779 | * Iterator for GAS_addresses_iterate_peers | 813 | * Iterator for GAS_addresses_iterate_peers |
780 | * | 814 | * |
781 | * @param p_it_cls closure | 815 | * @param p_it_cls closure |