aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-13 08:28:15 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-13 08:28:15 +0000
commit0a5333c2df162d6f6f9bd35ea04d57e6abcc0b6f (patch)
treea3161dc789f3d906cc02bb18c94f9cb1a6be5486 /src/include
parentf9d82cbcd81da81a3e78bada99f54ccc7c9ac50b (diff)
downloadgnunet-0a5333c2df162d6f6f9bd35ea04d57e6abcc0b6f.tar.gz
gnunet-0a5333c2df162d6f6f9bd35ea04d57e6abcc0b6f.zip
ATS API cleanup: remove 2nd callback type with virtually identical signature
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_ats_service.h82
1 files changed, 23 insertions, 59 deletions
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
@@ -44,65 +44,6 @@ struct GNUNET_ATS_Handle;
44 44
45 45
46/** 46/**
47 * Signature of a function called by ATS to notify the callee that the
48 * assigned bandwidth or address for a given peer was changed. If the
49 * callback is called with address/bandwidth assignments of zero, the
50 * ATS disconnect function will still be called once the disconnect
51 * actually happened.
52 *
53 * @param cls closure
54 * @param peer identity of the peer
55 * @param plugin_name name of the transport plugin, NULL to disconnect
56 * @param session session to use (if available)
57 * @param plugin_addr address to use (if available)
58 * @param plugin_addr_len number of bytes in addr
59 * @param bandwidth_out assigned outbound bandwidth for the connection
60 * @param bandwidth_in assigned inbound bandwidth for the connection
61 */
62typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification) (void *cls,
63 const struct
64 GNUNET_PeerIdentity
65 * peer,
66 const char
67 *plugin_name,
68 struct Session *
69 session,
70 const void
71 *plugin_addr,
72 size_t
73 plugin_addr_len,
74 struct
75 GNUNET_BANDWIDTH_Value32NBO
76 bandwidth_out,
77 struct
78 GNUNET_BANDWIDTH_Value32NBO
79 bandwidth_in);
80
81
82/**
83 * Initialize the ATS subsystem.
84 *
85 * @param cfg configuration to use
86 * @param alloc_cb notification to call whenever the allocation changed
87 * @param alloc_cb_cls closure for 'alloc_cb'
88 * @return ats context
89 */
90struct GNUNET_ATS_Handle *
91GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
92 GNUNET_TRANSPORT_ATS_AllocationNotification alloc_cb,
93 void *alloc_cb_cls);
94
95
96/**
97 * Shutdown the ATS subsystem.
98 *
99 * @param atc handle
100 */
101void
102GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
103
104
105/**
106 * Signature of a function that takes an address suggestion 47 * Signature of a function that takes an address suggestion
107 * 48 *
108 * @param cls closure 49 * @param cls closure
@@ -136,6 +77,29 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls,
136 77
137 78
138/** 79/**
80 * Initialize the ATS subsystem.
81 *
82 * @param cfg configuration to use
83 * @param alloc_cb notification to call whenever the allocation changed
84 * @param alloc_cb_cls closure for 'alloc_cb'
85 * @return ats context
86 */
87struct GNUNET_ATS_Handle *
88GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
89 GNUNET_ATS_AddressSuggestionCallback alloc_cb,
90 void *alloc_cb_cls);
91
92
93/**
94 * Shutdown the ATS subsystem.
95 *
96 * @param atc handle
97 */
98void
99GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
100
101
102/**
139 * Handle to cancel suggestion request. 103 * Handle to cancel suggestion request.
140 */ 104 */
141struct GNUNET_ATS_SuggestionContext; 105struct GNUNET_ATS_SuggestionContext;