diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-09-02 19:59:58 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-09-02 19:59:58 +0000 |
commit | 0ee1339afc5c5e1105e234b6840c87df58a01f2c (patch) | |
tree | 64329e69e58ac66fa38f425eccf8ebebb13f1dd9 /src/include | |
parent | e1fda8a5d8674328afa61cc50842fdbd2a7044ba (diff) | |
download | gnunet-0ee1339afc5c5e1105e234b6840c87df58a01f2c.tar.gz gnunet-0ee1339afc5c5e1105e234b6840c87df58a01f2c.zip |
Changes in API, adapted code and testfiles, improved client reconnect, new documentation, small fixes
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_mesh_service_new.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 7ca53b070..e85a4814f 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h | |||
@@ -106,6 +106,26 @@ struct GNUNET_MESH_MessageHandler | |||
106 | 106 | ||
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Method called whenever another peer has added us to a tunnel | ||
110 | * the other peer initiated. | ||
111 | * | ||
112 | * @param cls closure | ||
113 | * @param tunnel new handle to the tunnel | ||
114 | * @param initiator peer that started 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) | ||
117 | */ | ||
118 | typedef void* (GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | ||
119 | struct GNUNET_MESH_Tunnel * tunnel, | ||
120 | const struct | ||
121 | GNUNET_PeerIdentity * | ||
122 | initiator, | ||
123 | const struct | ||
124 | GNUNET_TRANSPORT_ATS_Information * | ||
125 | atsi); | ||
126 | |||
127 | |||
128 | /** | ||
109 | * Function called whenever an inbound tunnel is destroyed. Should clean up | 129 | * Function called whenever an inbound tunnel is destroyed. Should clean up |
110 | * any associated state. | 130 | * any associated state. |
111 | * | 131 | * |
@@ -116,7 +136,7 @@ struct GNUNET_MESH_MessageHandler | |||
116 | */ | 136 | */ |
117 | typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls, | 137 | typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls, |
118 | const struct GNUNET_MESH_Tunnel * | 138 | const struct GNUNET_MESH_Tunnel * |
119 | tunnel, void **tunnel_ctx); | 139 | tunnel, void *tunnel_ctx); |
120 | 140 | ||
121 | 141 | ||
122 | /** | 142 | /** |
@@ -126,28 +146,6 @@ typedef uint32_t GNUNET_MESH_ApplicationType; | |||
126 | 146 | ||
127 | 147 | ||
128 | /** | 148 | /** |
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 | ||
140 | GNUNET_MESH_Tunnel | ||
141 | * tunnel, | ||
142 | const struct | ||
143 | GNUNET_PeerIdentity | ||
144 | * initiator, | ||
145 | const struct | ||
146 | GNUNET_TRANSPORT_ATS_Information | ||
147 | * atsi); | ||
148 | |||
149 | |||
150 | /** | ||
151 | * Connect to the mesh service. | 149 | * Connect to the mesh service. |
152 | * | 150 | * |
153 | * @param cfg configuration to use | 151 | * @param cfg configuration to use |
@@ -156,6 +154,7 @@ typedef void *(*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | |||
156 | * no matter what is the status of other tunnels) | 154 | * no matter what is the status of other tunnels) |
157 | * @param cls closure for the various callbacks that follow | 155 | * @param cls closure for the various callbacks that follow |
158 | * (including handlers in the handlers array) | 156 | * (including handlers in the handlers array) |
157 | * @param new_tunnel function called when an *inbound* tunnel is created | ||
159 | * @param cleaner function called when an *inbound* tunnel is destroyed | 158 | * @param cleaner function called when an *inbound* tunnel is destroyed |
160 | * @param handlers callbacks for messages we care about, NULL-terminated | 159 | * @param handlers callbacks for messages we care about, NULL-terminated |
161 | * note that the mesh is allowed to drop notifications about | 160 | * note that the mesh is allowed to drop notifications about |
@@ -168,6 +167,7 @@ typedef void *(*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls, | |||
168 | struct GNUNET_MESH_Handle * | 167 | struct GNUNET_MESH_Handle * |
169 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 168 | GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
170 | unsigned int queue_size, void *cls, | 169 | unsigned int queue_size, void *cls, |
170 | GNUNET_MESH_InboundTunnelNotificationHandler new_tunnel, | ||
171 | GNUNET_MESH_TunnelEndHandler cleaner, | 171 | GNUNET_MESH_TunnelEndHandler cleaner, |
172 | const struct GNUNET_MESH_MessageHandler *handlers, | 172 | const struct GNUNET_MESH_MessageHandler *handlers, |
173 | const GNUNET_MESH_ApplicationType *stypes); | 173 | const GNUNET_MESH_ApplicationType *stypes); |