aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-09-07 16:24:53 +0000
committerBart Polot <bart@net.in.tum.de>2011-09-07 16:24:53 +0000
commitb25cf0c5e608045beb3c4cdfead6a94f0067284f (patch)
treef97ee547a595fd023fd0cdcd75370a349c893abf /src/include
parent6a32c510c139f0bbfd2d5d4043252c6996da1f5f (diff)
downloadgnunet-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.h52
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 */
118typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, 119typedef 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 */
167struct GNUNET_MESH_Handle * 165struct GNUNET_MESH_Handle *
168GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 166GNUNET_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 */
191typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls, 190typedef 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 */
205typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, 203typedef 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 */
224struct GNUNET_MESH_Tunnel * 220struct GNUNET_MESH_Tunnel *
225GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void *tunnel_ctx, 221GNUNET_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 */
235void 232void
236GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun); 233GNUNET_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 */
302struct GNUNET_MESH_TransmitHandle * 299struct GNUNET_MESH_TransmitHandle *
303GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork, 300GNUNET_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,