aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_mesh_service_new.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:46:35 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:46:35 +0000
commit502af2167f7c218366666ca4944bd7cc54b5b19a (patch)
treea91fec5cc9769d260640bd91c6633cb9cf395524 /src/include/gnunet_mesh_service_new.h
parent03af5a603b7cc53432249d5854cd412aa90dde0d (diff)
downloadgnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.tar.gz
gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.zip
indentation
Diffstat (limited to 'src/include/gnunet_mesh_service_new.h')
-rw-r--r--src/include/gnunet_mesh_service_new.h111
1 files changed, 61 insertions, 50 deletions
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h
index 7d1570550..7146faa75 100644
--- a/src/include/gnunet_mesh_service_new.h
+++ b/src/include/gnunet_mesh_service_new.h
@@ -68,13 +68,13 @@ struct GNUNET_MESH_Tunnel;
68 * GNUNET_SYSERR to close it (signal serious error) 68 * GNUNET_SYSERR to close it (signal serious error)
69 */ 69 */
70typedef int 70typedef int
71 (*GNUNET_MESH_MessageCallback) (void *cls, 71 (*GNUNET_MESH_MessageCallback) (void *cls,
72 struct GNUNET_MESH_Tunnel *tunnel, 72 struct GNUNET_MESH_Tunnel * tunnel,
73 void **tunnel_ctx, 73 void **tunnel_ctx,
74 const struct GNUNET_PeerIdentity *sender, 74 const struct GNUNET_PeerIdentity * sender,
75 const struct GNUNET_MessageHeader *message, 75 const struct GNUNET_MessageHeader * message,
76 const struct GNUNET_TRANSPORT_ATS_Information 76 const struct
77 *atsi); 77 GNUNET_TRANSPORT_ATS_Information * atsi);
78 78
79 79
80/** 80/**
@@ -112,10 +112,9 @@ struct GNUNET_MESH_MessageHandler
112 * @param tunnel_ctx place where local state associated 112 * @param tunnel_ctx place where local state associated
113 * with the tunnel is stored 113 * with the tunnel is stored
114 */ 114 */
115typedef void (GNUNET_MESH_TunnelEndHandler)(void *cls, 115typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls,
116 const struct GNUNET_MESH_Tunnel 116 const struct GNUNET_MESH_Tunnel
117 *tunnel, 117 * tunnel, void **tunnel_ctx);
118 void **tunnel_ctx);
119 118
120 119
121/** 120/**
@@ -139,12 +138,17 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
139 * @return handle to the mesh service NULL on error 138 * @return handle to the mesh service NULL on error
140 * (in this case, init is never called) 139 * (in this case, init is never called)
141 */ 140 */
142struct GNUNET_MESH_Handle * 141struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
143GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 142 GNUNET_CONFIGURATION_Handle
144 void *cls, 143 *cfg, void *cls,
145 GNUNET_MESH_TunnelEndHandler cleaner, 144 GNUNET_MESH_TunnelEndHandler
146 const struct GNUNET_MESH_MessageHandler *handlers, 145 cleaner,
147 const GNUNET_MESH_ApplicationType *stypes); 146 const struct
147 GNUNET_MESH_MessageHandler
148 *handlers,
149 const
150 GNUNET_MESH_ApplicationType
151 *stypes);
148 152
149 153
150/** 154/**
@@ -162,7 +166,9 @@ void GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
162 * @param peer peer identity the tunnel stopped working with 166 * @param peer peer identity the tunnel stopped working with
163 */ 167 */
164typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls, 168typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls,
165 const struct GNUNET_PeerIdentity *peer); 169 const struct
170 GNUNET_PeerIdentity *
171 peer);
166 172
167 173
168/** 174/**
@@ -173,8 +179,11 @@ typedef void (*GNUNET_MESH_TunnelDisconnectHandler) (void *cls,
173 * @param atsi performance data for the connection 179 * @param atsi performance data for the connection
174 */ 180 */
175typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, 181typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
176 const struct GNUNET_PeerIdentity *peer, 182 const struct
177 const struct GNUNET_TRANSPORT_ATS_Information *atsi); 183 GNUNET_PeerIdentity * peer,
184 const struct
185 GNUNET_TRANSPORT_ATS_Information
186 * atsi);
178 187
179 188
180 189
@@ -187,21 +196,20 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
187 * @param disconnect_handler function to call when peers are disconnected 196 * @param disconnect_handler function to call when peers are disconnected
188 * @param handler_cls closure for connect/disconnect handlers 197 * @param handler_cls closure for connect/disconnect handlers
189 */ 198 */
190struct GNUNET_MESH_Tunnel * 199struct GNUNET_MESH_Tunnel *GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle
191GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, 200 *h,
192 GNUNET_MESH_TunnelConnectHandler 201 GNUNET_MESH_TunnelConnectHandler
193 connect_handler, 202 connect_handler,
194 GNUNET_MESH_TunnelDisconnectHandler 203 GNUNET_MESH_TunnelDisconnectHandler
195 disconnect_handler, 204 disconnect_handler,
196 void *handler_cls); 205 void *handler_cls);
197 206
198/** 207/**
199 * Destroy an existing tunnel. 208 * Destroy an existing tunnel.
200 * 209 *
201 * @param tun tunnel handle 210 * @param tun tunnel handle
202 */ 211 */
203void 212void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
204GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
205 213
206 214
207/** 215/**
@@ -214,8 +222,8 @@ GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
214 */ 222 */
215void 223void
216GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel, 224GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
217 struct GNUNET_TIME_Relative timeout, 225 struct GNUNET_TIME_Relative timeout,
218 const struct GNUNET_PeerIdentity *peer); 226 const struct GNUNET_PeerIdentity *peer);
219 227
220 228
221/** 229/**
@@ -227,7 +235,7 @@ GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
227 */ 235 */
228void 236void
229GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel, 237GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
230 const struct GNUNET_PeerIdentity *peer); 238 const struct GNUNET_PeerIdentity *peer);
231 239
232 240
233/** 241/**
@@ -241,8 +249,8 @@ GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
241 */ 249 */
242void 250void
243GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel, 251GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel,
244 struct GNUNET_TIME_Relative timeout, 252 struct GNUNET_TIME_Relative timeout,
245 GNUNET_MESH_ApplicationType app_type); 253 GNUNET_MESH_ApplicationType app_type);
246 254
247 255
248/** 256/**
@@ -271,22 +279,25 @@ struct GNUNET_MESH_TransmitHandle;
271 * NULL if we can not even queue the request (insufficient 279 * NULL if we can not even queue the request (insufficient
272 * memory); if NULL is returned, "notify" will NOT be called. 280 * memory); if NULL is returned, "notify" will NOT be called.
273 */ 281 */
274struct GNUNET_MESH_TransmitHandle * 282struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
275GNUNET_MESH_notify_transmit_ready (struct 283 GNUNET_MESH_Tunnel
276 GNUNET_MESH_Tunnel 284 *tunnel,
277 *tunnel, 285 int cork,
278 int cork, 286 uint32_t
279 uint32_t priority, 287 priority,
280 struct 288 struct
281 GNUNET_TIME_Relative 289 GNUNET_TIME_Relative
282 maxdelay, 290 maxdelay,
283 const struct GNUNET_PeerIdentity *target, 291 const
284 size_t 292 struct
285 notify_size, 293 GNUNET_PeerIdentity
286 GNUNET_CONNECTION_TransmitReadyNotify 294 *target,
287 notify, 295 size_t
288 void 296 notify_size,
289 *notify_cls); 297 GNUNET_CONNECTION_TransmitReadyNotify
298 notify,
299 void
300 *notify_cls);
290 301
291 302
292/** 303/**