diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-09-07 16:24:53 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-09-07 16:24:53 +0000 |
commit | b25cf0c5e608045beb3c4cdfead6a94f0067284f (patch) | |
tree | f97ee547a595fd023fd0cdcd75370a349c893abf /src/include | |
parent | 6a32c510c139f0bbfd2d5d4043252c6996da1f5f (diff) | |
download | gnunet-b25cf0c5e608045beb3c4cdfead6a94f0067284f.tar.gz gnunet-b25cf0c5e608045beb3c4cdfead6a94f0067284f.zip |
Changed documentation, type names and code formatting
Extended test_local
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_mesh_service_new.h | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 1b4faa382..f32bf28c5 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h | |||
@@ -113,16 +113,14 @@ struct GNUNET_MESH_MessageHandler | |||
113 | * @param tunnel new handle to the tunnel | 113 | * @param tunnel new handle to the tunnel |
114 | * @param initiator peer that started the tunnel | 114 | * @param initiator peer that started the tunnel |
115 | * @param atsi performance information for the tunnel | 115 | * @param atsi performance information for the tunnel |
116 | * @return initial tunnel context for the tunnel (can be NULL -- that's not an error) | 116 | * @return initial tunnel context for the tunnel |
117 | * (can be NULL -- that's not an error) | ||
117 | */ | 118 | */ |
118 | typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | 119 | typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) ( |
119 | struct GNUNET_MESH_Tunnel * tunnel, | 120 | void *cls, |
120 | const struct | 121 | struct GNUNET_MESH_Tunnel * tunnel, |
121 | GNUNET_PeerIdentity * | 122 | const struct GNUNET_PeerIdentity * initiator, |
122 | initiator, | 123 | const struct GNUNET_TRANSPORT_ATS_Information * atsi); |
123 | const struct | ||
124 | GNUNET_TRANSPORT_ATS_Information * | ||
125 | atsi); | ||
126 | 124 | ||
127 | 125 | ||
128 | /** | 126 | /** |
@@ -166,7 +164,8 @@ typedef uint32_t GNUNET_MESH_ApplicationType; | |||
166 | */ | 164 | */ |
167 | struct GNUNET_MESH_Handle * | 165 | struct GNUNET_MESH_Handle * |
168 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 166 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
169 | unsigned int queue_size, void *cls, | 167 | unsigned int queue_size, |
168 | void *cls, | ||
170 | GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, | 169 | GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, |
171 | GNUNET_MESH_TunnelEndHandler cleaner, | 170 | GNUNET_MESH_TunnelEndHandler cleaner, |
172 | const struct GNUNET_MESH_MessageHandler *handlers, | 171 | const struct GNUNET_MESH_MessageHandler *handlers, |
@@ -188,10 +187,9 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle); | |||
188 | * @param cls closure | 187 | * @param cls closure |
189 | * @param peer peer identity the tunnel stopped working with | 188 | * @param peer peer identity the tunnel stopped working with |
190 | */ | 189 | */ |
191 | typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls, | 190 | typedef void (*GNUNET_MESH_PeerDisconnectHandler) ( |
192 | const struct | 191 | void *cls, |
193 | GNUNET_PeerIdentity * | 192 | const struct GNUNET_PeerIdentity * peer); |
194 | peer); | ||
195 | 193 | ||
196 | 194 | ||
197 | /** | 195 | /** |
@@ -202,12 +200,10 @@ typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls, | |||
202 | * @param peer peer identity the tunnel was created to, NULL on timeout | 200 | * @param peer peer identity the tunnel was created to, NULL on timeout |
203 | * @param atsi performance data for the connection | 201 | * @param atsi performance data for the connection |
204 | */ | 202 | */ |
205 | typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, | 203 | typedef void (*GNUNET_MESH_PeerConnectHandler) ( |
206 | const struct | 204 | void *cls, |
207 | GNUNET_PeerIdentity * peer, | 205 | const struct GNUNET_PeerIdentity * peer, |
208 | const struct | 206 | const struct GNUNET_TRANSPORT_ATS_Information * atsi); |
209 | GNUNET_TRANSPORT_ATS_Information | ||
210 | * atsi); | ||
211 | 207 | ||
212 | 208 | ||
213 | 209 | ||
@@ -222,18 +218,19 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, | |||
222 | * @param handler_cls closure for connect/disconnect handlers | 218 | * @param handler_cls closure for connect/disconnect handlers |
223 | */ | 219 | */ |
224 | struct GNUNET_MESH_Tunnel * | 220 | struct GNUNET_MESH_Tunnel * |
225 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void *tunnel_ctx, | 221 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, |
226 | GNUNET_MESH_TunnelConnectHandler connect_handler, | 222 | void *tunnel_ctx, |
227 | GNUNET_MESH_TunnelDisconnectHandler | 223 | GNUNET_MESH_PeerConnectHandler connect_handler, |
228 | disconnect_handler, void *handler_cls); | 224 | GNUNET_MESH_PeerDisconnectHandler disconnect_handler, |
225 | void *handler_cls); | ||
229 | 226 | ||
230 | /** | 227 | /** |
231 | * Destroy an existing tunnel. | 228 | * Destroy an existing tunnel. |
232 | * | 229 | * |
233 | * @param tun tunnel handle | 230 | * @param tunnel tunnel handle |
234 | */ | 231 | */ |
235 | void | 232 | void |
236 | GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun); | 233 | GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tunnel); |
237 | 234 | ||
238 | 235 | ||
239 | /** | 236 | /** |
@@ -300,7 +297,8 @@ struct GNUNET_MESH_TransmitHandle; | |||
300 | * memory); if NULL is returned, "notify" will NOT be called. | 297 | * memory); if NULL is returned, "notify" will NOT be called. |
301 | */ | 298 | */ |
302 | struct GNUNET_MESH_TransmitHandle * | 299 | struct GNUNET_MESH_TransmitHandle * |
303 | GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork, | 300 | GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, |
301 | int cork, | ||
304 | uint32_t priority, | 302 | uint32_t priority, |
305 | struct GNUNET_TIME_Relative maxdelay, | 303 | struct GNUNET_TIME_Relative maxdelay, |
306 | const struct GNUNET_PeerIdentity *target, | 304 | const struct GNUNET_PeerIdentity *target, |