diff options
Diffstat (limited to 'src/include/gnunet_mesh_service_new.h')
-rw-r--r-- | src/include/gnunet_mesh_service_new.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index b9447fe09..4729ae60d 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h | |||
@@ -56,8 +56,7 @@ struct GNUNET_MESH_Tunnel; | |||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Functions with this signature are called whenever a message is | 58 | * Functions with this signature are called whenever a message is |
59 | * received or transmitted. | 59 | * received. |
60 | * FIXME: transmitted??? | ||
61 | * | 60 | * |
62 | * @param cls closure (set from GNUNET_MESH_connect) | 61 | * @param cls closure (set from GNUNET_MESH_connect) |
63 | * @param tunnel connection to the other end | 62 | * @param tunnel connection to the other end |
@@ -127,6 +126,26 @@ typedef uint32_t GNUNET_MESH_ApplicationType; | |||
127 | 126 | ||
128 | 127 | ||
129 | /** | 128 | /** |
129 | * Method called whenever another peer has added us to a tunnel | ||
130 | * the other peer initiated. | ||
131 | * | ||
132 | * @param cls closure | ||
133 | * @param tunnel new handle to the tunnel | ||
134 | * @param initiator peer that started the tunnel | ||
135 | * @param atsi performance information for the tunnel | ||
136 | * @return initial tunnel context for the tunnel (can be NULL -- that's not an error) | ||
137 | */ | ||
138 | typedef void* (*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | ||
139 | struct GNUNET_MESH_Tunnel * tunnel, | ||
140 | const struct | ||
141 | GNUNET_PeerIdentity * | ||
142 | initiator, | ||
143 | const struct | ||
144 | GNUNET_TRANSPORT_ATS_Information * | ||
145 | atsi); | ||
146 | |||
147 | |||
148 | /** | ||
130 | * Connect to the mesh service. | 149 | * Connect to the mesh service. |
131 | * | 150 | * |
132 | * @param cfg configuration to use | 151 | * @param cfg configuration to use |
@@ -194,12 +213,14 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls, | |||
194 | * and to broadcast). | 213 | * and to broadcast). |
195 | * | 214 | * |
196 | * @param h mesh handle | 215 | * @param h mesh handle |
216 | * @param tunnel_ctx client's tunnel context to associate with the tunnel | ||
197 | * @param connect_handler function to call when peers are actually connected | 217 | * @param connect_handler function to call when peers are actually connected |
198 | * @param disconnect_handler function to call when peers are disconnected | 218 | * @param disconnect_handler function to call when peers are disconnected |
199 | * @param handler_cls closure for connect/disconnect handlers | 219 | * @param handler_cls closure for connect/disconnect handlers |
200 | */ | 220 | */ |
201 | struct GNUNET_MESH_Tunnel * | 221 | struct GNUNET_MESH_Tunnel * |
202 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, | 222 | GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, |
223 | void *tunnel_ctx, | ||
203 | GNUNET_MESH_TunnelConnectHandler connect_handler, | 224 | GNUNET_MESH_TunnelConnectHandler connect_handler, |
204 | GNUNET_MESH_TunnelDisconnectHandler | 225 | GNUNET_MESH_TunnelDisconnectHandler |
205 | disconnect_handler, void *handler_cls); | 226 | disconnect_handler, void *handler_cls); |