From c3232fbe508dfbb9b7e062abee9f73dc6aa40082 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 9 Oct 2013 07:33:47 +0000 Subject: [PATCH] documentation and fix for const warning --- src/include/gnunet_ats_plugin.h | 77 ++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 7 deletions(-) diff --git a/src/include/gnunet_ats_plugin.h b/src/include/gnunet_ats_plugin.h index e6c22d3c8..c9dfd8e39 100644 --- a/src/include/gnunet_ats_plugin.h +++ b/src/include/gnunet_ats_plugin.h @@ -291,9 +291,9 @@ typedef const double * /** - * The transport service will pass a pointer to a struct + * The ATS service will pass a pointer to a struct * of this type as the first and only argument to the - * entry point of each transport plugin. + * entry point of each ATS solver. */ struct GNUNET_ATS_PluginEnvironment { @@ -302,26 +302,89 @@ struct GNUNET_ATS_PluginEnvironment */ void *cls; + + /** + * Configuration handle to be used by the solver + */ + const struct GNUNET_CONFIGURATION_Handle *cfg; + + + /** + * Statistics handle to be used by the solver + */ + const struct GNUNET_STATISTICS_Handle *stats; + + + /** + * Hashmap containing all addresses available + */ + struct GNUNET_CONTAINER_MultiPeerMap *addresses; + + + /** + * ATS addresses callback to be notified about bandwidth assignment changes + */ GAS_bandwidth_changed_cb bandwidth_changed_cb; + + + /** + * ATS addresses closure to be notified about bandwidth assignment changes + */ void *bw_changed_cb_cls; - GAS_get_preferences get_preferences_cb; + + /** + * ATS addresses function to obtain preference values + */ + GAS_get_preferences get_preferences; + + + /** + * ATS addresses function closure to obtain preference values + */ void *get_preference_cls; + /** + * ATS addresses function to obtain property values + */ GAS_get_properties get_property_cb; + + + /** + * ATS addresses function closure to obtain property values + */ void *get_property_cls; + + /** + * The ATS solver plugin functions to call + */ struct GNUNET_ATS_SolverFunctions sf; - struct GNUNET_CONFIGURATION_Handle *cfg; - struct GNUNET_STATISTICS_Handle *stats; - struct GNUNET_CONTAINER_MultiPeerMap *addresses; - /* Available networks */ + /** + * Available networks + */ int networks[GNUNET_ATS_NetworkTypeCount]; + + + /** + * Number of networks available + */ int network_count; + + /** + * Array of configured outbound quotas + * Order according to networks in network array + */ unsigned long long out_quota[GNUNET_ATS_NetworkTypeCount]; + + + /** + * Array of configured inbound quotas + * Order according to networks in network array + */ unsigned long long in_quota[GNUNET_ATS_NetworkTypeCount]; }; -- 2.25.1