diff options
Diffstat (limited to 'src/include/gnunet_psyc_slicer.h')
-rw-r--r-- | src/include/gnunet_psyc_slicer.h | 73 |
1 files changed, 59 insertions, 14 deletions
diff --git a/src/include/gnunet_psyc_slicer.h b/src/include/gnunet_psyc_slicer.h index 1851a6002..077c0c5bd 100644 --- a/src/include/gnunet_psyc_slicer.h +++ b/src/include/gnunet_psyc_slicer.h | |||
@@ -250,9 +250,9 @@ GNUNET_PSYC_slicer_method_remove (struct GNUNET_PSYC_Slicer *slicer, | |||
250 | */ | 250 | */ |
251 | void | 251 | void |
252 | GNUNET_PSYC_slicer_modifier_add (struct GNUNET_PSYC_Slicer *slicer, | 252 | GNUNET_PSYC_slicer_modifier_add (struct GNUNET_PSYC_Slicer *slicer, |
253 | const char *object_filter, | 253 | const char *object_filter, |
254 | GNUNET_PSYC_ModifierCallback modifier_cb, | 254 | GNUNET_PSYC_ModifierCallback modifier_cb, |
255 | void *cls); | 255 | void *cls); |
256 | 256 | ||
257 | 257 | ||
258 | /** | 258 | /** |
@@ -270,30 +270,75 @@ GNUNET_PSYC_slicer_modifier_add (struct GNUNET_PSYC_Slicer *slicer, | |||
270 | */ | 270 | */ |
271 | int | 271 | int |
272 | GNUNET_PSYC_slicer_modifier_remove (struct GNUNET_PSYC_Slicer *slicer, | 272 | GNUNET_PSYC_slicer_modifier_remove (struct GNUNET_PSYC_Slicer *slicer, |
273 | const char *object_filter, | 273 | const char *object_filter, |
274 | GNUNET_PSYC_ModifierCallback modifier_cb); | 274 | GNUNET_PSYC_ModifierCallback modifier_cb); |
275 | |||
276 | |||
277 | /** | ||
278 | * Process an incoming message and call matching handlers. | ||
279 | * | ||
280 | * @param slicer | ||
281 | * The slicer to use. | ||
282 | * @param msg | ||
283 | * The message as it arrived from the network. | ||
284 | */ | ||
285 | void | ||
286 | GNUNET_PSYC_slicer_message (struct GNUNET_PSYC_Slicer *slicer, | ||
287 | const struct GNUNET_PSYC_MessageHeader *msg); | ||
275 | 288 | ||
276 | 289 | ||
277 | /** | 290 | /** |
278 | * Process an incoming message part and call matching handlers. | 291 | * Process an incoming message part and call matching handlers. |
279 | * | 292 | * |
280 | * @param cls | 293 | * @param slicer |
281 | * Closure. | 294 | * The slicer to use. |
282 | * @param message_id | 295 | * @param message_id |
283 | * ID of the message. | 296 | * ID of the message. |
284 | * @param flags | 297 | * @param flags |
285 | * Flags for the message. | 298 | * Flags for the message. |
286 | * @see enum GNUNET_PSYC_MessageFlags | 299 | * @see enum GNUNET_PSYC_MessageFlags |
300 | * @param fragment offset | ||
301 | * Fragment offset of the message. | ||
287 | * @param msg | 302 | * @param msg |
288 | * The message part. as it arrived from the network. | 303 | * The message part as it arrived from the network. |
304 | */ | ||
305 | void | ||
306 | GNUNET_PSYC_slicer_message_part (struct GNUNET_PSYC_Slicer *slicer, | ||
307 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key, | ||
308 | uint64_t message_id, | ||
309 | uint32_t flags, | ||
310 | uint64_t fragment_offset, | ||
311 | const struct GNUNET_MessageHeader *msg); | ||
312 | |||
313 | |||
314 | /** | ||
315 | * Remove all registered method handlers. | ||
316 | * | ||
317 | * @param slicer | ||
318 | * Slicer to clear. | ||
319 | */ | ||
320 | void | ||
321 | GNUNET_PSYC_slicer_method_clear (struct GNUNET_PSYC_Slicer *slicer); | ||
322 | |||
323 | |||
324 | /** | ||
325 | * Remove all registered modifier handlers. | ||
326 | * | ||
327 | * @param slicer | ||
328 | * Slicer to clear. | ||
329 | */ | ||
330 | void | ||
331 | GNUNET_PSYC_slicer_modifier_clear (struct GNUNET_PSYC_Slicer *slicer); | ||
332 | |||
333 | |||
334 | /** | ||
335 | * Remove all registered method & modifier handlers. | ||
336 | * | ||
337 | * @param slicer | ||
338 | * Slicer to clear. | ||
289 | */ | 339 | */ |
290 | void | 340 | void |
291 | GNUNET_PSYC_slicer_message (void *cls, | 341 | GNUNET_PSYC_slicer_clear (struct GNUNET_PSYC_Slicer *slicer); |
292 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key, | ||
293 | uint64_t message_id, | ||
294 | uint32_t flags, | ||
295 | uint64_t fragment_offset, | ||
296 | const struct GNUNET_MessageHeader *msg); | ||
297 | 342 | ||
298 | 343 | ||
299 | /** | 344 | /** |