From 0a5333c2df162d6f6f9bd35ea04d57e6abcc0b6f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 13 Oct 2011 08:28:15 +0000 Subject: ATS API cleanup: remove 2nd callback type with virtually identical signature --- src/include/gnunet_ats_service.h | 82 +++++++++++----------------------------- 1 file changed, 23 insertions(+), 59 deletions(-) (limited to 'src/include/gnunet_ats_service.h') diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 33539bdaf..713178411 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h @@ -43,65 +43,6 @@ struct GNUNET_ATS_Handle; -/** - * Signature of a function called by ATS to notify the callee that the - * assigned bandwidth or address for a given peer was changed. If the - * callback is called with address/bandwidth assignments of zero, the - * ATS disconnect function will still be called once the disconnect - * actually happened. - * - * @param cls closure - * @param peer identity of the peer - * @param plugin_name name of the transport plugin, NULL to disconnect - * @param session session to use (if available) - * @param plugin_addr address to use (if available) - * @param plugin_addr_len number of bytes in addr - * @param bandwidth_out assigned outbound bandwidth for the connection - * @param bandwidth_in assigned inbound bandwidth for the connection - */ -typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification) (void *cls, - const struct - GNUNET_PeerIdentity - * peer, - const char - *plugin_name, - struct Session * - session, - const void - *plugin_addr, - size_t - plugin_addr_len, - struct - GNUNET_BANDWIDTH_Value32NBO - bandwidth_out, - struct - GNUNET_BANDWIDTH_Value32NBO - bandwidth_in); - - -/** - * Initialize the ATS subsystem. - * - * @param cfg configuration to use - * @param alloc_cb notification to call whenever the allocation changed - * @param alloc_cb_cls closure for 'alloc_cb' - * @return ats context - */ -struct GNUNET_ATS_Handle * -GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg, - GNUNET_TRANSPORT_ATS_AllocationNotification alloc_cb, - void *alloc_cb_cls); - - -/** - * Shutdown the ATS subsystem. - * - * @param atc handle - */ -void -GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc); - - /** * Signature of a function that takes an address suggestion * @@ -135,6 +76,29 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, uint32_t ats_count); +/** + * Initialize the ATS subsystem. + * + * @param cfg configuration to use + * @param alloc_cb notification to call whenever the allocation changed + * @param alloc_cb_cls closure for 'alloc_cb' + * @return ats context + */ +struct GNUNET_ATS_Handle * +GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg, + GNUNET_ATS_AddressSuggestionCallback alloc_cb, + void *alloc_cb_cls); + + +/** + * Shutdown the ATS subsystem. + * + * @param atc handle + */ +void +GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc); + + /** * Handle to cancel suggestion request. */ -- cgit v1.2.3